1
0
mirror of https://github.com/KokaKiwi/BarInsta synced 2024-11-22 22:57:29 +00:00

fix archive viewing bug

This commit is contained in:
Austin Huang 2021-05-21 14:21:44 -04:00
parent 397829942f
commit 98d7260927
No known key found for this signature in database
GPG Key ID: 84C23AA04587A91F
2 changed files with 5 additions and 1 deletions

View File

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

View File

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