mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-11-22 09:25:49 +03:00
Replacing the feature flag by the new lab flag
This commit is contained in:
parent
3503c24acc
commit
7b352b44dc
5 changed files with 6 additions and 17 deletions
|
@ -3239,7 +3239,8 @@
|
|||
<string name="labs_enable_element_call_permission_shortcuts_summary">Auto-approve Element Call widgets and grant camera / mic access</string>
|
||||
|
||||
<!-- Device Manager -->
|
||||
<string name="device_manager_settings_active_sessions_show_all">Show All Sessions (V2, WIP)</string>
|
||||
<!-- TODO remove this key -->
|
||||
<string name="device_manager_settings_active_sessions_show_all" tools:ignore="UnusedResources">Show All Sessions (V2, WIP)</string>
|
||||
<string name="device_manager_sessions_other_title">Other sessions</string>
|
||||
<string name="device_manager_sessions_other_description">For best security, verify your sessions and sign out from any session that you don’t recognize or use anymore.</string>
|
||||
<string name="a11y_device_manager_device_type_mobile">Mobile</string>
|
||||
|
|
|
@ -85,11 +85,6 @@ class DebugFeaturesStateFactory @Inject constructor(
|
|||
key = DebugFeatureKeys.newAppLayoutEnabled,
|
||||
factory = VectorFeatures::isNewAppLayoutFeatureEnabled
|
||||
),
|
||||
createBooleanFeature(
|
||||
label = "Enable New Device Management",
|
||||
key = DebugFeatureKeys.newDeviceManagementEnabled,
|
||||
factory = VectorFeatures::isNewDeviceManagementEnabled
|
||||
),
|
||||
createBooleanFeature(
|
||||
label = "Enable Voice Broadcast",
|
||||
key = DebugFeatureKeys.voiceBroadcastEnabled,
|
||||
|
|
|
@ -76,9 +76,6 @@ class DebugVectorFeatures(
|
|||
override fun isNewAppLayoutFeatureEnabled(): Boolean = read(DebugFeatureKeys.newAppLayoutEnabled)
|
||||
?: vectorFeatures.isNewAppLayoutFeatureEnabled()
|
||||
|
||||
override fun isNewDeviceManagementEnabled(): Boolean = read(DebugFeatureKeys.newDeviceManagementEnabled)
|
||||
?: vectorFeatures.isNewDeviceManagementEnabled()
|
||||
|
||||
override fun isVoiceBroadcastEnabled(): Boolean = read(DebugFeatureKeys.voiceBroadcastEnabled)
|
||||
?: vectorFeatures.isVoiceBroadcastEnabled()
|
||||
|
||||
|
@ -140,8 +137,6 @@ object DebugFeatureKeys {
|
|||
val liveLocationSharing = booleanPreferencesKey("live-location-sharing")
|
||||
val screenSharing = booleanPreferencesKey("screen-sharing")
|
||||
val forceUsageOfOpusEncoder = booleanPreferencesKey("force-usage-of-opus-encoder")
|
||||
val startDmOnFirstMsg = booleanPreferencesKey("start-dm-on-first-msg")
|
||||
val newAppLayoutEnabled = booleanPreferencesKey("new-app-layout-enabled")
|
||||
val newDeviceManagementEnabled = booleanPreferencesKey("new-device-management-enabled")
|
||||
val voiceBroadcastEnabled = booleanPreferencesKey("voice-broadcast-enabled")
|
||||
}
|
||||
|
|
|
@ -40,7 +40,6 @@ interface VectorFeatures {
|
|||
* use [VectorPreferences.isNewAppLayoutEnabled] instead.
|
||||
*/
|
||||
fun isNewAppLayoutFeatureEnabled(): Boolean
|
||||
fun isNewDeviceManagementEnabled(): Boolean
|
||||
fun isVoiceBroadcastEnabled(): Boolean
|
||||
}
|
||||
|
||||
|
@ -57,6 +56,5 @@ class DefaultVectorFeatures : VectorFeatures {
|
|||
override fun isLocationSharingEnabled() = Config.ENABLE_LOCATION_SHARING
|
||||
override fun forceUsageOfOpusEncoder(): Boolean = false
|
||||
override fun isNewAppLayoutFeatureEnabled(): Boolean = true
|
||||
override fun isNewDeviceManagementEnabled(): Boolean = false
|
||||
override fun isVoiceBroadcastEnabled(): Boolean = false
|
||||
}
|
||||
|
|
|
@ -51,7 +51,6 @@ import im.vector.app.core.utils.copyToClipboard
|
|||
import im.vector.app.core.utils.openFileSelection
|
||||
import im.vector.app.core.utils.toast
|
||||
import im.vector.app.databinding.DialogImportE2eKeysBinding
|
||||
import im.vector.app.features.VectorFeatures
|
||||
import im.vector.app.features.analytics.AnalyticsConfig
|
||||
import im.vector.app.features.analytics.plan.MobileScreen
|
||||
import im.vector.app.features.analytics.ui.consent.AnalyticsConsentViewActions
|
||||
|
@ -91,7 +90,7 @@ class VectorSettingsSecurityPrivacyFragment :
|
|||
@Inject lateinit var rawService: RawService
|
||||
@Inject lateinit var navigator: Navigator
|
||||
@Inject lateinit var analyticsConfig: AnalyticsConfig
|
||||
@Inject lateinit var vectorFeatures: VectorFeatures
|
||||
@Inject lateinit var vectorPreferences: VectorPreferences
|
||||
|
||||
override var titleRes = R.string.settings_security_and_privacy
|
||||
override val preferenceXmlRes = R.xml.vector_settings_security_privacy
|
||||
|
@ -562,11 +561,12 @@ class VectorSettingsSecurityPrivacyFragment :
|
|||
* Build the cryptography preference section.
|
||||
*/
|
||||
private fun refreshCryptographyPreference(devices: List<DeviceInfo>) {
|
||||
showDeviceListPref.isVisible = !vectorPreferences.isNewSessionManagerEnabled()
|
||||
showDeviceListPref.isEnabled = devices.isNotEmpty()
|
||||
showDeviceListPref.summary = resources.getQuantityString(R.plurals.settings_active_sessions_count, devices.size, devices.size)
|
||||
|
||||
showDevicesListV2Pref.isVisible = vectorFeatures.isNewDeviceManagementEnabled()
|
||||
showDevicesListV2Pref.title = getString(R.string.device_manager_settings_active_sessions_show_all)
|
||||
showDevicesListV2Pref.isVisible = vectorPreferences.isNewSessionManagerEnabled()
|
||||
showDevicesListV2Pref.isEnabled = devices.isNotEmpty()
|
||||
showDevicesListV2Pref.summary = resources.getQuantityString(R.plurals.settings_active_sessions_count, devices.size, devices.size)
|
||||
|
||||
val userId = session.myUserId
|
||||
|
|
Loading…
Reference in a new issue