mirror of
https://github.com/SimpleMobileTools/Simple-Calendar.git
synced 2025-06-05 21:59:17 +02:00
Add exported files to MediaStore
This commit is contained in:
@ -256,9 +256,9 @@ fun Context.backupEventsAndTasks() {
|
|||||||
mkdirs()
|
mkdirs()
|
||||||
}
|
}
|
||||||
|
|
||||||
val exportPath = File(outputFolder, "$filename.ics")
|
val exportFile = File(outputFolder, "$filename.ics")
|
||||||
val outputStream = try {
|
val outputStream = try {
|
||||||
exportPath.outputStream()
|
exportFile.outputStream()
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
showErrorToast(e)
|
showErrorToast(e)
|
||||||
null
|
null
|
||||||
@ -270,6 +270,7 @@ fun Context.backupEventsAndTasks() {
|
|||||||
IcsExporter.ExportResult.EXPORT_FAIL -> toast(R.string.exporting_failed)
|
IcsExporter.ExportResult.EXPORT_FAIL -> toast(R.string.exporting_failed)
|
||||||
else -> {}
|
else -> {}
|
||||||
}
|
}
|
||||||
|
rescanPath(exportFile.absolutePath)
|
||||||
config.lastAutoBackupTime = getNowSeconds()
|
config.lastAutoBackupTime = getNowSeconds()
|
||||||
}
|
}
|
||||||
scheduleNextAutomaticBackup()
|
scheduleNextAutomaticBackup()
|
||||||
|
Reference in New Issue
Block a user