Browse Source

fix navigation actions for fdroid, part 2

renovate/org.robolectric-robolectric-4.x v19.2.0
Austin Huang 4 years ago
parent
commit
d569e718a9
No known key found for this signature in database GPG Key ID: 84C23AA04587A91F
  1. 10
      app/src/main/java/awais/instagrabber/fragments/NotificationsViewerFragment.java

10
app/src/main/java/awais/instagrabber/fragments/NotificationsViewerFragment.java

@ -93,12 +93,12 @@ public final class NotificationsViewerFragment extends Fragment implements Swipe
final NotificationImage notificationImage = model.getArgs().getMedia().get(0); final NotificationImage notificationImage = model.getArgs().getMedia().get(0);
final long mediaId = Long.parseLong(notificationImage.getId().split("_")[0]); final long mediaId = Long.parseLong(notificationImage.getId().split("_")[0]);
if (model.getType() == NotificationType.RESPONDED_STORY) { if (model.getType() == NotificationType.RESPONDED_STORY) {
final NavDirections action = NotificationsViewerFragmentDirections
.actionNotificationsToStory(
StoryViewerOptions.forStory(
final StoryViewerOptions options = StoryViewerOptions.forStory(
mediaId, mediaId,
model.getArgs().getUsername()));
NavHostFragment.findNavController(NotificationsViewerFragment.this).navigate(action);
model.getArgs().getUsername());
final Bundle bundle = new Bundle();
bundle.putSerializable("options", options);
NavHostFragment.findNavController(NotificationsViewerFragment.this).navigate(R.id.action_notifications_to_story, bundle);
} else { } else {
final AlertDialog alertDialog = new AlertDialog.Builder(context) final AlertDialog alertDialog = new AlertDialog.Builder(context)
.setCancelable(false) .setCancelable(false)

Loading…
Cancel
Save