Skip to content
This repository has been archived by the owner on Mar 26, 2019. It is now read-only.

Commit

Permalink
fix force downsizing buttons could exceed range
Browse files Browse the repository at this point in the history
  • Loading branch information
befora committed Dec 22, 2018
1 parent 0c14076 commit da27729
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -400,14 +400,14 @@ open class SettingsFragmentImp1_Content : SettingsFragmentImp0_View() {
textView.text = "Max Width: ${Settings.MAX_PAGE_WIDTH}"
}
button0.onClick {
if (Settings.MAX_PAGE_WIDTH >= 0) {
if (Settings.MAX_PAGE_WIDTH > 0) {
Settings.MAX_PAGE_WIDTH -= 1
sharedPrefsHelper.saveMaxPageWidth()
textView.text = "Max Width: ${Settings.MAX_PAGE_WIDTH}"
}
}
button1.onClick {
if (Settings.MAX_PAGE_WIDTH <= maxValue) {
if (Settings.MAX_PAGE_WIDTH < maxValue) {
Settings.MAX_PAGE_WIDTH += 1
sharedPrefsHelper.saveMaxPageWidth()
textView.text = "Max Width: ${Settings.MAX_PAGE_WIDTH}"
Expand Down

0 comments on commit da27729

Please sign in to comment.