fix crash when instance not yet loaded

closes sk22#474
This commit is contained in:
sk
2023-03-24 19:04:13 +01:00
parent 2d31b726ac
commit a58640a718

View File

@@ -289,6 +289,7 @@ public class HomeFragment extends AppKitFragment implements OnBackPressedListene
public void updateNotificationBadge() {
AccountSession session = AccountSessionManager.getInstance().getAccount(accountID);
Instance instance = AccountSessionManager.getInstance().getInstanceInfo(session.domain);
if (instance == null) return;
new GetNotifications(null, 1, EnumSet.allOf(Notification.Type.class), instance.pleroma != null)
.setCallback(new Callback<>() {