mirror of
https://github.com/oxen-io/session-android.git
synced 2025-01-12 00:33:39 +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 -->
|
<!-- SaveAttachmentTask -->
|
||||||
<string name="SaveAttachmentTask_saved_to">Saved to %s</string>
|
<string name="SaveAttachmentTask_saved_to">Saved to %s</string>
|
||||||
|
<string name="SaveAttachmentTask_saved">Saved</string>
|
||||||
|
|
||||||
<!-- SearchToolbar -->
|
<!-- SearchToolbar -->
|
||||||
<string name="SearchToolbar_search">Search</string>
|
<string name="SearchToolbar_search">Search</string>
|
||||||
|
@ -360,6 +360,7 @@ public class MediaOverviewActivity extends PassphraseRequiredActionBarActivity {
|
|||||||
attachments.size());
|
attachments.size());
|
||||||
saveTask.executeOnExecutor(THREAD_POOL_EXECUTOR,
|
saveTask.executeOnExecutor(THREAD_POOL_EXECUTOR,
|
||||||
attachments.toArray(new SaveAttachmentTask.Attachment[attachments.size()]));
|
attachments.toArray(new SaveAttachmentTask.Attachment[attachments.size()]));
|
||||||
|
exitMultiSelect();
|
||||||
}
|
}
|
||||||
}.execute();
|
}.execute();
|
||||||
})
|
})
|
||||||
|
@ -7,6 +7,7 @@ import android.net.Uri;
|
|||||||
import android.support.annotation.NonNull;
|
import android.support.annotation.NonNull;
|
||||||
import android.support.annotation.Nullable;
|
import android.support.annotation.Nullable;
|
||||||
import android.support.v7.app.AlertDialog;
|
import android.support.v7.app.AlertDialog;
|
||||||
|
import android.text.TextUtils;
|
||||||
import android.webkit.MimeTypeMap;
|
import android.webkit.MimeTypeMap;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
@ -188,10 +189,9 @@ public class SaveAttachmentTask extends ProgressDialogAsyncTask<SaveAttachmentTa
|
|||||||
Toast.LENGTH_LONG).show();
|
Toast.LENGTH_LONG).show();
|
||||||
break;
|
break;
|
||||||
case SUCCESS:
|
case SUCCESS:
|
||||||
Toast.makeText(context,
|
String message = !TextUtils.isEmpty(result.second()) ? context.getResources().getString(R.string.SaveAttachmentTask_saved_to, result.second())
|
||||||
context.getResources().getString(R.string.SaveAttachmentTask_saved_to,
|
: context.getResources().getString(R.string.SaveAttachmentTask_saved);
|
||||||
result.second()),
|
Toast.makeText(context, message, Toast.LENGTH_LONG).show();
|
||||||
Toast.LENGTH_LONG).show();
|
|
||||||
break;
|
break;
|
||||||
case WRITE_ACCESS_FAILURE:
|
case WRITE_ACCESS_FAILURE:
|
||||||
Toast.makeText(context, R.string.ConversationFragment_unable_to_write_to_sd_card_exclamation,
|
Toast.makeText(context, R.string.ConversationFragment_unable_to_write_to_sd_card_exclamation,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user