mirror of
https://github.com/oxen-io/session-android.git
synced 2025-02-20 05:28:27 +00:00
fix: disappearing viewmodel tests (#1432)
This commit is contained in:
parent
7bcf823740
commit
3dee7ec6bd
@ -53,6 +53,7 @@ class DisappearingMessagesViewModelTest {
|
||||
@Mock lateinit var application: Application
|
||||
@Mock lateinit var textSecurePreferences: TextSecurePreferences
|
||||
@Mock lateinit var messageExpirationManager: SSKEnvironment.MessageExpirationManagerProtocol
|
||||
@Mock lateinit var disappearingMessages: DisappearingMessages
|
||||
@Mock lateinit var threadDb: ThreadDatabase
|
||||
@Mock lateinit var groupDb: GroupDatabase
|
||||
@Mock lateinit var storage: Storage
|
||||
@ -114,9 +115,9 @@ class DisappearingMessagesViewModelTest {
|
||||
isSelfAdmin = true,
|
||||
address = LOCAL_ADDRESS,
|
||||
isNoteToSelf = true,
|
||||
expiryMode = ExpiryMode.NONE,
|
||||
expiryMode = ExpiryMode.Legacy(0),
|
||||
isNewConfigEnabled = false,
|
||||
persistedMode = ExpiryMode.NONE,
|
||||
persistedMode = ExpiryMode.Legacy(0),
|
||||
showDebugOptions = false
|
||||
)
|
||||
)
|
||||
@ -127,7 +128,7 @@ class DisappearingMessagesViewModelTest {
|
||||
UiState(
|
||||
OptionsCard(
|
||||
R.string.activity_disappearing_messages_timer,
|
||||
typeOption(ExpiryMode.NONE, selected = true),
|
||||
typeOption(ExpiryMode.NONE, selected = false),
|
||||
timeOption(ExpiryType.LEGACY, 12.hours),
|
||||
timeOption(ExpiryType.LEGACY, 1.days),
|
||||
timeOption(ExpiryType.LEGACY, 7.days),
|
||||
@ -555,6 +556,7 @@ class DisappearingMessagesViewModelTest {
|
||||
application,
|
||||
textSecurePreferences,
|
||||
messageExpirationManager,
|
||||
disappearingMessages,
|
||||
threadDb,
|
||||
groupDb,
|
||||
storage,
|
||||
|
@ -1,7 +1,6 @@
|
||||
package org.session.libsession.messaging.messages
|
||||
|
||||
import network.loki.messenger.libsession_util.util.ExpiryMode
|
||||
import org.session.libsession.snode.SnodeAPI
|
||||
|
||||
data class ExpirationConfiguration(
|
||||
val threadId: Long = -1,
|
||||
@ -11,7 +10,7 @@ data class ExpirationConfiguration(
|
||||
val isEnabled = expiryMode.expirySeconds > 0
|
||||
|
||||
companion object {
|
||||
val isNewConfigEnabled = SnodeAPI.nowWithOffset >= 1710284400000
|
||||
val isNewConfigEnabled = true
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user