mirror of
https://github.com/aniyomiorg/aniyomi.git
synced 2024-11-23 21:27:40 +03:00
Fixed backup/restore for 3rd party applications (#255)
* Same MIME for restore/backup, so 3rd party applications like Google Drive find the proper files. MIME changed to proper type for json files. * MIME type for restore temporaly on "application/*" so the cached file can also be chosen
This commit is contained in:
parent
06681a3db7
commit
6d0254c5e5
1 changed files with 2 additions and 2 deletions
|
@ -57,7 +57,7 @@ class BackupFragment : BaseRxFragment<BackupPresenter>() {
|
|||
restore_button.setOnClickListener {
|
||||
val intent = Intent(Intent.ACTION_GET_CONTENT)
|
||||
intent.addCategory(Intent.CATEGORY_OPENABLE)
|
||||
intent.type = "application/octet-stream"
|
||||
intent.type = "application/*"
|
||||
val chooser = Intent.createChooser(intent, getString(R.string.file_select_backup))
|
||||
startActivityForResult(chooser, REQUEST_BACKUP_OPEN)
|
||||
}
|
||||
|
@ -76,7 +76,7 @@ class BackupFragment : BaseRxFragment<BackupPresenter>() {
|
|||
fun onBackupCompleted(file: File) {
|
||||
dismissBackupDialog()
|
||||
val intent = Intent(Intent.ACTION_SEND)
|
||||
intent.type = "text/plain"
|
||||
intent.type = "application/json"
|
||||
intent.putExtra(Intent.EXTRA_STREAM, Uri.parse("file://" + file))
|
||||
startActivity(Intent.createChooser(intent, ""))
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue