mirror of https://github.com/M66B/FairEmail.git
Navigate to message list from sync operation
This commit is contained in:
parent
b86ef47469
commit
c18cef03e6
|
@ -95,30 +95,50 @@ public class AdapterOperation extends RecyclerView.Adapter<AdapterOperation.View
|
||||||
return;
|
return;
|
||||||
|
|
||||||
EntityOperation operation = filtered.get(pos);
|
EntityOperation operation = filtered.get(pos);
|
||||||
if (operation.message == null)
|
if (operation.message == null) {
|
||||||
return;
|
Bundle args = new Bundle();
|
||||||
|
args.putLong("id", operation.folder);
|
||||||
|
|
||||||
Bundle args = new Bundle();
|
new SimpleTask<EntityFolder>() {
|
||||||
args.putLong("id", operation.message);
|
@Override
|
||||||
|
protected EntityFolder onLoad(Context context, Bundle args) {
|
||||||
|
long id = args.getLong("id");
|
||||||
|
return DB.getInstance(context).folder().getFolder(id);
|
||||||
|
}
|
||||||
|
|
||||||
new SimpleTask<EntityMessage>() {
|
@Override
|
||||||
@Override
|
protected void onLoaded(Bundle args, EntityFolder folder) {
|
||||||
protected EntityMessage onLoad(Context context, Bundle args) {
|
LocalBroadcastManager lbm = LocalBroadcastManager.getInstance(context);
|
||||||
long id = args.getLong("id");
|
lbm.sendBroadcast(
|
||||||
return DB.getInstance(context).message().getMessage(id);
|
new Intent(ActivityView.ACTION_VIEW_MESSAGES)
|
||||||
}
|
.putExtra("account", folder.account)
|
||||||
|
.putExtra("folder", folder.id)
|
||||||
|
.putExtra("outgoing", folder.isOutgoing()));
|
||||||
|
}
|
||||||
|
}.load(context, owner, args);
|
||||||
|
} else {
|
||||||
|
Bundle args = new Bundle();
|
||||||
|
args.putLong("id", operation.message);
|
||||||
|
|
||||||
@Override
|
new SimpleTask<EntityMessage>() {
|
||||||
protected void onLoaded(Bundle args, EntityMessage message) {
|
@Override
|
||||||
LocalBroadcastManager lbm = LocalBroadcastManager.getInstance(context);
|
protected EntityMessage onLoad(Context context, Bundle args) {
|
||||||
lbm.sendBroadcast(
|
long id = args.getLong("id");
|
||||||
new Intent(ActivityView.ACTION_VIEW_THREAD)
|
return DB.getInstance(context).message().getMessage(id);
|
||||||
.putExtra("account", message.account)
|
}
|
||||||
.putExtra("thread", message.thread)
|
|
||||||
.putExtra("id", message.id)
|
@Override
|
||||||
.putExtra("found", message.ui_found));
|
protected void onLoaded(Bundle args, EntityMessage message) {
|
||||||
}
|
LocalBroadcastManager lbm = LocalBroadcastManager.getInstance(context);
|
||||||
}.load(context, owner, args);
|
lbm.sendBroadcast(
|
||||||
|
new Intent(ActivityView.ACTION_VIEW_THREAD)
|
||||||
|
.putExtra("account", message.account)
|
||||||
|
.putExtra("thread", message.thread)
|
||||||
|
.putExtra("id", message.id)
|
||||||
|
.putExtra("found", message.ui_found));
|
||||||
|
}
|
||||||
|
}.load(context, owner, args);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in New Issue