mirror of
https://github.com/ArcaneChat/android.git
synced 2026-07-03 14:05:24 +02:00
fix PermanentDenialDialog for save-attachment (query by activity, not by fragment), remove toasts that do not contain useful information that are not shown before
This commit is contained in:
@@ -444,11 +444,10 @@ public class ConversationFragment extends Fragment
|
||||
|
||||
private void handleSaveAttachment(final DcMsg message) {
|
||||
SaveAttachmentTask.showWarningDialog(getContext(), (dialogInterface, i) -> {
|
||||
Permissions.with(this)
|
||||
Permissions.with(getActivity())
|
||||
.request(Manifest.permission.WRITE_EXTERNAL_STORAGE, Manifest.permission.READ_EXTERNAL_STORAGE)
|
||||
.ifNecessary()
|
||||
.withPermanentDenialDialog(getString(R.string.perm_explain_access_to_storage_denied))
|
||||
.onAnyDenied(() -> Toast.makeText(getContext(), R.string.perm_explain_access_to_storage_denied, Toast.LENGTH_LONG).show())
|
||||
.onAllGranted(() -> {
|
||||
SaveAttachmentTask saveTask = new SaveAttachmentTask(getContext());
|
||||
SaveAttachmentTask.Attachment attachment = new SaveAttachmentTask.Attachment(
|
||||
|
||||
@@ -305,7 +305,6 @@ public class MediaPreviewActivity extends PassphraseRequiredActionBarActivity
|
||||
.request(Manifest.permission.WRITE_EXTERNAL_STORAGE, Manifest.permission.READ_EXTERNAL_STORAGE)
|
||||
.ifNecessary()
|
||||
.withPermanentDenialDialog(getString(R.string.perm_explain_access_to_storage_denied))
|
||||
.onAnyDenied(() -> Toast.makeText(this, R.string.perm_explain_access_to_storage_denied, Toast.LENGTH_LONG).show())
|
||||
.onAllGranted(() -> {
|
||||
SaveAttachmentTask saveTask = new SaveAttachmentTask(MediaPreviewActivity.this);
|
||||
long saveDate = (mediaItem.date > 0) ? mediaItem.date : System.currentTimeMillis();
|
||||
|
||||
Reference in New Issue
Block a user