|
|
|
@ -1132,10 +1132,8 @@ public class FragmentMessages extends FragmentEx {
|
|
|
|
|
if (message != null) {
|
|
|
|
|
List<EntityMessage> messages = db.message().getMessageByThread(
|
|
|
|
|
message.account, message.thread, threading ? null : id, message.folder);
|
|
|
|
|
for (EntityMessage threaded : messages) {
|
|
|
|
|
for (EntityMessage threaded : messages)
|
|
|
|
|
result.ids.add(threaded.id);
|
|
|
|
|
db.message().setMessageUiHide(threaded.id, true);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -1873,6 +1871,10 @@ public class FragmentMessages extends FragmentEx {
|
|
|
|
|
if (result.target == null)
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getContext());
|
|
|
|
|
if (prefs.getBoolean("automove", false))
|
|
|
|
|
moveAskConfirmed(result);
|
|
|
|
|
else {
|
|
|
|
|
String title = getResources().getQuantityString(
|
|
|
|
|
R.plurals.title_moving_messages, result.ids.size(),
|
|
|
|
|
result.ids.size(), result.target.getDisplayName(getContext()));
|
|
|
|
@ -1881,6 +1883,15 @@ public class FragmentMessages extends FragmentEx {
|
|
|
|
|
.setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {
|
|
|
|
|
@Override
|
|
|
|
|
public void onClick(DialogInterface dialog, int which) {
|
|
|
|
|
moveAskConfirmed(result);
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
.setNegativeButton(android.R.string.cancel, null)
|
|
|
|
|
.show();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void moveAskConfirmed(MessageTarget result) {
|
|
|
|
|
Bundle args = new Bundle();
|
|
|
|
|
args.putSerializable("result", result);
|
|
|
|
|
|
|
|
|
@ -1890,6 +1901,8 @@ public class FragmentMessages extends FragmentEx {
|
|
|
|
|
protected Void onLoad(Context context, Bundle args) {
|
|
|
|
|
DB db = DB.getInstance(context);
|
|
|
|
|
try {
|
|
|
|
|
MessageTarget result = (MessageTarget) args.getSerializable("result");
|
|
|
|
|
|
|
|
|
|
db.beginTransaction();
|
|
|
|
|
|
|
|
|
|
for (long id : result.ids) {
|
|
|
|
@ -1914,10 +1927,6 @@ public class FragmentMessages extends FragmentEx {
|
|
|
|
|
}
|
|
|
|
|
}.load(FragmentMessages.this, args);
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
.setNegativeButton(android.R.string.cancel, null)
|
|
|
|
|
.show();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void moveUndo(final MessageTarget result) {
|
|
|
|
|
if (result.target == null)
|
|
|
|
|