Browse Source
fix archive viewing bug
renovate/org.robolectric-robolectric-4.x
Austin Huang
4 years ago
No known key found for this signature in database
GPG Key ID: 84C23AA04587A91F
2 changed files with
5 additions and
1 deletions
-
app/src/main/java/awais/instagrabber/fragments/StoryListViewerFragment.java
-
app/src/main/java/awais/instagrabber/repositories/requests/StoryViewerOptions.java
|
@ -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); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
@ -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; |
|
|
} |
|
|
} |
|
|