mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-12-23 16:51:49 +01:00
parent
43e801130e
commit
f5ffbd4eb4
@ -233,17 +233,19 @@ class SettingsBackupController : SettingsController() {
|
|||||||
|
|
||||||
override fun onCreateDialog(savedViewState: Bundle?): Dialog {
|
override fun onCreateDialog(savedViewState: Bundle?): Dialog {
|
||||||
val activity = activity!!
|
val activity = activity!!
|
||||||
val unifile = UniFile.fromUri(activity, args.getParcelable(KEY_URI))
|
val uniFile = UniFile.fromUri(activity, args.getParcelable(KEY_URI))
|
||||||
return MaterialDialog(activity)
|
return MaterialDialog(activity).apply {
|
||||||
.title(R.string.backup_created)
|
title(R.string.backup_created)
|
||||||
.message(R.string.file_saved, unifile.filePath)
|
if (uniFile.filePath != null)
|
||||||
.positiveButton(R.string.action_close)
|
message(text = resources?.getString(R.string.file_saved, uniFile.filePath))
|
||||||
.negativeButton(R.string.action_export) {
|
positiveButton(R.string.action_close)
|
||||||
val sendIntent = Intent(Intent.ACTION_SEND)
|
negativeButton(R.string.action_share) {
|
||||||
sendIntent.type = "application/json"
|
val sendIntent = Intent(Intent.ACTION_SEND)
|
||||||
sendIntent.putExtra(Intent.EXTRA_STREAM, unifile.uri)
|
sendIntent.type = "application/json"
|
||||||
startActivity(Intent.createChooser(sendIntent, ""))
|
sendIntent.putExtra(Intent.EXTRA_STREAM, uniFile.uri)
|
||||||
}
|
startActivity(Intent.createChooser(sendIntent, ""))
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private companion object {
|
private companion object {
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 76 KiB After Width: | Height: | Size: 76 KiB |
Loading…
Reference in New Issue
Block a user