From c7882b1f65919cc27bb9e17fb0acc6041857ad97 Mon Sep 17 00:00:00 2001 From: Docile-Alligator <25734209+Docile-Alligator@users.noreply.github.com> Date: Mon, 6 Feb 2023 13:08:16 -0500 Subject: Fix https://github.com/Docile-Alligator/Infinity-For-Reddit/issues/1329 --- .../settings/CustomizeBottomAppBarFragment.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'app/src/main/java') 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; } -- cgit v1.2.3