mirror of
https://codeberg.org/tom79/Fedilab.git
synced 2025-04-05 22:50:02 +03:00
Merge pull request 'Show a dialog after settings export (Issue #5)' (#1146) from 0xd9a/Fedilab:develop into develop
Reviewed-on: https://codeberg.org/tom79/Fedilab/pulls/1146
This commit is contained in:
commit
1d5d874415
1 changed files with 8 additions and 0 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue