mirror of
https://github.com/element-hq/element-android
synced 2024-11-28 05:31:21 +03:00
Settings: rename "developer mode" to "advanced settings"
This commit is contained in:
parent
1bd85082c3
commit
a00f51a264
6 changed files with 40 additions and 41 deletions
|
@ -86,7 +86,7 @@ class RageShake @Inject constructor(private val activity: AppCompatActivity,
|
|||
}
|
||||
|
||||
private fun openSettings() {
|
||||
navigator.openSettings(activity, VectorSettingsActivity.EXTRA_DIRECT_ACCESS_DEVELOPER)
|
||||
navigator.openSettings(activity, VectorSettingsActivity.EXTRA_DIRECT_ACCESS_ADVANCED_SETTINGS)
|
||||
}
|
||||
|
||||
companion object {
|
||||
|
|
|
@ -55,9 +55,9 @@ class VectorSettingsActivity : VectorBaseActivity(),
|
|||
if (isFirstCreation()) {
|
||||
// display the fragment
|
||||
when (intent.getIntExtra(EXTRA_DIRECT_ACCESS, EXTRA_DIRECT_ACCESS_ROOT)) {
|
||||
EXTRA_DIRECT_ACCESS_DEVELOPER ->
|
||||
replaceFragment(R.id.vector_settings_page, VectorSettingsDeveloperModeFragment::class.java, null, FRAGMENT_TAG)
|
||||
else ->
|
||||
EXTRA_DIRECT_ACCESS_ADVANCED_SETTINGS ->
|
||||
replaceFragment(R.id.vector_settings_page, VectorSettingsAdvancedSettingsFragment::class.java, null, FRAGMENT_TAG)
|
||||
else ->
|
||||
replaceFragment(R.id.vector_settings_page, VectorSettingsRootFragment::class.java, null, FRAGMENT_TAG)
|
||||
}
|
||||
}
|
||||
|
@ -122,7 +122,7 @@ class VectorSettingsActivity : VectorBaseActivity(),
|
|||
private const val EXTRA_DIRECT_ACCESS = "EXTRA_DIRECT_ACCESS"
|
||||
|
||||
const val EXTRA_DIRECT_ACCESS_ROOT = 0
|
||||
const val EXTRA_DIRECT_ACCESS_DEVELOPER = 1
|
||||
const val EXTRA_DIRECT_ACCESS_ADVANCED_SETTINGS = 1
|
||||
|
||||
private const val FRAGMENT_TAG = "VectorSettingsPreferencesFragment"
|
||||
}
|
||||
|
|
|
@ -23,10 +23,10 @@ import im.vector.riotx.core.platform.VectorBaseActivity
|
|||
import im.vector.riotx.core.preference.VectorSwitchPreference
|
||||
import im.vector.riotx.features.rageshake.RageShake
|
||||
|
||||
class VectorSettingsDeveloperModeFragment : VectorSettingsBaseFragment() {
|
||||
class VectorSettingsAdvancedSettingsFragment : VectorSettingsBaseFragment() {
|
||||
|
||||
override var titleRes = R.string.settings_developer_mode
|
||||
override val preferenceXmlRes = R.xml.vector_settings_developer_mode
|
||||
override var titleRes = R.string.settings_advanced_settings
|
||||
override val preferenceXmlRes = R.xml.vector_settings_advanced_settings
|
||||
|
||||
private var rageshake: RageShake? = null
|
||||
|
|
@ -7,6 +7,7 @@
|
|||
|
||||
|
||||
<string name="settings_show_devices_list">See all my devices</string>
|
||||
<string name="settings_advanced_settings">Advanced settings</string>
|
||||
<string name="settings_developer_mode">Developer mode</string>
|
||||
<string name="settings_developer_mode_summary">The developer mode activates hidden features and may also make the application less stable. For developers only!</string>
|
||||
<string name="settings_rageshake">Rageshake</string>
|
||||
|
|
|
@ -2,25 +2,6 @@
|
|||
<androidx.preference.PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<im.vector.riotx.core.preference.VectorPreferenceCategory
|
||||
android:key="SETTINGS_RAGE_SHAKE_CATEGORY_KEY"
|
||||
android:title="@string/settings_rageshake">
|
||||
|
||||
<im.vector.riotx.core.preference.VectorSwitchPreference
|
||||
android:key="SETTINGS_USE_RAGE_SHAKE_KEY"
|
||||
android:title="@string/send_bug_report_rage_shake" />
|
||||
|
||||
<androidx.preference.SeekBarPreference
|
||||
android:defaultValue="13"
|
||||
android:dependency="SETTINGS_USE_RAGE_SHAKE_KEY"
|
||||
android:key="SETTINGS_RAGE_SHAKE_DETECTION_THRESHOLD_KEY"
|
||||
android:max="15"
|
||||
android:summary="@string/settings_rageshake_detection_threshold_summary"
|
||||
android:title="@string/settings_rageshake_detection_threshold"
|
||||
app:min="11" />
|
||||
|
||||
</im.vector.riotx.core.preference.VectorPreferenceCategory>
|
||||
|
||||
<im.vector.riotx.core.preference.VectorPreferenceCategory android:title="@string/settings_developer_mode">
|
||||
|
||||
<im.vector.riotx.core.preference.VectorSwitchPreference
|
||||
|
@ -44,21 +25,38 @@
|
|||
|
||||
<!-- TODO Display unsupported events -->
|
||||
|
||||
<im.vector.riotx.core.preference.VectorPreferenceCategory
|
||||
android:dependency="SETTINGS_DEVELOPER_MODE_PREFERENCE_KEY"
|
||||
android:title="@string/settings_notifications">
|
||||
</im.vector.riotx.core.preference.VectorPreferenceCategory>
|
||||
|
||||
<im.vector.riotx.core.preference.VectorPreference
|
||||
android:persistent="false"
|
||||
android:title="@string/settings_notifications_targets"
|
||||
app:fragment="im.vector.riotx.features.settings.push.PushGatewaysFragment" />
|
||||
<im.vector.riotx.core.preference.VectorPreferenceCategory
|
||||
android:key="SETTINGS_RAGE_SHAKE_CATEGORY_KEY"
|
||||
android:title="@string/settings_rageshake">
|
||||
|
||||
<im.vector.riotx.core.preference.VectorPreference
|
||||
android:persistent="false"
|
||||
android:title="@string/settings_push_rules"
|
||||
app:fragment="im.vector.riotx.features.settings.push.PushRulesFragment" />
|
||||
<im.vector.riotx.core.preference.VectorSwitchPreference
|
||||
android:key="SETTINGS_USE_RAGE_SHAKE_KEY"
|
||||
android:title="@string/send_bug_report_rage_shake" />
|
||||
|
||||
</im.vector.riotx.core.preference.VectorPreferenceCategory>
|
||||
<androidx.preference.SeekBarPreference
|
||||
android:defaultValue="13"
|
||||
android:dependency="SETTINGS_USE_RAGE_SHAKE_KEY"
|
||||
android:key="SETTINGS_RAGE_SHAKE_DETECTION_THRESHOLD_KEY"
|
||||
android:max="15"
|
||||
android:summary="@string/settings_rageshake_detection_threshold_summary"
|
||||
android:title="@string/settings_rageshake_detection_threshold"
|
||||
app:min="11" />
|
||||
|
||||
</im.vector.riotx.core.preference.VectorPreferenceCategory>
|
||||
|
||||
<im.vector.riotx.core.preference.VectorPreferenceCategory android:title="@string/settings_notifications">
|
||||
|
||||
<im.vector.riotx.core.preference.VectorPreference
|
||||
android:persistent="false"
|
||||
android:title="@string/settings_notifications_targets"
|
||||
app:fragment="im.vector.riotx.features.settings.push.PushGatewaysFragment" />
|
||||
|
||||
<im.vector.riotx.core.preference.VectorPreference
|
||||
android:persistent="false"
|
||||
android:title="@string/settings_push_rules"
|
||||
app:fragment="im.vector.riotx.features.settings.push.PushRulesFragment" />
|
||||
|
||||
</im.vector.riotx.core.preference.VectorPreferenceCategory>
|
||||
|
|
@ -47,8 +47,8 @@
|
|||
|
||||
<im.vector.riotx.core.preference.VectorPreference
|
||||
android:icon="@drawable/ic_settings_root_general"
|
||||
android:title="@string/settings_developer_mode"
|
||||
app:fragment="im.vector.riotx.features.settings.VectorSettingsDeveloperModeFragment" />
|
||||
android:title="@string/settings_advanced_settings"
|
||||
app:fragment="im.vector.riotx.features.settings.VectorSettingsAdvancedSettingsFragment" />
|
||||
|
||||
<im.vector.riotx.core.preference.VectorPreference
|
||||
android:icon="@drawable/ic_settings_root_help_about"
|
||||
|
|
Loading…
Reference in a new issue