refactor: use just the storage setExpirationConfiguration function

This commit is contained in:
0x330a 2023-10-16 14:50:58 +11:00
parent 019a86482a
commit 2d0c4399c4
No known key found for this signature in database
GPG Key ID: 267811D6E6A2698C

View File

@ -505,7 +505,7 @@ open class Storage(
setExpirationConfiguration(currentExpiration) setExpirationConfiguration(currentExpiration)
} else { } else {
val expiration = ExpirationConfiguration(ourThread, userProfile.getNtsExpiry(), messageTimestamp) val expiration = ExpirationConfiguration(ourThread, userProfile.getNtsExpiry(), messageTimestamp)
DatabaseComponent.get(context).expirationConfigurationDatabase().setExpirationConfiguration(expiration) setExpirationConfiguration(expiration)
} }
} }
@ -648,9 +648,7 @@ open class Storage(
val newConfig = ExpirationConfiguration( val newConfig = ExpirationConfiguration(
conversationThreadId, mode, messageTimestamp conversationThreadId, mode, messageTimestamp
) )
DatabaseComponent.get(context) setExpirationConfiguration(newConfig)
.expirationConfigurationDatabase()
.setExpirationConfiguration(newConfig)
} }
} }
} }