From 417e801811bbca0eff1fc7490da7d451220b7504 Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Tue, 7 Mar 2023 16:13:25 +0100 Subject: [PATCH] unarchive chat when receiving message --- .../im/conversations/android/transformer/Transformer.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/src/main/java/im/conversations/android/transformer/Transformer.java b/app/src/main/java/im/conversations/android/transformer/Transformer.java index b7dfc2a9e..36a72aca0 100644 --- a/app/src/main/java/im/conversations/android/transformer/Transformer.java +++ b/app/src/main/java/im/conversations/android/transformer/Transformer.java @@ -159,6 +159,10 @@ public class Transformer { } else { messageIdentifier = database.messageDao().getOrCreateMessage(chat, transformation); + if (chat.archived) { + // only for "proper" messages do we want to unarchive chats + database.chatDao().setArchived(chat.id, false); + } } } catch (final IllegalStateException e) { LOGGER.warn("Could not get message identifier", e);