mirror of
https://github.com/KokaKiwi/BarInsta
synced 2024-11-04 14:17:30 +00:00
Check highlight list before accessing. Fixes https://github.com/austinhuang0131/barinsta/issues/295
This commit is contained in:
parent
f01815f4ae
commit
e3cc99f62f
@ -484,7 +484,7 @@ public class StoryViewerFragment extends Fragment {
|
||||
if (isHighlight) {
|
||||
final HighlightsViewModel highlightsViewModel = (HighlightsViewModel) viewModel;
|
||||
final List<HighlightModel> models = highlightsViewModel.getList().getValue();
|
||||
if (models == null) return;
|
||||
if (models == null || models.isEmpty() || currentFeedStoryIndex >= models.size()) return;
|
||||
final HighlightModel model = models.get(currentFeedStoryIndex);
|
||||
currentStoryMediaId = model.getId();
|
||||
currentStoryUsername = model.getTitle();
|
||||
|
Loading…
Reference in New Issue
Block a user