refactor(notifications-tab/badge): use improved implementation

Removes the now unecessary network call, by hooking into the notification reciever instead.
This commit is contained in:
FineFindus
2023-03-01 22:00:49 +01:00
parent 4ecd525f13
commit ac5615497b
3 changed files with 8 additions and 22 deletions

View File

@@ -76,6 +76,8 @@ public class PushNotificationReceiver extends BroadcastReceiver{
@Override
public void onSuccess(org.joinmastodon.android.model.Notification result){
MastodonAPIController.runInBackground(()->PushNotificationReceiver.this.notify(context, pn, accountID, result));
GlobalUserPreferences.unreadNotifications = true;
GlobalUserPreferences.save();
}
@Override