From 7191e5a96af9dfcfa2ec52b32ddbba609ad8dfae Mon Sep 17 00:00:00 2001 From: LucasGGamerM Date: Tue, 29 Aug 2023 10:33:08 -0300 Subject: [PATCH] feat: use better account log off alert --- .../android/fragments/settings/SettingsMainFragment.java | 1 + .../java/org/joinmastodon/android/ui/AccountSwitcherSheet.java | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/mastodon/src/main/java/org/joinmastodon/android/fragments/settings/SettingsMainFragment.java b/mastodon/src/main/java/org/joinmastodon/android/fragments/settings/SettingsMainFragment.java index 20e83dded4..07b1037924 100644 --- a/mastodon/src/main/java/org/joinmastodon/android/fragments/settings/SettingsMainFragment.java +++ b/mastodon/src/main/java/org/joinmastodon/android/fragments/settings/SettingsMainFragment.java @@ -152,6 +152,7 @@ private void onAboutClick(){ private void onLogOutClick(){ AccountSession session=AccountSessionManager.getInstance().getAccount(accountID); new M3AlertDialogBuilder(getActivity()) + .setTitle(R.string.log_out) .setMessage(getString(R.string.confirm_log_out, session.getFullUsername())) .setPositiveButton(R.string.log_out, (dialog, which)->account.logOut(getActivity(), ()->{ loggedOut=true; diff --git a/mastodon/src/main/java/org/joinmastodon/android/ui/AccountSwitcherSheet.java b/mastodon/src/main/java/org/joinmastodon/android/ui/AccountSwitcherSheet.java index 1b2c65ae42..7cd2b848d8 100644 --- a/mastodon/src/main/java/org/joinmastodon/android/ui/AccountSwitcherSheet.java +++ b/mastodon/src/main/java/org/joinmastodon/android/ui/AccountSwitcherSheet.java @@ -130,7 +130,7 @@ private void confirmLogOut(String accountID){ AccountSession session=AccountSessionManager.getInstance().getAccount(accountID); new M3AlertDialogBuilder(activity) .setTitle(R.string.log_out) - .setMessage(activity.getString(R.string.confirm_log_out)) + .setMessage(activity.getString(R.string.confirm_log_out, session.getFullUsername())) .setPositiveButton(R.string.log_out, (dialog, which) -> logOut(accountID)) .setNegativeButton(R.string.cancel, null) .show();