mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-02 00:17:41 +01:00
Replace Environment bool with a RemoteConfig value.
This commit is contained in:
@@ -14,7 +14,7 @@ import org.thoughtcrime.securesms.jobs.LocalBackupJob
|
||||
import org.thoughtcrime.securesms.keyvalue.SignalStore
|
||||
import org.thoughtcrime.securesms.util.BackupUtil
|
||||
import org.thoughtcrime.securesms.util.ConversationUtil
|
||||
import org.thoughtcrime.securesms.util.Environment
|
||||
import org.thoughtcrime.securesms.util.RemoteConfig
|
||||
import org.thoughtcrime.securesms.util.TextSecurePreferences
|
||||
import org.thoughtcrime.securesms.util.ThrottledDebouncer
|
||||
|
||||
@@ -35,7 +35,7 @@ class ChatsSettingsViewModel @JvmOverloads constructor(
|
||||
folderCount = 0,
|
||||
userUnregistered = TextSecurePreferences.isUnauthorizedReceived(AppDependencies.application) || !SignalStore.account.isRegistered,
|
||||
clientDeprecated = SignalStore.misc.isClientDeprecated,
|
||||
isPlaintextExportEnabled = Environment.Backups.isLocalPlaintextBackupExportEnabled(),
|
||||
isPlaintextExportEnabled = RemoteConfig.localPlaintextExport,
|
||||
chatExportState = ChatExportState.None
|
||||
)
|
||||
)
|
||||
|
||||
@@ -27,10 +27,6 @@ object Environment {
|
||||
|
||||
@JvmStatic
|
||||
fun isNewFormatSupportedForLocalBackup(): Boolean = true
|
||||
|
||||
fun isLocalPlaintextBackupExportEnabled(): Boolean {
|
||||
return isInternal()
|
||||
}
|
||||
}
|
||||
|
||||
object Donations {
|
||||
|
||||
@@ -1348,5 +1348,16 @@ object RemoteConfig {
|
||||
hotSwappable = false
|
||||
)
|
||||
|
||||
/**
|
||||
* Whether local plaintext export is available
|
||||
*/
|
||||
@JvmStatic
|
||||
@get:JvmName("localPlaintextExport")
|
||||
val localPlaintextExport: Boolean by remoteBoolean(
|
||||
key = "android.localPlaintextExport",
|
||||
defaultValue = false,
|
||||
hotSwappable = false
|
||||
)
|
||||
|
||||
// endregion
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user