mirror of
https://github.com/oxen-io/session-android.git
synced 2024-11-27 20:15:21 +00:00
Start disappearing after sent
This commit is contained in:
parent
92b30739f0
commit
7d25fd9f4c
@ -554,7 +554,7 @@ class ConversationActivityV2 : PassphraseRequiredActionBarActivity(), InputBarDe
|
||||
val recipient = viewModel.recipient ?: return
|
||||
if (viewModel.recipient?.disappearingState == DisappearingState.LEGACY &&
|
||||
viewModel.expirationConfiguration?.isEnabled == true &&
|
||||
!ExpirationConfiguration.isNewConfigEnabled
|
||||
ExpirationConfiguration.isNewConfigEnabled
|
||||
) {
|
||||
binding?.outdatedBannerTextView?.text =
|
||||
resources.getString(R.string.activity_conversation_outdated_client_banner_text, recipient.name)
|
||||
|
@ -161,7 +161,7 @@ class Storage(context: Context, helper: SQLCipherOpenHelper) : Database(context,
|
||||
val expirationConfig = getExpirationConfiguration(message.threadID ?: -1)
|
||||
val expiresIn = expirationConfig?.durationSeconds ?: 0
|
||||
val expireStartedAt = if (expirationConfig?.expirationType == ExpirationType.DELETE_AFTER_SEND) {
|
||||
message.sentTimestamp!! + (expirationConfig.durationSeconds * 1000L)
|
||||
message.sentTimestamp!! + (expiresIn * 1000L)
|
||||
} else 0
|
||||
if (message.isMediaMessage() || attachments.isNotEmpty()) {
|
||||
val quote: Optional<QuoteModel> = if (quotes != null) Optional.of(quotes) else Optional.absent()
|
||||
@ -212,6 +212,7 @@ class Storage(context: Context, helper: SQLCipherOpenHelper) : Database(context,
|
||||
DatabaseComponent.get(context).lokiMessageDatabase().setMessageServerHash(id, serverHash)
|
||||
}
|
||||
}
|
||||
SSKEnvironment.shared.messageExpirationManager.startAnyExpiration(message.sentTimestamp!!, message.sender!!, expireStartedAt)
|
||||
return messageID
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user