Browse Source

fix archive viewing bug

renovate/org.robolectric-robolectric-4.x
Austin Huang 4 years ago
parent
commit
98d7260927
No known key found for this signature in database GPG Key ID: 84C23AA04587A91F
  1. 2
      app/src/main/java/awais/instagrabber/fragments/StoryListViewerFragment.java
  2. 4
      app/src/main/java/awais/instagrabber/repositories/requests/StoryViewerOptions.java

2
app/src/main/java/awais/instagrabber/fragments/StoryListViewerFragment.java

@ -88,7 +88,7 @@ public final class StoryListViewerFragment extends Fragment implements SwipeRefr
public void onHighlightClick(final HighlightModel model, final int position) {
if (model == null) return;
final NavDirections action = StoryListViewerFragmentDirections
.actionStoryListFragmentToStoryViewerFragment(StoryViewerOptions.forStoryArchive(model.getId()));
.actionStoryListFragmentToStoryViewerFragment(StoryViewerOptions.forStoryArchive(position));
NavHostFragment.findNavController(StoryListViewerFragment.this).navigate(action);
}

4
app/src/main/java/awais/instagrabber/repositories/requests/StoryViewerOptions.java

@ -61,6 +61,10 @@ public class StoryViewerOptions implements Serializable {
return new StoryViewerOptions(id, Type.STORY_ARCHIVE);
}
public static StoryViewerOptions forStoryArchive(final int position) {
return new StoryViewerOptions(position, Type.STORY_ARCHIVE);
}
public long getId() {
return id;
}

Loading…
Cancel
Save