fix: activate the banner only if conversation is in expiring mode not none

This commit is contained in:
0x330a
2023-11-16 11:44:21 +11:00
parent 4ed5b57abd
commit d6ba78606e
2 changed files with 10 additions and 6 deletions

View File

@@ -1791,7 +1791,9 @@ open class Storage(
val recipientDb = DatabaseComponent.get(context).recipientDatabase()
recipientDb.setDisappearingState(recipient, disappearingState);
val currentLegacyRecipient = lokiDb.getLastLegacySenderAddress(recipientAddress)
val currentExpiry = getExpirationConfiguration(threadID)
if (disappearingState == DisappearingState.LEGACY
&& currentExpiry?.isEnabled == true
&& ExpirationConfiguration.isNewConfigEnabled) { // only set "this person is legacy" if new config enabled
lokiDb.setLastLegacySenderAddress(recipientAddress, messageSender)
} else if (messageSender == currentLegacyRecipient) {