mirror of
https://github.com/oxen-io/session-android.git
synced 2024-12-24 00:37:47 +00:00
Clean up batch saving.
- Post a better string for when batch saving completes successfully - Exit multi-select after saving
This commit is contained in:
parent
91a119393c
commit
12d9d7741b
@ -701,6 +701,7 @@
|
||||
|
||||
<!-- SaveAttachmentTask -->
|
||||
<string name="SaveAttachmentTask_saved_to">Saved to %s</string>
|
||||
<string name="SaveAttachmentTask_saved">Saved</string>
|
||||
|
||||
<!-- SearchToolbar -->
|
||||
<string name="SearchToolbar_search">Search</string>
|
||||
|
@ -360,6 +360,7 @@ public class MediaOverviewActivity extends PassphraseRequiredActionBarActivity {
|
||||
attachments.size());
|
||||
saveTask.executeOnExecutor(THREAD_POOL_EXECUTOR,
|
||||
attachments.toArray(new SaveAttachmentTask.Attachment[attachments.size()]));
|
||||
exitMultiSelect();
|
||||
}
|
||||
}.execute();
|
||||
})
|
||||
|
@ -7,6 +7,7 @@ import android.net.Uri;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.support.v7.app.AlertDialog;
|
||||
import android.text.TextUtils;
|
||||
import android.webkit.MimeTypeMap;
|
||||
import android.widget.Toast;
|
||||
|
||||
@ -188,10 +189,9 @@ public class SaveAttachmentTask extends ProgressDialogAsyncTask<SaveAttachmentTa
|
||||
Toast.LENGTH_LONG).show();
|
||||
break;
|
||||
case SUCCESS:
|
||||
Toast.makeText(context,
|
||||
context.getResources().getString(R.string.SaveAttachmentTask_saved_to,
|
||||
result.second()),
|
||||
Toast.LENGTH_LONG).show();
|
||||
String message = !TextUtils.isEmpty(result.second()) ? context.getResources().getString(R.string.SaveAttachmentTask_saved_to, result.second())
|
||||
: context.getResources().getString(R.string.SaveAttachmentTask_saved);
|
||||
Toast.makeText(context, message, Toast.LENGTH_LONG).show();
|
||||
break;
|
||||
case WRITE_ACCESS_FAILURE:
|
||||
Toast.makeText(context, R.string.ConversationFragment_unable_to_write_to_sd_card_exclamation,
|
||||
|
Loading…
x
Reference in New Issue
Block a user