From 371d06d6b558cd20817e854fd9b815218a1cf92b Mon Sep 17 00:00:00 2001 From: andrew Date: Fri, 1 Sep 2023 10:57:50 +0930 Subject: [PATCH] Simplify --- .../conversation/expiration/ExpirationSettingsViewModel.kt | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/org/thoughtcrime/securesms/conversation/expiration/ExpirationSettingsViewModel.kt b/app/src/main/java/org/thoughtcrime/securesms/conversation/expiration/ExpirationSettingsViewModel.kt index 8a32b0f669..623e7917dd 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/conversation/expiration/ExpirationSettingsViewModel.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/conversation/expiration/ExpirationSettingsViewModel.kt @@ -160,14 +160,13 @@ class ExpirationSettingsViewModel( val expiryChangeTimestampMs = SnodeAPI.nowWithOffset storage.setExpirationConfiguration(ExpirationConfiguration(threadId, mode, expiryChangeTimestampMs)) - ExpirationTimerUpdate(mode.expirySeconds.toInt()).apply { + val message = ExpirationTimerUpdate(mode.expirySeconds.toInt()).apply { sender = textSecurePreferences.getLocalNumber() recipient = address.serialize() sentTimestamp = expiryChangeTimestampMs - }.also { message -> - messageExpirationManager.setExpirationTimer(message, mode) - MessageSender.send(message, address) } + messageExpirationManager.setExpirationTimer(message, mode) + MessageSender.send(message, address) ConfigurationMessageUtilities.forceSyncConfigurationNowIfNeeded(application)