diff --git a/mastodon/src/main/java/org/joinmastodon/android/fragments/settings/SettingsBehaviorFragment.java b/mastodon/src/main/java/org/joinmastodon/android/fragments/settings/SettingsBehaviorFragment.java index 51ee9d0f8..339c10463 100644 --- a/mastodon/src/main/java/org/joinmastodon/android/fragments/settings/SettingsBehaviorFragment.java +++ b/mastodon/src/main/java/org/joinmastodon/android/fragments/settings/SettingsBehaviorFragment.java @@ -173,7 +173,7 @@ public class SettingsBehaviorFragment extends BaseSettingsFragment impleme GlobalUserPreferences.overlayMedia=overlayMediaItem.checked; GlobalUserPreferences.useCustomTabs=customTabsItem.checked; GlobalUserPreferences.altTextReminders=altTextItem.checked; - GlobalUserPreferences.confirmUnfollow=customTabsItem.checked; + GlobalUserPreferences.confirmUnfollow=confirmUnfollowItem.checked; GlobalUserPreferences.confirmBoost=confirmBoostItem.checked; GlobalUserPreferences.confirmDeletePost=confirmDeleteItem.checked; GlobalUserPreferences.forwardReportDefault=forwardReportsItem.checked; diff --git a/mastodon/src/main/java/org/joinmastodon/android/ui/utils/UiUtils.java b/mastodon/src/main/java/org/joinmastodon/android/ui/utils/UiUtils.java index 8d73e2740..49a56b9fc 100644 --- a/mastodon/src/main/java/org/joinmastodon/android/ui/utils/UiUtils.java +++ b/mastodon/src/main/java/org/joinmastodon/android/ui/utils/UiUtils.java @@ -792,7 +792,7 @@ public class UiUtils { confirmToggleMuteUser(activity, accountID, account, true, resultCallback); } else if (!relationship.following && !relationship.requested) { follow(activity, accountID, account, true, progressCallback, resultCallback); - } else { + } else if (GlobalUserPreferences.confirmUnfollow){ showConfirmationAlert(activity, activity.getString(R.string.mo_confirm_unfollow_title), activity.getString(R.string.mo_confirm_unfollow, account.getDisplayUsername()), @@ -800,8 +800,9 @@ public class UiUtils { 0, () -> follow(activity, accountID, account, false, progressCallback, resultCallback), () -> progressCallback.accept(false)); + } else { + follow(activity, accountID, account, false, progressCallback, resultCallback); } - } private static void follow(Activity activity, String accountID, Account account, boolean followed, Consumer progressCallback, Consumer resultCallback) {