From 0fa99226e188d8c701be4c6a718cf8fcf0a3b4f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A1s=20Kurucz?= Date: Wed, 23 Nov 2022 13:24:36 +0000 Subject: [PATCH] Allow to block/unblock Conversation Notifications from Settings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The user can end up in a state where the Channel of a Conversation is blocked (has an importance of 0). Currently there was no way to unblock it, because we didn't allow it from the Settings. Therefore now the option to block/unblock is added to the Conversation Settings page. Fixes: 255062535 Test: Block/Unblock a Conversation from Settings Test: Mark a notification blocked and conversation by clicking the “Show notifications” toggle and the “This is a conversation” button at once. Now unblock it from the Settings. Change-Id: I06778d259155d87d6af4bdb7013cd3b6c9a2e5ee --- res/xml/conversation_notification_settings.xml | 3 +++ .../notification/app/ConversationNotificationSettings.java | 1 + 2 files changed, 4 insertions(+) diff --git a/res/xml/conversation_notification_settings.xml b/res/xml/conversation_notification_settings.xml index af821400ce3..9078e2d0905 100644 --- a/res/xml/conversation_notification_settings.xml +++ b/res/xml/conversation_notification_settings.xml @@ -25,6 +25,9 @@ android:layout="@layout/settings_entity_header" settings:allowDividerBelow="true"/> + + createPreferenceControllers(Context context) { mControllers = new ArrayList<>(); mControllers.add(new ConversationHeaderPreferenceController(context, this)); + mControllers.add(new BlockPreferenceController(context, mDependentFieldListener, mBackend)); mControllers.add(new ConversationPriorityPreferenceController( context, mBackend, mDependentFieldListener)); mControllers.add(new HighImportancePreferenceController(