diff options
author | Docile-Alligator <25734209+Docile-Alligator@users.noreply.github.com> | 2023-02-06 18:08:16 +0000 |
---|---|---|
committer | Docile-Alligator <25734209+Docile-Alligator@users.noreply.github.com> | 2023-02-06 18:08:16 +0000 |
commit | c7882b1f65919cc27bb9e17fb0acc6041857ad97 (patch) | |
tree | fa2f374aa1011f4063960b3db410aa2fd0e6ca22 /app/src/main | |
parent | e69f778de4be7a71057fa0464ec18a394dbf30bd (diff) | |
download | infinity-for-reddit-c7882b1f65919cc27bb9e17fb0acc6041857ad97.tar infinity-for-reddit-c7882b1f65919cc27bb9e17fb0acc6041857ad97.tar.gz infinity-for-reddit-c7882b1f65919cc27bb9e17fb0acc6041857ad97.tar.bz2 infinity-for-reddit-c7882b1f65919cc27bb9e17fb0acc6041857ad97.tar.lz infinity-for-reddit-c7882b1f65919cc27bb9e17fb0acc6041857ad97.tar.xz infinity-for-reddit-c7882b1f65919cc27bb9e17fb0acc6041857ad97.tar.zst infinity-for-reddit-c7882b1f65919cc27bb9e17fb0acc6041857ad97.zip |
Fix https://github.com/Docile-Alligator/Infinity-For-Reddit/issues/1329
Diffstat (limited to '')
-rw-r--r-- | app/src/main/java/ml/docilealligator/infinityforreddit/settings/CustomizeBottomAppBarFragment.java | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/settings/CustomizeBottomAppBarFragment.java b/app/src/main/java/ml/docilealligator/infinityforreddit/settings/CustomizeBottomAppBarFragment.java index cf6d9a64..d3bfb2d3 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/settings/CustomizeBottomAppBarFragment.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/settings/CustomizeBottomAppBarFragment.java @@ -181,6 +181,8 @@ public class CustomizeBottomAppBarFragment extends Fragment { mainActivityOption2 = mainActivityOptionAnonymousValuesList.indexOf(Integer.toString(mainActivityOption2)); mainActivityOption3 = mainActivityOptionAnonymousValuesList.indexOf(Integer.toString(mainActivityOption3)); mainActivityOption4 = mainActivityOptionAnonymousValuesList.indexOf(Integer.toString(mainActivityOption4)); + + mainActivityFAB = mainActivityFAB >= 9 ? mainActivityFAB - 2 : mainActivityFAB - 1; } else { fabOptions = resources.getStringArray(R.array.settings_bottom_app_bar_fab_options); } @@ -258,8 +260,8 @@ public class CustomizeBottomAppBarFragment extends Fragment { mainActivityFAB = i; int optionToSaveToPreference; if (accountName == null) { - if (i == 7) { - optionToSaveToPreference = 9; + if (i >= 7) { + optionToSaveToPreference = i + 2; } else { optionToSaveToPreference = i + 1; } @@ -295,6 +297,7 @@ public class CustomizeBottomAppBarFragment extends Fragment { otherActivitiesOption2 = otherActivitiesOptionAnonymousValuesList.indexOf(Integer.toString(otherActivitiesOption2)); otherActivitiesOption3 = otherActivitiesOptionAnonymousValuesList.indexOf(Integer.toString(otherActivitiesOption3)); otherActivitiesOption4 = otherActivitiesOptionAnonymousValuesList.indexOf(Integer.toString(otherActivitiesOption4)); + otherActivitiesFAB = otherActivitiesFAB >= 9 ? otherActivitiesFAB - 2 : otherActivitiesFAB - 1; } otherActivitiesFABTextView.setText(fabOptions[otherActivitiesFAB]); @@ -370,8 +373,8 @@ public class CustomizeBottomAppBarFragment extends Fragment { otherActivitiesFAB = i; int optionToSaveToPreference; if (accountName == null) { - if (i == 7) { - optionToSaveToPreference = 9; + if (i >= 7) { + optionToSaveToPreference = i + 2; } else { optionToSaveToPreference = i + 1; } |