Take threading into account for account unread count

This commit is contained in:
M66B
2018-12-16 19:35:54 +01:00
parent bb9708f17f
commit 1cb75e8720
6 changed files with 20 additions and 14 deletions

View File

@@ -1366,11 +1366,11 @@ public class FragmentCompose extends FragmentEx {
final DB db = DB.getInstance(getContext());
db.account().liveAccounts(true).observe(getViewLifecycleOwner(), new Observer<List<TupleAccountEx>>() {
db.account().liveAccounts(true).observe(getViewLifecycleOwner(), new Observer<List<EntityAccount>>() {
private LiveData<List<EntityIdentity>> liveIdentities = null;
@Override
public void onChanged(List<TupleAccountEx> accounts) {
public void onChanged(List<EntityAccount> accounts) {
if (accounts == null)
accounts = new ArrayList<>();
@@ -1780,11 +1780,11 @@ public class FragmentCompose extends FragmentEx {
EntityAccount account;
}
public class AccountAdapter extends ArrayAdapter<TupleAccountEx> {
public class AccountAdapter extends ArrayAdapter<EntityAccount> {
private Context context;
private List<TupleAccountEx> accounts;
private List<EntityAccount> accounts;
AccountAdapter(@NonNull Context context, List<TupleAccountEx> accounts) {
AccountAdapter(@NonNull Context context, List<EntityAccount> accounts) {
super(context, 0, accounts);
this.context = context;
this.accounts = accounts;