diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index b702b7ec9..5013ae037 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -24,7 +24,7 @@ mastodonLists = (List) b.getSerializable(Helper.RECEIVE_MASTODON_LIST); - if (mastodonLists.size() == 0) { + if (mastodonLists != null && mastodonLists.size() == 0) { mastodonLists = null; } redrawPinned(mastodonLists); @@ -1228,9 +1228,9 @@ public abstract class BaseMainActivity extends BaseActivity implements NetworkSt //Fetch remote lists for the authenticated account and update them new ViewModelProvider(BaseMainActivity.this).get(TimelinesVM.class).getLists(currentInstance, currentToken) .observe(this, mastodonLists -> { - if (mastodonLists.size() == 0) { - mastodonLists = null; - } + if (mastodonLists != null && mastodonLists.size() == 0) { + mastodonLists = null; + } PinnedTimelineHelper.redrawTopBarPinned(BaseMainActivity.this, binding, pinned, bottomMenu, mastodonLists); } );