1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2024-12-24 08:44:26 +00:00

Removed empty trash, added FAQ

This commit is contained in:
M66B 2018-12-28 10:23:47 +00:00
parent 71f51f757d
commit e458887422
3 changed files with 11 additions and 56 deletions

10
FAQ.md
View file

@ -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)
* [(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)
* [(55) How can I mark all messages as read / move or delete all messages?](#user-content-faq55)
[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.
<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
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).

View file

@ -20,7 +20,6 @@ package eu.faircode.email;
*/
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.SharedPreferences;
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_delete_local = 2;
private final static int action_empty_trash = 3;
private final static int action_edit_properties = 4;
private final static int action_edit_properties = 3;
ViewHolder(View itemView) {
super(itemView);
@ -224,11 +222,9 @@ public class AdapterFolder extends RecyclerView.Adapter<AdapterFolder.ViewHolder
if (!EntityFolder.DRAFTS.equals(folder.type))
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)
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() {
@Override
@ -242,10 +238,6 @@ public class AdapterFolder extends RecyclerView.Adapter<AdapterFolder.ViewHolder
OnActionDeleteLocal();
return true;
case action_empty_trash:
onActionEmptyTrash();
return true;
case action_edit_properties:
onActionEditProperties();
return true;
@ -313,49 +305,6 @@ public class AdapterFolder extends RecyclerView.Adapter<AdapterFolder.ViewHolder
}.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() {
LocalBroadcastManager lbm = LocalBroadcastManager.getInstance(context);
lbm.sendBroadcast(

View file

@ -204,10 +204,8 @@
<string name="title_synchronize_now">Synchronize now</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_empty_trash_ask">Delete all trashed messages permanently?</string>
<string name="title_delete_operation">Delete operations with an error message?</string>
<string name="title_folder_name">Folder name</string>