From 657e3e2b59ea0e9367813946f2512489d0cf81c7 Mon Sep 17 00:00:00 2001 From: SessionHero01 <180888785+SessionHero01@users.noreply.github.com> Date: Tue, 18 Feb 2025 13:58:03 +1100 Subject: [PATCH] Update user config whenever group name changes (#956) --- .../thoughtcrime/securesms/configs/ConfigToDatabaseSync.kt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/src/main/java/org/thoughtcrime/securesms/configs/ConfigToDatabaseSync.kt b/app/src/main/java/org/thoughtcrime/securesms/configs/ConfigToDatabaseSync.kt index 6635968231..8d7a70c141 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/configs/ConfigToDatabaseSync.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/configs/ConfigToDatabaseSync.kt @@ -191,6 +191,13 @@ class ConfigToDatabaseSync @Inject constructor( recipientDatabase.setProfileName(recipient, groupInfoConfig.name) profileManager.setName(context, recipient, groupInfoConfig.name.orEmpty()) + // Also update the name in the user groups config + configFactory.withMutableUserConfigs { configs -> + configs.userGroups.getClosedGroup(groupInfoConfig.id.hexString)?.let { group -> + configs.userGroups.set(group.copy(name = groupInfoConfig.name.orEmpty())) + } + } + if (groupInfoConfig.destroyed) { handleDestroyedGroup(threadId = threadId) } else {