Skip to content

Commit eef40f3

Browse files
committed
Put developer settings at the end of the view
It used to be before "Sign out" which once the developer setting was enabled went over the build version. So clicking 8 times on the build version instead of 7 to enable dev settings was signing out the user.
1 parent c195cf2 commit eef40f3

File tree

1 file changed

+4
-3
lines changed
  • features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/root

1 file changed

+4
-3
lines changed

features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/root/PreferencesRootView.kt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -214,9 +214,6 @@ private fun ColumnScope.GeneralSection(
214214
leadingContent = ListItemContent.Icon(IconSource.Vector(CompoundIcons.Settings())),
215215
onClick = onOpenAdvancedSettings,
216216
)
217-
if (state.showDeveloperSettings) {
218-
DeveloperPreferencesView(onOpenDeveloperSettings)
219-
}
220217
ListItem(
221218
headlineContent = { Text(stringResource(id = CommonStrings.action_signout)) },
222219
leadingContent = ListItemContent.Icon(IconSource.Vector(CompoundIcons.SignOut())),
@@ -231,6 +228,10 @@ private fun ColumnScope.GeneralSection(
231228
onClick = onDeactivateClick,
232229
)
233230
}
231+
// Put developer settings at the end, so nothing bad happens if the user clicks 8 times to enable the entry
232+
if (state.showDeveloperSettings) {
233+
DeveloperPreferencesView(onOpenDeveloperSettings)
234+
}
234235
}
235236

236237
@Composable

0 commit comments

Comments
 (0)