Skip to content

Commit

Permalink
refactor: stop using and remove selfDeletionStartDate [WPB-6219] (#2839)
Browse files Browse the repository at this point in the history
  • Loading branch information
saleniuk authored Apr 3, 2024
1 parent dc830ee commit 2d77b2f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion kalium
Submodule kalium updated 23 files
+1 βˆ’1 gradle/libs.versions.toml
+7 βˆ’10 logic/src/commonMain/kotlin/com/wire/kalium/logic/data/message/Message.kt
+10 βˆ’8 logic/src/commonMain/kotlin/com/wire/kalium/logic/data/message/MessageMapper.kt
+6 βˆ’22 logic/src/commonMain/kotlin/com/wire/kalium/logic/data/message/MessageRepository.kt
+1 βˆ’1 ...c/commonMain/kotlin/com/wire/kalium/logic/feature/message/ephemeral/DeleteEphemeralMessageEndDateUseCase.kt
+7 βˆ’14 logic/src/commonMain/kotlin/com/wire/kalium/logic/feature/message/ephemeral/EphemeralMessageDeletionHandler.kt
+4 βˆ’4 logic/src/commonMain/kotlin/com/wire/kalium/logic/feature/message/ephemeral/SelfDeletionEventLogger.kt
+2 βˆ’2 logic/src/commonTest/kotlin/com/wire/kalium/logic/data/message/MessageMapperTest.kt
+2 βˆ’2 ...st/kotlin/com/wire/kalium/logic/feature/message/ephemeral/DeleteEphemeralMessagesAfterEndDateUseCaseTest.kt
+5 βˆ’39 ...rc/commonTest/kotlin/com/wire/kalium/logic/feature/message/ephemeral/EphemeralMessageDeletionHandlerTest.kt
+0 βˆ’1 persistence/src/commonMain/db_user/com/wire/kalium/persistence/MessageDetailsView.sq
+17 βˆ’22 persistence/src/commonMain/db_user/com/wire/kalium/persistence/Messages.sq
+169 βˆ’0 persistence/src/commonMain/db_user/migrations/81.sqm
+2 βˆ’4 persistence/src/commonMain/kotlin/com/wire/kalium/persistence/dao/message/MessageDAO.kt
+4 βˆ’10 persistence/src/commonMain/kotlin/com/wire/kalium/persistence/dao/message/MessageDAOImpl.kt
+3 βˆ’3 persistence/src/commonMain/kotlin/com/wire/kalium/persistence/dao/message/MessageEntity.kt
+4 βˆ’1 persistence/src/commonMain/kotlin/com/wire/kalium/persistence/dao/message/MessageInsertExtension.kt
+4 βˆ’5 persistence/src/commonMain/kotlin/com/wire/kalium/persistence/dao/message/MessageMapper.kt
+0 βˆ’1 persistence/src/commonMain/kotlin/com/wire/kalium/persistence/db/TableMapper.kt
+1 βˆ’1 persistence/src/commonTest/kotlin/com/wire/kalium/persistence/backup/UserDatabaseDataGenerator.kt
+71 βˆ’28 persistence/src/commonTest/kotlin/com/wire/kalium/persistence/dao/message/MessageDAOTest.kt
+0 βˆ’2 persistence/src/commonTest/kotlin/com/wire/kalium/persistence/dao/message/MessageMapperTest.kt
+3 βˆ’3 persistence/src/commonTest/kotlin/com/wire/kalium/persistence/utils/stubs/MessageStubs.kt

0 comments on commit 2d77b2f

Please sign in to comment.