Reimplement storing backup import/export path

#6319 and #6402 were reverted before adding SAF changes, and have been readded at the end of SAF changes
This commit is contained in:
Stypox 2021-06-06 22:15:32 +02:00
parent 5ffc667bea
commit 2a99e0e435
No known key found for this signature in database
GPG key ID: 4BDF1B40A49FDD23
7 changed files with 155 additions and 55 deletions

View file

@ -191,7 +191,10 @@ class SubscriptionFragment : BaseStateFragment<SubscriptionState>() {
val date = SimpleDateFormat("yyyyMMddHHmm", Locale.ENGLISH).format(Date())
val exportName = "newpipe_subscriptions_$date.json"
startActivityForResult(StoredFileHelper.getNewPicker(activity, null, exportName, "application/json"), REQUEST_EXPORT_CODE)
startActivityForResult(
StoredFileHelper.getNewPicker(activity, exportName, "application/json", null),
REQUEST_EXPORT_CODE
)
}
private fun openReorderDialog() {
@ -283,7 +286,8 @@ class SubscriptionFragment : BaseStateFragment<SubscriptionState>() {
private fun showLongTapDialog(selectedItem: ChannelInfoItem) {
val commands = arrayOf(
getString(R.string.share), getString(R.string.open_in_browser),
getString(R.string.share),
getString(R.string.open_in_browser),
getString(R.string.unsubscribe)
)