Refresh the app's "Conversations" list when there are none

Also hide the header in that case (simiarly to bubbles).

Test: atest (new) + manual
Fixes: 273748214
Change-Id: I4f758a0bf5bb8cfa91701185f1568b358d8903a0
This commit is contained in:
Matías Hernández
2023-03-16 15:04:33 +01:00
parent 2d53aabf74
commit a5eea1c034
2 changed files with 175 additions and 6 deletions

View File

@@ -127,15 +127,13 @@ public class AppConversationListPreferenceController extends NotificationPrefere
return;
}
if (!mConversations.isEmpty()) {
// TODO: if preference has children, compare with newly loaded list
mPreference.removeAll();
mPreference.setTitle(getTitleResId());
populateConversations();
}
mPreference.setTitle(getTitleResId());
populateConversations();
}
private void populateConversations() {
mPreference.removeAll();
mPreference.setVisible(!mConversations.isEmpty());
for (ConversationChannelWrapper conversation : mConversations) {
if (conversation.getNotificationChannel().isDemoted()) {
continue;