File tree Expand file tree Collapse file tree
java/org/nypl/simplified/ui/settings Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -33,6 +33,7 @@ class SettingsDebugMenuStartupFragment :
3333 return BACK_BUTTON_CONSUMED
3434 }
3535
36+ private lateinit var hasSeenAudiobookBatteryDialog: SwitchCompat
3637 private lateinit var hasSeenLibrarySelector: SwitchCompat
3738 private lateinit var hasSeenNotifications: SwitchCompat
3839 private lateinit var failNextBoot: SwitchCompat
@@ -72,5 +73,13 @@ class SettingsDebugMenuStartupFragment :
7273 this .hasSeenLibrarySelector.setOnCheckedChangeListener { _, checked ->
7374 SettingsDebugModel .updatePreferences { p -> p.copy(hasSeenLibrarySelectionScreen = checked) }
7475 }
76+
77+ this .hasSeenAudiobookBatteryDialog =
78+ view.findViewById(R .id.debugStartupShowAudiobookBatteryDialog)
79+ this .hasSeenAudiobookBatteryDialog.isChecked =
80+ SettingsDebugModel .hasSeenLibrarySelection()
81+ this .hasSeenAudiobookBatteryDialog.setOnCheckedChangeListener { _, checked ->
82+ SettingsDebugModel .updatePreferences { p -> p.copy(audioBookBatteryDialogAccepted = checked) }
83+ }
7584 }
7685}
Original file line number Diff line number Diff line change 9595 android : enabled =" true"
9696 android : text =" User has seen the library selector on startup?" />
9797
98+ <androidx .appcompat.widget.SwitchCompat
99+ android : id =" @+id/debugStartupShowAudiobookBatteryDialog"
100+ android : layout_width =" match_parent"
101+ android : layout_height =" wrap_content"
102+ android : layout_marginStart =" 16dp"
103+ android : layout_marginEnd =" 16dp"
104+ android : layout_marginTop =" 16dp"
105+ android : checked =" false"
106+ android : enabled =" true"
107+ android : text =" User has accepted the audiobook battery dialog?" />
108+
98109</LinearLayout >
You can’t perform that action at this time.
0 commit comments