From d7b7b11cdf2988b07a2298b3b453ca46b810cf2c Mon Sep 17 00:00:00 2001 From: Christian Basler Date: Tue, 27 Feb 2018 06:43:45 +0100 Subject: [PATCH] Fix deleting messages from archive --- app/src/main/java/ch/dissem/apps/abit/service/Singleton.kt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/src/main/java/ch/dissem/apps/abit/service/Singleton.kt b/app/src/main/java/ch/dissem/apps/abit/service/Singleton.kt index 1ecfd10..b311064 100644 --- a/app/src/main/java/ch/dissem/apps/abit/service/Singleton.kt +++ b/app/src/main/java/ch/dissem/apps/abit/service/Singleton.kt @@ -66,6 +66,10 @@ object Singleton { // work-around for messages that are deleted from unread, which already have the unread label removed swipeableMessageAdapter.remove(message) } + label == AndroidLabelRepository.LABEL_ARCHIVE && !added.isEmpty() -> { + // work-around for messages in archive, which isn't an actual label but an absence of labels + swipeableMessageAdapter.remove(message) + } added.contains(label) -> { // in most cases, top should be the correct position, but time will show if // the message should be properly sorted in