Review account name

This commit is contained in:
M66B
2021-06-20 21:13:58 +02:00
parent a63b237bda
commit 6f07aef373
2 changed files with 23 additions and 3 deletions

View File

@@ -48,6 +48,7 @@ public class FragmentDialogAccount extends FragmentDialogBase {
final Context context = getContext();
final View dview = LayoutInflater.from(context).inflate(R.layout.dialog_review_account, null);
final TextView tvName = dview.findViewById(R.id.tvName);
final TextView tvInbox = dview.findViewById(R.id.tvInbox);
final TextView tvDrafts = dview.findViewById(R.id.tvDrafts);
final TextView tvSent = dview.findViewById(R.id.tvSent);
@@ -71,8 +72,9 @@ public class FragmentDialogAccount extends FragmentDialogBase {
tvJunk.setCompoundDrawablesRelative(null, null, null, null);
tvArchive.setCompoundDrawablesRelative(null, null, null, null);
tvLeft.setText("");
tvRight.setText("");
tvName.setText(null);
tvLeft.setText(null);
tvRight.setText(null);
Bundle args = getArguments();
final long account = args.getLong("account");
@@ -90,6 +92,14 @@ public class FragmentDialogAccount extends FragmentDialogBase {
});
DB db = DB.getInstance(context);
db.account().liveAccount(account).observe(this, new Observer<EntityAccount>() {
@Override
public void onChanged(EntityAccount account) {
tvName.setText(account.name);
}
});
db.account().liveAccountSwipes(account).observe(this, new Observer<List<TupleAccountSwipes>>() {
@Override
public void onChanged(List<TupleAccountSwipes> swipes) {