mirror of
https://github.com/M66B/FairEmail.git
synced 2025-12-29 00:51:44 +01:00
Show operation errors in nav menu
This commit is contained in:
@@ -378,10 +378,12 @@ public class ActivityView extends ActivityBilling implements FragmentManager.OnB
|
||||
}
|
||||
});
|
||||
|
||||
db.operation().liveCount().observe(this, new Observer<Integer>() {
|
||||
db.operation().liveStats().observe(this, new Observer<TupleOperationStats>() {
|
||||
@Override
|
||||
public void onChanged(Integer count) {
|
||||
navOperations.setCount(count);
|
||||
public void onChanged(TupleOperationStats stats) {
|
||||
navOperations.setIcon(stats == null || stats.errors == null || stats.errors == 0
|
||||
? R.drawable.baseline_list_24 : R.drawable.baseline_warning_24);
|
||||
navOperations.setCount(stats == null ? 0 : stats.pending);
|
||||
madapter.notifyDataSetChanged();
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user