add handling for Post Notifications permission at copy/move

This commit is contained in:
tibbi 2022-09-01 21:34:50 +02:00
parent a4e7c7f6a6
commit 041407d4da

View file

@ -829,7 +829,13 @@ abstract class BaseSimpleActivity : AppCompatActivity() {
checkConflicts(files, destinationPath, 0, LinkedHashMap()) {
toast(if (isCopyOperation) R.string.copying else R.string.moving)
val pair = Pair(files, destinationPath)
CopyMoveTask(this, isCopyOperation, copyPhotoVideoOnly, it, copyMoveListener, copyHidden).execute(pair)
handleNotificationPermission { granted ->
if (granted) {
CopyMoveTask(this, isCopyOperation, copyPhotoVideoOnly, it, copyMoveListener, copyHidden).execute(pair)
} else {
toast(R.string.no_post_notifications_permissions)
}
}
}
} else {
val text = String.format(getString(R.string.no_space), sumToCopy.formatSize(), availableSpace.formatSize())