From 2d77b2f425fd8e7c8fd1cdbc9cad84dd2e15904c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Saleniuk?= <30429749+saleniuk@users.noreply.github.com> Date: Wed, 3 Apr 2024 16:24:58 +0200 Subject: [PATCH] refactor: stop using and remove selfDeletionStartDate [WPB-6219] (#2839) --- .../android/ui/home/conversations/MessageExpiration.kt | 8 ++++---- kalium | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/src/main/kotlin/com/wire/android/ui/home/conversations/MessageExpiration.kt b/app/src/main/kotlin/com/wire/android/ui/home/conversations/MessageExpiration.kt index 9b36b5141b7..10e1052fdb1 100644 --- a/app/src/main/kotlin/com/wire/android/ui/home/conversations/MessageExpiration.kt +++ b/app/src/main/kotlin/com/wire/android/ui/home/conversations/MessageExpiration.kt @@ -99,10 +99,10 @@ class SelfDeletionTimerHelper(private val stringResourceProvider: StringResource selfDeletionStatus: Message.ExpirationData.SelfDeletionStatus?, expireAfter: Duration, ) = - if (selfDeletionStatus is Message.ExpirationData.SelfDeletionStatus.Started) selfDeletionStatus.selfDeletionStartDate + expireAfter - else { - val currentTime = currentTime() - currentTime + expireAfter + if (selfDeletionStatus is Message.ExpirationData.SelfDeletionStatus.Started) { + selfDeletionStatus.selfDeletionEndDate + } else { + currentTime() + expireAfter } sealed class SelfDeletionTimerState { diff --git a/kalium b/kalium index 0996f330649..3ff6e66006b 160000 --- a/kalium +++ b/kalium @@ -1 +1 @@ -Subproject commit 0996f330649a84709e044957db1fd36df2544326 +Subproject commit 3ff6e66006b022c2d9196b09602917761057df20