Loading app/src/main/java/app/fedilab/android/helper/Helper.java +1 −4 Original line number Diff line number Diff line Loading @@ -1482,7 +1482,7 @@ public class Helper { message = message.substring(0, 499) + "…"; } }*/ notificationBuilder.setGroup(account.mastodon_account != null ? account.mastodon_account.acct : "" + "@" + account.instance) notificationBuilder.setGroup(account.mastodon_account != null ? account.mastodon_account.username + "@" + account.instance : "" + "@" + account.instance) .setContentIntent(pIntent) .setContentText(message); int ledColour = Color.BLUE; Loading @@ -1493,9 +1493,6 @@ public class Helper { prefColor = Integer.parseInt(sharedpreferences.getString(context.getString(R.string.SET_LED_COLOUR_VAL), String.valueOf(LED_COLOUR))); } switch (prefColor) { case 0: // BLUE ledColour = Color.BLUE; break; case 1: // CYAN ledColour = Color.CYAN; break; Loading app/src/main/java/app/fedilab/android/jobs/NotificationsWorker.java +4 −4 Original line number Diff line number Diff line Loading @@ -65,8 +65,8 @@ public class NotificationsWorker extends Worker { NotificationCompat.Builder notificationBuilder = new NotificationCompat.Builder(getApplicationContext(), CHANNEL_ID); notificationBuilder.setSmallIcon(R.drawable.ic_notification) .setLargeIcon(BitmapFactory.decodeResource(getApplicationContext().getResources(), R.drawable.ic_launcher_foreground)) .setContentTitle(getApplicationContext().getString(R.string.scheduled_toots)) .setContentText(getApplicationContext().getString(R.string.scheduled_toots)) .setContentTitle(getApplicationContext().getString(R.string.notifications)) .setContentText(getApplicationContext().getString(R.string.fetch_notifications)) .setDefaults(NotificationCompat.DEFAULT_ALL) .setPriority(Notification.PRIORITY_DEFAULT); return Futures.immediateFuture(new ForegroundInfo(FETCH_NOTIFICATION_CHANNEL_ID, notificationBuilder.build())); Loading @@ -85,8 +85,8 @@ public class NotificationsWorker extends Worker { NotificationCompat.Builder notificationBuilder = new NotificationCompat.Builder(getApplicationContext(), CHANNEL_ID); notificationBuilder.setSmallIcon(R.drawable.ic_notification) .setLargeIcon(BitmapFactory.decodeResource(getApplicationContext().getResources(), R.drawable.ic_launcher_foreground)) .setContentTitle(getApplicationContext().getString(R.string.scheduled_toots)) .setContentText(getApplicationContext().getString(R.string.scheduled_toots)) .setContentTitle(getApplicationContext().getString(R.string.notifications)) .setContentText(getApplicationContext().getString(R.string.fetch_notifications)) .setDefaults(NotificationCompat.DEFAULT_ALL) .setPriority(Notification.PRIORITY_DEFAULT); return new ForegroundInfo(FETCH_NOTIFICATION_CHANNEL_ID, notificationBuilder.build()); Loading app/src/main/java/app/fedilab/android/viewmodel/mastodon/StatusesVM.java +1 −2 Original line number Diff line number Diff line Loading @@ -325,12 +325,11 @@ public class StatusesVM extends AndroidViewModel { //The status must also be deleted in cache try { BaseAccount account = new app.fedilab.android.client.entities.app.Account(getApplication().getApplicationContext()).getAccountByToken(token); new StatusCache(getApplication().getApplicationContext()).deleteStatus(id, account.instance); new StatusCache(getApplication().getApplicationContext()).deleteStatus(account.instance, id); } catch (DBException e) { e.printStackTrace(); } Handler mainHandler = new Handler(Looper.getMainLooper()); Status finalStatus = status; Runnable myRunnable = () -> statusMutableLiveData.setValue(finalStatus); Loading app/src/main/res/values/strings.xml +1 −0 Original line number Diff line number Diff line Loading @@ -1474,4 +1474,5 @@ <string name="cached_messages">Cached message</string> <string name="reply">Reply</string> <string name="display_options">Display options</string> <string name="fetch_notifications">Fetch notifications</string> </resources> Loading
app/src/main/java/app/fedilab/android/helper/Helper.java +1 −4 Original line number Diff line number Diff line Loading @@ -1482,7 +1482,7 @@ public class Helper { message = message.substring(0, 499) + "…"; } }*/ notificationBuilder.setGroup(account.mastodon_account != null ? account.mastodon_account.acct : "" + "@" + account.instance) notificationBuilder.setGroup(account.mastodon_account != null ? account.mastodon_account.username + "@" + account.instance : "" + "@" + account.instance) .setContentIntent(pIntent) .setContentText(message); int ledColour = Color.BLUE; Loading @@ -1493,9 +1493,6 @@ public class Helper { prefColor = Integer.parseInt(sharedpreferences.getString(context.getString(R.string.SET_LED_COLOUR_VAL), String.valueOf(LED_COLOUR))); } switch (prefColor) { case 0: // BLUE ledColour = Color.BLUE; break; case 1: // CYAN ledColour = Color.CYAN; break; Loading
app/src/main/java/app/fedilab/android/jobs/NotificationsWorker.java +4 −4 Original line number Diff line number Diff line Loading @@ -65,8 +65,8 @@ public class NotificationsWorker extends Worker { NotificationCompat.Builder notificationBuilder = new NotificationCompat.Builder(getApplicationContext(), CHANNEL_ID); notificationBuilder.setSmallIcon(R.drawable.ic_notification) .setLargeIcon(BitmapFactory.decodeResource(getApplicationContext().getResources(), R.drawable.ic_launcher_foreground)) .setContentTitle(getApplicationContext().getString(R.string.scheduled_toots)) .setContentText(getApplicationContext().getString(R.string.scheduled_toots)) .setContentTitle(getApplicationContext().getString(R.string.notifications)) .setContentText(getApplicationContext().getString(R.string.fetch_notifications)) .setDefaults(NotificationCompat.DEFAULT_ALL) .setPriority(Notification.PRIORITY_DEFAULT); return Futures.immediateFuture(new ForegroundInfo(FETCH_NOTIFICATION_CHANNEL_ID, notificationBuilder.build())); Loading @@ -85,8 +85,8 @@ public class NotificationsWorker extends Worker { NotificationCompat.Builder notificationBuilder = new NotificationCompat.Builder(getApplicationContext(), CHANNEL_ID); notificationBuilder.setSmallIcon(R.drawable.ic_notification) .setLargeIcon(BitmapFactory.decodeResource(getApplicationContext().getResources(), R.drawable.ic_launcher_foreground)) .setContentTitle(getApplicationContext().getString(R.string.scheduled_toots)) .setContentText(getApplicationContext().getString(R.string.scheduled_toots)) .setContentTitle(getApplicationContext().getString(R.string.notifications)) .setContentText(getApplicationContext().getString(R.string.fetch_notifications)) .setDefaults(NotificationCompat.DEFAULT_ALL) .setPriority(Notification.PRIORITY_DEFAULT); return new ForegroundInfo(FETCH_NOTIFICATION_CHANNEL_ID, notificationBuilder.build()); Loading
app/src/main/java/app/fedilab/android/viewmodel/mastodon/StatusesVM.java +1 −2 Original line number Diff line number Diff line Loading @@ -325,12 +325,11 @@ public class StatusesVM extends AndroidViewModel { //The status must also be deleted in cache try { BaseAccount account = new app.fedilab.android.client.entities.app.Account(getApplication().getApplicationContext()).getAccountByToken(token); new StatusCache(getApplication().getApplicationContext()).deleteStatus(id, account.instance); new StatusCache(getApplication().getApplicationContext()).deleteStatus(account.instance, id); } catch (DBException e) { e.printStackTrace(); } Handler mainHandler = new Handler(Looper.getMainLooper()); Status finalStatus = status; Runnable myRunnable = () -> statusMutableLiveData.setValue(finalStatus); Loading
app/src/main/res/values/strings.xml +1 −0 Original line number Diff line number Diff line Loading @@ -1474,4 +1474,5 @@ <string name="cached_messages">Cached message</string> <string name="reply">Reply</string> <string name="display_options">Display options</string> <string name="fetch_notifications">Fetch notifications</string> </resources>