fix(StoryViewerFragment): wrong viewModel superclass assigned on init
This commit is contained in:
parent
358beffa9d
commit
622363c2c6
@ -304,11 +304,18 @@ public class StoryViewerFragment extends Fragment {
|
|||||||
// isNotification = fragmentArgs.getIsNotification();
|
// isNotification = fragmentArgs.getIsNotification();
|
||||||
final Type type = options.getType();
|
final Type type = options.getType();
|
||||||
if (currentFeedStoryIndex >= 0) {
|
if (currentFeedStoryIndex >= 0) {
|
||||||
viewModel = type == Type.HIGHLIGHT
|
switch (type) {
|
||||||
? type == Type.STORY_ARCHIVE
|
case HIGHLIGHT:
|
||||||
? new ViewModelProvider(fragmentActivity).get(ArchivesViewModel.class)
|
viewModel = new ViewModelProvider(fragmentActivity).get(HighlightsViewModel.class);
|
||||||
: new ViewModelProvider(fragmentActivity).get(HighlightsViewModel.class)
|
break;
|
||||||
: new ViewModelProvider(fragmentActivity).get(FeedStoriesViewModel.class);
|
case STORY_ARCHIVE:
|
||||||
|
viewModel = new ViewModelProvider(fragmentActivity).get(ArchivesViewModel.class);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
case FEED_STORY_POSITION:
|
||||||
|
viewModel = new ViewModelProvider(fragmentActivity).get(FeedStoriesViewModel.class);
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
setupStories();
|
setupStories();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user