From 66b117b81f54c520a3325b5ff5c6d3490c1406ec Mon Sep 17 00:00:00 2001 From: 0xd9a <0xd9a@noreply.codeberg.org> Date: Mon, 17 Mar 2025 11:29:19 +0530 Subject: [PATCH] Show a dialog after settings export (Issue #5) --- .../app/fedilab/android/mastodon/helper/ZipHelper.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/src/main/java/app/fedilab/android/mastodon/helper/ZipHelper.java b/app/src/main/java/app/fedilab/android/mastodon/helper/ZipHelper.java index a09edef2..0cd20368 100644 --- a/app/src/main/java/app/fedilab/android/mastodon/helper/ZipHelper.java +++ b/app/src/main/java/app/fedilab/android/mastodon/helper/ZipHelper.java @@ -32,6 +32,8 @@ import android.widget.Toast; import androidx.preference.PreferenceManager; +import com.google.android.material.dialog.MaterialAlertDialogBuilder; + import java.io.BufferedInputStream; import java.io.BufferedOutputStream; import java.io.File; @@ -110,6 +112,12 @@ public class ZipHelper { Uri uri = Uri.parse("file://" + zipFile); intentOpen.setDataAndType(uri, "application/zip"); String title = context.getString(R.string.data_export_settings); + new MaterialAlertDialogBuilder(context) + .setTitle(R.string.export_settings) + .setMessage(message + "\n\n" + uri.getPath()) + .setIcon(R.drawable.ic_baseline_check_24) + .setNeutralButton(R.string.close, (dialogInterface, i) -> dialogInterface.dismiss()) + .show(); Helper.notify_user(context, Helper.getCurrentAccount(context), intentOpen, BitmapFactory.decodeResource(context.getResources(), getMainLogo(context)), Helper.NotifType.BACKUP, title, message); }