summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas <tschneider.ac@gmail.com>2023-06-08 16:27:46 +0200
committerThomas <tschneider.ac@gmail.com>2023-06-08 16:27:46 +0200
commit04355116f4cceffc2babc046c8df97d790e1b707 (patch)
treefa68385111643947d1b5cd37ce4581f0ef3f6858
parent9375abffd377d8556689e20ad2e7354260f1e46d (diff)
Fix a crash
-rw-r--r--app/src/main/java/app/fedilab/android/mastodon/helper/NotificationsHelper.java9
1 files changed, 5 insertions, 4 deletions
diff --git a/app/src/main/java/app/fedilab/android/mastodon/helper/NotificationsHelper.java b/app/src/main/java/app/fedilab/android/mastodon/helper/NotificationsHelper.java
index 32ac893fe..09cf2a906 100644
--- a/app/src/main/java/app/fedilab/android/mastodon/helper/NotificationsHelper.java
+++ b/app/src/main/java/app/fedilab/android/mastodon/helper/NotificationsHelper.java
@@ -95,8 +95,9 @@ public class NotificationsHelper {
boolean notif_report = prefs.getBoolean(context.getString(R.string.SET_NOTIF_ADMIN_REPORT), true);
//User disagree with all notifications
- if (!notif_follow && !notif_fav && !notif_mention && !notif_share && !notif_poll && !notif_status && !notif_updates && !notif_signup && !notif_report)
+ if (!notif_follow && !notif_fav && !notif_mention && !notif_share && !notif_poll && !notif_status && !notif_updates && !notif_signup && !notif_report) {
return; //Nothing is done
+ }
MastodonNotificationsService mastodonNotificationsService = init(context, slugArray[1]);
String finalLast_notifid = last_notifid;
@@ -123,10 +124,10 @@ public class NotificationsHelper {
} catch (Exception e) {
e.printStackTrace();
}
+ Handler mainHandler = new Handler(Looper.getMainLooper());
+ Runnable myRunnable = () -> onRetrieveNotifications(context, notifications, accountDb);
+ mainHandler.post(myRunnable);
}
- Handler mainHandler = new Handler(Looper.getMainLooper());
- Runnable myRunnable = () -> onRetrieveNotifications(context, notifications, accountDb);
- mainHandler.post(myRunnable);
}).start();
}