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,9 +95,28 @@ 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);
|
||||||
|
|
||||||
|
new SimpleTask<EntityFolder>() {
|
||||||
|
@Override
|
||||||
|
protected EntityFolder onLoad(Context context, Bundle args) {
|
||||||
|
long id = args.getLong("id");
|
||||||
|
return DB.getInstance(context).folder().getFolder(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onLoaded(Bundle args, EntityFolder folder) {
|
||||||
|
LocalBroadcastManager lbm = LocalBroadcastManager.getInstance(context);
|
||||||
|
lbm.sendBroadcast(
|
||||||
|
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();
|
Bundle args = new Bundle();
|
||||||
args.putLong("id", operation.message);
|
args.putLong("id", operation.message);
|
||||||
|
|
||||||
|
@ -120,6 +139,7 @@ public class AdapterOperation extends RecyclerView.Adapter<AdapterOperation.View
|
||||||
}
|
}
|
||||||
}.load(context, owner, args);
|
}.load(context, owner, args);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onLongClick(View view) {
|
public boolean onLongClick(View view) {
|
||||||
|
|
Loading…
Reference in New Issue