Removed empty trash, added FAQ

pull/147/head
M66B 6 years ago
parent 71f51f757d
commit e458887422

@ -117,7 +117,7 @@ Note that your contacts could unknowingly send malicious messages if they got in
* [(52) Why does it take some time to reconnect to an account?](#user-content-faq52) * [(52) Why does it take some time to reconnect to an account?](#user-content-faq52)
* [(53) Can you stick the message action bar to the top/bottom?](#user-content-faq53) * [(53) Can you stick the message action bar to the top/bottom?](#user-content-faq53)
* [(54) How do I use a namespace prefix?](#user-content-faq54) * [(54) How do I use a namespace prefix?](#user-content-faq54)
* [(55) How can I mark all messages as read / move or delete all messages?](#user-content-faq55)
[I have another question.](#support) [I have another question.](#support)
@ -825,6 +825,14 @@ For example the Gmail spam folder is called:
By setting the namespace prefix to *[Gmail]* FairEmail will automatically remove *[Gmail]/* from all folder names. By setting the namespace prefix to *[Gmail]* FairEmail will automatically remove *[Gmail]/* from all folder names.
<a name="faq55"></a>
**(55) How can I mark all messages as read / move or delete all messages?**
You can use multiple select for this.
Long press the first message, don't lift your finger and slide down to the last message.
Then use the three dot action button to execute the desired action.
## Support ## Support
If you have another question, want to request a feature or report a bug, you can use [this forum](https://forum.xda-developers.com/android/apps-games/source-email-t3824168). If you have another question, want to request a feature or report a bug, you can use [this forum](https://forum.xda-developers.com/android/apps-games/source-email-t3824168).

@ -20,7 +20,6 @@ package eu.faircode.email;
*/ */
import android.content.Context; import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent; import android.content.Intent;
import android.content.SharedPreferences; import android.content.SharedPreferences;
import android.content.res.ColorStateList; import android.content.res.ColorStateList;
@ -79,8 +78,7 @@ public class AdapterFolder extends RecyclerView.Adapter<AdapterFolder.ViewHolder
private final static int action_synchronize_now = 1; private final static int action_synchronize_now = 1;
private final static int action_delete_local = 2; private final static int action_delete_local = 2;
private final static int action_empty_trash = 3; private final static int action_edit_properties = 3;
private final static int action_edit_properties = 4;
ViewHolder(View itemView) { ViewHolder(View itemView) {
super(itemView); super(itemView);
@ -224,11 +222,9 @@ public class AdapterFolder extends RecyclerView.Adapter<AdapterFolder.ViewHolder
if (!EntityFolder.DRAFTS.equals(folder.type)) if (!EntityFolder.DRAFTS.equals(folder.type))
popupMenu.getMenu().add(Menu.NONE, action_delete_local, 2, R.string.title_delete_local); popupMenu.getMenu().add(Menu.NONE, action_delete_local, 2, R.string.title_delete_local);
if (EntityFolder.TRASH.equals(folder.type))
popupMenu.getMenu().add(Menu.NONE, action_empty_trash, 3, R.string.title_empty_trash);
if (folder.account != null) if (folder.account != null)
popupMenu.getMenu().add(Menu.NONE, action_edit_properties, 4, R.string.title_edit_properties); popupMenu.getMenu().add(Menu.NONE, action_edit_properties, 3, R.string.title_edit_properties);
popupMenu.setOnMenuItemClickListener(new PopupMenu.OnMenuItemClickListener() { popupMenu.setOnMenuItemClickListener(new PopupMenu.OnMenuItemClickListener() {
@Override @Override
@ -242,10 +238,6 @@ public class AdapterFolder extends RecyclerView.Adapter<AdapterFolder.ViewHolder
OnActionDeleteLocal(); OnActionDeleteLocal();
return true; return true;
case action_empty_trash:
onActionEmptyTrash();
return true;
case action_edit_properties: case action_edit_properties:
onActionEditProperties(); onActionEditProperties();
return true; return true;
@ -313,49 +305,6 @@ public class AdapterFolder extends RecyclerView.Adapter<AdapterFolder.ViewHolder
}.load(context, owner, args); }.load(context, owner, args);
} }
private void onActionEmptyTrash() {
new DialogBuilderLifecycle(context, owner)
.setMessage(R.string.title_empty_trash_ask)
.setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
Bundle args = new Bundle();
args.putLong("id", folder.id);
new SimpleTask<Void>() {
@Override
protected Void onLoad(Context context, Bundle args) {
long id = args.getLong("id");
DB db = DB.getInstance(context);
try {
db.beginTransaction();
for (Long mid : db.message().getMessageByFolder(id)) {
EntityMessage message = db.message().getMessage(mid);
EntityOperation.queue(db, message, EntityOperation.DELETE);
}
db.setTransactionSuccessful();
} finally {
db.endTransaction();
}
return null;
}
@Override
protected void onException(Bundle args, Throwable ex) {
Helper.unexpectedError(context, owner, ex);
}
}.load(context, owner, args);
}
})
.setNegativeButton(android.R.string.cancel, null)
.show();
}
private void onActionEditProperties() { private void onActionEditProperties() {
LocalBroadcastManager lbm = LocalBroadcastManager.getInstance(context); LocalBroadcastManager lbm = LocalBroadcastManager.getInstance(context);
lbm.sendBroadcast( lbm.sendBroadcast(

@ -204,10 +204,8 @@
<string name="title_synchronize_now">Synchronize now</string> <string name="title_synchronize_now">Synchronize now</string>
<string name="title_delete_local">Delete local messages</string> <string name="title_delete_local">Delete local messages</string>
<string name="title_empty_trash">Empty trash</string>
<string name="title_edit_properties">Edit properties</string> <string name="title_edit_properties">Edit properties</string>
<string name="title_empty_trash_ask">Delete all trashed messages permanently?</string>
<string name="title_delete_operation">Delete operations with an error message?</string> <string name="title_delete_operation">Delete operations with an error message?</string>
<string name="title_folder_name">Folder name</string> <string name="title_folder_name">Folder name</string>

Loading…
Cancel
Save