Use MediaStore for saving attachments to device

This commit is contained in:
Moez Bhatti
2023-01-02 16:43:18 -05:00
parent 53b2ac2bf8
commit b5cac5d87d
6 changed files with 54 additions and 31 deletions
@@ -433,7 +433,7 @@ class ComposeViewModel @Inject constructor(
.autoDisposable(view.scope())
.subscribe { part ->
if (permissionManager.hasStorage()) {
messageRepo.savePart(part.id)?.let(navigator::viewFile)
messageRepo.savePart(part.id)?.let { navigator.viewFile(it, part.type) }
} else {
view.requestStoragePermission()
}