mirror of
https://github.com/KokaKiwi/BarInsta
synced 2024-11-26 08:37:29 +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) {
|
if (isHighlight) {
|
||||||
final HighlightsViewModel highlightsViewModel = (HighlightsViewModel) viewModel;
|
final HighlightsViewModel highlightsViewModel = (HighlightsViewModel) viewModel;
|
||||||
final List<HighlightModel> models = highlightsViewModel.getList().getValue();
|
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);
|
final HighlightModel model = models.get(currentFeedStoryIndex);
|
||||||
currentStoryMediaId = model.getId();
|
currentStoryMediaId = model.getId();
|
||||||
currentStoryUsername = model.getTitle();
|
currentStoryUsername = model.getTitle();
|
||||||
|
Loading…
Reference in New Issue
Block a user