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

Commit 4330af6f authored by cketti's avatar cketti
Browse files

Merge pull request #983 from k9mail/vector_drawables_cleanup

Notification icons cleanup
parents 9e8bd2e3 5ceb3844
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -52,6 +52,8 @@ android {
        minSdkVersion 15
        targetSdkVersion 22

        generatedDensities = ['mdpi', 'hdpi', 'xhdpi']

        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }

+1 −2
Original line number Diff line number Diff line
@@ -70,7 +70,6 @@ abstract class BaseNotifications {
    }

    private int getNewMailNotificationIcon() {
        return controller.platformSupportsVectorDrawables() ?
                R.drawable.ic_notify_new_mail_vector : R.drawable.ic_notify_new_mail;
        return R.drawable.notification_icon_new_mail;
    }
}
+1 −2
Original line number Diff line number Diff line
@@ -65,8 +65,7 @@ class CertificateErrorNotifications {

    private int getCertificateErrorNotificationIcon() {
        //TODO: Use a different icon for certificate error notifications
        return controller.platformSupportsVectorDrawables() ?
                R.drawable.ic_notify_new_mail_vector : R.drawable.ic_notify_new_mail;
        return R.drawable.notification_icon_new_mail;
    }

    private NotificationManagerCompat getNotificationManager() {
+3 −7
Original line number Diff line number Diff line
@@ -239,19 +239,15 @@ class DeviceNotifications extends BaseNotifications {
    }

    private int getMarkAsReadActionIcon() {
        return controller.platformSupportsVectorDrawables() ?
                R.drawable.ic_action_mark_as_read_dark_vector : R.drawable.ic_action_mark_as_read_dark;
        return R.drawable.notification_action_mark_as_read;
    }

    private int getDeleteActionIcon() {
        return NotificationController.platformSupportsLockScreenNotifications() ?
                R.drawable.ic_action_delete_dark_vector : R.drawable.ic_action_delete_dark;
        return R.drawable.notification_action_delete;
    }

    private int getReplyActionIcon() {
        return controller.platformSupportsVectorDrawables() ?
                R.drawable.ic_action_single_message_options_dark_vector :
                R.drawable.ic_action_single_message_options_dark;
        return R.drawable.notification_action_reply;
    }

    protected InboxStyle createInboxStyle(Builder builder) {
+1 −1
Original line number Diff line number Diff line
@@ -96,7 +96,7 @@ class LockScreenNotification {
                newMessages, newMessages);

        return controller.createNotificationBuilder()
                .setSmallIcon(R.drawable.ic_notify_new_mail_vector)
                .setSmallIcon(R.drawable.notification_icon_new_mail)
                .setColor(account.getChipColor())
                .setNumber(unreadCount)
                .setContentTitle(title);
Loading