include list title in delete prompt

closes sk22#304
This commit is contained in:
sk 2023-01-16 19:12:37 +01:00
parent 9e9f9357fd
commit d3491b5753
3 changed files with 8 additions and 4 deletions

View File

@ -88,7 +88,7 @@ public class ListTimelineFragment extends StatusListFragment {
.setNegativeButton(R.string.cancel, (d, which) -> {})
.show();
} else if (item.getItemId() == R.id.delete) {
UiUtils.confirmDeleteList(getActivity(), accountID, listID, () -> {
UiUtils.confirmDeleteList(getActivity(), accountID, listID, listTitle, () -> {
args.putBoolean("deleted", true);
setResult(true, args);
Nav.finish(this);

View File

@ -538,8 +538,12 @@ public class UiUtils{
);
}
public static void confirmDeleteList(Activity activity, String accountID, String listID, Runnable callback) {
showConfirmationAlert(activity, R.string.sk_delete_list, R.string.sk_delete_list_confirm, R.string.delete, R.drawable.ic_fluent_delete_28_regular,
public static void confirmDeleteList(Activity activity, String accountID, String listID, String listTitle, Runnable callback) {
showConfirmationAlert(activity,
activity.getString(R.string.sk_delete_list),
activity.getString(R.string.sk_delete_list_confirm, listTitle),
activity.getString(R.string.delete),
R.drawable.ic_fluent_delete_28_regular,
() -> new DeleteList(listID).setCallback(new Callback<>() {
@Override
public void onSuccess(Object o) {

View File

@ -137,7 +137,7 @@
<string name="sk_list_replies_policy_followed">followed users</string>
<string name="sk_list_replies_policy_none">no one</string>
<string name="sk_delete_list">Delete list</string>
<string name="sk_delete_list_confirm">Are you sure you want to delete this list?</string>
<string name="sk_delete_list_confirm">Are you sure you want to delete the list “%s”?</string>
<string name="sk_edit_list_title">Edit list</string>
<string name="sk_your_lists">Your lists</string>
<string name="sk_timeline_home">Home</string>