Disable setting for url previews in encrypted chats for disabled previews

Change-Id: I6af98d60a2c73ddccf6fd6b3e729689e601c185d
This commit is contained in:
SpiritCroc 2020-12-27 09:44:54 +01:00
parent 8c2dbc342b
commit fcf623ce06
2 changed files with 3 additions and 1 deletions

View File

@ -186,7 +186,7 @@ class VectorPreferences @Inject constructor(private val context: Context) {
private const val SETTINGS_UNIMPORTANT_COUNTER_BADGE = "SETTINGS_UNIMPORTANT_COUNTER_BADGE"
private const val SETTINGS_SIMPLIFIED_MODE = "SETTINGS_SIMPLIFIED_MODE"
private const val SETTINGS_LABS_ALLOW_MARK_UNREAD = "SETTINGS_LABS_ALLOW_MARK_UNREAD"
private const val SETTINGS_ALLOW_URL_PREVIEW_IN_ENCRYPTED_ROOM_KEY = "SETTINGS_ALLOW_URL_PREVIEW_IN_ENCRYPTED_ROOM_KEY"
const val SETTINGS_ALLOW_URL_PREVIEW_IN_ENCRYPTED_ROOM_KEY = "SETTINGS_ALLOW_URL_PREVIEW_IN_ENCRYPTED_ROOM_KEY"
private const val DID_ASK_TO_ENABLE_SESSION_PUSH = "DID_ASK_TO_ENABLE_SESSION_PUSH"

View File

@ -58,5 +58,7 @@ class VectorSettingsLabsFragment @Inject constructor(
}
}
*/
findPreference<VectorSwitchPreference>(VectorPreferences.SETTINGS_ALLOW_URL_PREVIEW_IN_ENCRYPTED_ROOM_KEY)?.isEnabled = vectorPreferences.showUrlPreviews()
}
}