Browse Source

Null check current user. Fixes 1 part of https://github.com/austinhuang0131/barinsta/issues/816

renovate/org.robolectric-robolectric-4.x
Ammar Githam 4 years ago
parent
commit
565a8d3dd6
  1. 1
      app/src/main/java/awais/instagrabber/viewmodels/DirectThreadViewModel.java

1
app/src/main/java/awais/instagrabber/viewmodels/DirectThreadViewModel.java

@ -279,6 +279,7 @@ public class DirectThreadViewModel extends AndroidViewModel {
} }
public void markAsSeen() { public void markAsSeen() {
if (currentUser == null) return;
final DirectThread thread = getThread().getValue(); final DirectThread thread = getThread().getValue();
if (thread == null) return; if (thread == null) return;
final List<DirectItem> items = thread.getItems(); final List<DirectItem> items = thread.getItems();

Loading…
Cancel
Save