Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a1b3cc8f authored by Oji Ofong's avatar Oji Ofong
Browse files

Improve notification channel

parent baa653ba
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -33,7 +33,7 @@ class AuthenticationErrorNotifications {
        String text =  resourceProvider.authenticationErrorBody(account.getDescription());

        NotificationCompat.Builder builder = notificationHelper
                .createNotificationBuilder(account, NotificationChannelUtils.Type.OTHER)
                .createNotificationBuilder(account, NotificationChannelUtils.ChannelType.MISCELLANEOUS)
                .setSmallIcon(resourceProvider.getIconWarning())
                .setWhen(System.currentTimeMillis())
                .setAutoCancel(true)
+2 −1
Original line number Diff line number Diff line
@@ -53,7 +53,8 @@ abstract class BaseNotifications {
    }

    protected NotificationCompat.Builder createAndInitializeNotificationBuilder(Account account) {
        return notificationHelper.createNotificationBuilder(account, NotificationChannelUtils.Type.MESSAGES)
        return notificationHelper.createNotificationBuilder(account,
                NotificationChannelUtils.ChannelType.MESSAGES)
                .setSmallIcon(getNewMailNotificationIcon())
                .setColor(account.getChipColor())
                .setWhen(System.currentTimeMillis())
+1 −1
Original line number Diff line number Diff line
@@ -32,7 +32,7 @@ class CertificateErrorNotifications {
        String text = resourceProvider.certificateErrorBody();

        NotificationCompat.Builder builder = notificationHelper
                .createNotificationBuilder(account, NotificationChannelUtils.Type.OTHER)
                .createNotificationBuilder(account, NotificationChannelUtils.ChannelType.MISCELLANEOUS)
                .setSmallIcon(resourceProvider.getIconWarning())
                .setWhen(System.currentTimeMillis())
                .setAutoCancel(true)
+2 −1
Original line number Diff line number Diff line
@@ -6,7 +6,8 @@ import org.koin.dsl.module.applicationContext
val coreNotificationModule = applicationContext {
    bean { NotificationController(get(), get(), get(), get(), get()) }
    bean { NotificationManagerCompat.from(get()) }
    bean { NotificationHelper(get(), get()) }
    bean { NotificationHelper(get(), get(), get()) }
    bean { NotificationChannelUtils(get(), get()) }
    bean { CertificateErrorNotifications(get(), get(), get()) }
    bean { AuthenticationErrorNotifications(get(), get(), get()) }
    bean { SyncNotifications(get(), get(), get()) }
+2 −1
Original line number Diff line number Diff line
@@ -88,7 +88,8 @@ class LockScreenNotification {
        int unreadCount = notificationData.getUnreadMessageCount();
        String title = resourceProvider.newMessagesTitle(newMessages);

        return notificationHelper.createNotificationBuilder(account, NotificationChannelUtils.Type.MESSAGES)
        return notificationHelper.createNotificationBuilder(account,
                NotificationChannelUtils.ChannelType.MESSAGES)
                .setSmallIcon(resourceProvider.getIconNewMail())
                .setColor(account.getChipColor())
                .setNumber(unreadCount)
Loading