Show "to do" for accounts, identities and permissions

Fixes #18
pull/50/head
M66B 6 years ago
parent ab485f8d43
commit 44feb7c26d

@ -141,9 +141,9 @@ public class FragmentSetup extends FragmentEx {
pbAccount.setVisibility(View.GONE);
pbIdentity.setVisibility(View.GONE);
tvAccountDone.setVisibility(View.INVISIBLE);
tvIdentityDone.setVisibility(View.INVISIBLE);
tvPermissionsDone.setVisibility(View.INVISIBLE);
tvAccountDone.setText(R.string.title_setup_to_do);
tvIdentityDone.setText(R.string.title_setup_to_do);
tvPermissionsDone.setText(R.string.title_setup_to_do);
int[] grantResults = new int[permissions.length];
for (int i = 0; i < permissions.length; i++)
@ -195,14 +195,14 @@ public class FragmentSetup extends FragmentEx {
db.account().liveAccounts(true).observe(getViewLifecycleOwner(), new Observer<List<EntityAccount>>() {
@Override
public void onChanged(@Nullable List<EntityAccount> accounts) {
tvAccountDone.setVisibility(accounts != null && accounts.size() > 0 ? View.VISIBLE : View.INVISIBLE);
tvAccountDone.setText(accounts != null && accounts.size() > 0 ? R.string.title_setup_done : R.string.title_setup_to_do);
}
});
db.identity().liveIdentities(true).observe(getViewLifecycleOwner(), new Observer<List<EntityIdentity>>() {
@Override
public void onChanged(@Nullable List<EntityIdentity> identities) {
tvIdentityDone.setVisibility(identities != null && identities.size() > 0 ? View.VISIBLE : View.INVISIBLE);
tvIdentityDone.setText(identities != null && identities.size() > 0 ? R.string.title_setup_done : R.string.title_setup_to_do);
}
});
}
@ -217,6 +217,6 @@ public class FragmentSetup extends FragmentEx {
}
btnPermissions.setEnabled(!has);
tvPermissionsDone.setVisibility(has ? View.VISIBLE : View.INVISIBLE);
tvPermissionsDone.setText(has ? R.string.title_setup_done : R.string.title_setup_to_do);
}
}

@ -43,8 +43,8 @@
<string name="title_setup_identity_remark">To send email</string>
<string name="title_setup_permissions">Grant permissions</string>
<string name="title_setup_permissions_remark">To autocomplete addresses (optional)</string>
<string name="title_setup_to_do">To do</string>
<string name="title_setup_done">Done</string>
<string name="title_setup_granted">Granted</string>
<string name="title_setup_dark_theme">Dark theme</string>
<string name="title_setup_debug">Debug</string>
<string name="title_identity_name">Your name</string>

@ -59,8 +59,8 @@
<string name="title_setup_identity_remark">To send email</string>
<string name="title_setup_permissions">Grant permissions</string>
<string name="title_setup_permissions_remark">To autocomplete addresses (optional)</string>
<string name="title_setup_to_do">To do</string>
<string name="title_setup_done">Done</string>
<string name="title_setup_granted">Granted</string>
<string name="title_setup_dark_theme">Dark theme</string>
<string name="title_setup_debug">Debug</string>
<string name="title_identity_name">Your name</string>

@ -59,8 +59,8 @@
<string name="title_setup_identity_remark">To send email</string>
<string name="title_setup_permissions">Grant permissions</string>
<string name="title_setup_permissions_remark">To autocomplete addresses (optional)</string>
<string name="title_setup_to_do">To do</string>
<string name="title_setup_done">Done</string>
<string name="title_setup_granted">Granted</string>
<string name="title_setup_dark_theme">Dark theme</string>
<string name="title_setup_debug">Debug</string>
<string name="title_identity_name">Your name</string>

@ -59,8 +59,8 @@
<string name="title_setup_identity_remark">To send email</string>
<string name="title_setup_permissions">Grant permissions</string>
<string name="title_setup_permissions_remark">To autocomplete addresses (optional)</string>
<string name="title_setup_to_do">To do</string>
<string name="title_setup_done">Done</string>
<string name="title_setup_granted">Granted</string>
<string name="title_setup_dark_theme">Dark theme</string>
<string name="title_setup_debug">Debug</string>
<string name="title_identity_name">Your name</string>

@ -59,8 +59,8 @@
<string name="title_setup_identity_remark">To send email</string>
<string name="title_setup_permissions">Grant permissions</string>
<string name="title_setup_permissions_remark">To autocomplete addresses (optional)</string>
<string name="title_setup_to_do">To do</string>
<string name="title_setup_done">Done</string>
<string name="title_setup_granted">Granted</string>
<string name="title_setup_dark_theme">Dark theme</string>
<string name="title_setup_debug">Debug</string>
<string name="title_identity_name">Your name</string>

@ -59,8 +59,8 @@
<string name="title_setup_identity_remark">To send email</string>
<string name="title_setup_permissions">Grant permissions</string>
<string name="title_setup_permissions_remark">To autocomplete addresses (optional)</string>
<string name="title_setup_to_do">To do</string>
<string name="title_setup_done">Done</string>
<string name="title_setup_granted">Granted</string>
<string name="title_setup_dark_theme">Dark theme</string>
<string name="title_setup_debug">Debug</string>
<string name="title_identity_name">Your name</string>

@ -43,8 +43,8 @@
<string name="title_setup_identity_remark">To send email</string>
<string name="title_setup_permissions">Grant permissions</string>
<string name="title_setup_permissions_remark">To autocomplete addresses (optional)</string>
<string name="title_setup_to_do">To do</string>
<string name="title_setup_done">Done</string>
<string name="title_setup_granted">Granted</string>
<string name="title_setup_dark_theme">Dark theme</string>
<string name="title_setup_debug">Debug</string>
<string name="title_identity_name">Your name</string>

@ -51,8 +51,8 @@
<string name="title_setup_identity_remark">To send email</string>
<string name="title_setup_permissions">Grant permissions</string>
<string name="title_setup_permissions_remark">To autocomplete addresses (optional)</string>
<string name="title_setup_to_do">To do</string>
<string name="title_setup_done">Done</string>
<string name="title_setup_granted">Granted</string>
<string name="title_setup_dark_theme">Dark theme</string>
<string name="title_setup_debug">Debug</string>
<string name="title_identity_name">Your name</string>

@ -43,8 +43,8 @@
<string name="title_setup_identity_remark">To send email</string>
<string name="title_setup_permissions">Grant permissions</string>
<string name="title_setup_permissions_remark">To autocomplete addresses (optional)</string>
<string name="title_setup_to_do">To do</string>
<string name="title_setup_done">Done</string>
<string name="title_setup_granted">Granted</string>
<string name="title_setup_dark_theme">Dark theme</string>
<string name="title_setup_debug">Debug</string>
<string name="title_identity_name">Your name</string>

@ -43,8 +43,8 @@
<string name="title_setup_identity_remark">Um E-Mails zu senden</string>
<string name="title_setup_permissions">Berechtigungen erteilen</string>
<string name="title_setup_permissions_remark">Um Adressen zu autovervollständigen (optional)</string>
<string name="title_setup_to_do">To do</string>
<string name="title_setup_done">Fertig</string>
<string name="title_setup_granted">Gewährt</string>
<string name="title_setup_dark_theme">Dunkles Thema</string>
<string name="title_setup_debug">Debug</string>
<string name="title_identity_name">Your name</string>

@ -43,8 +43,8 @@
<string name="title_setup_identity_remark">To send email</string>
<string name="title_setup_permissions">Grant permissions</string>
<string name="title_setup_permissions_remark">To autocomplete addresses (optional)</string>
<string name="title_setup_to_do">To do</string>
<string name="title_setup_done">Done</string>
<string name="title_setup_granted">Granted</string>
<string name="title_setup_dark_theme">Dark theme</string>
<string name="title_setup_debug">Debug</string>
<string name="title_identity_name">Your name</string>

@ -43,8 +43,8 @@
<string name="title_setup_identity_remark">To send email</string>
<string name="title_setup_permissions">Grant permissions</string>
<string name="title_setup_permissions_remark">To autocomplete addresses (optional)</string>
<string name="title_setup_to_do">To do</string>
<string name="title_setup_done">Done</string>
<string name="title_setup_granted">Granted</string>
<string name="title_setup_dark_theme">Dark theme</string>
<string name="title_setup_debug">Debug</string>
<string name="title_identity_name">Your name</string>

@ -43,8 +43,8 @@
<string name="title_setup_identity_remark">To send email</string>
<string name="title_setup_permissions">Grant permissions</string>
<string name="title_setup_permissions_remark">To autocomplete addresses (optional)</string>
<string name="title_setup_to_do">To do</string>
<string name="title_setup_done">Done</string>
<string name="title_setup_granted">Granted</string>
<string name="title_setup_dark_theme">Dark theme</string>
<string name="title_setup_debug">Debug</string>
<string name="title_identity_name">Your name</string>

@ -43,8 +43,8 @@
<string name="title_setup_identity_remark">To send email</string>
<string name="title_setup_permissions">Grant permissions</string>
<string name="title_setup_permissions_remark">To autocomplete addresses (optional)</string>
<string name="title_setup_to_do">To do</string>
<string name="title_setup_done">Done</string>
<string name="title_setup_granted">Granted</string>
<string name="title_setup_dark_theme">Dark theme</string>
<string name="title_setup_debug">Debug</string>
<string name="title_identity_name">Your name</string>

@ -43,8 +43,8 @@
<string name="title_setup_identity_remark">To send email</string>
<string name="title_setup_permissions">Grant permissions</string>
<string name="title_setup_permissions_remark">To autocomplete addresses (optional)</string>
<string name="title_setup_to_do">To do</string>
<string name="title_setup_done">Done</string>
<string name="title_setup_granted">Granted</string>
<string name="title_setup_dark_theme">Dark theme</string>
<string name="title_setup_debug">Debug</string>
<string name="title_identity_name">Your name</string>

@ -51,8 +51,8 @@
<string name="title_setup_identity_remark">To send email</string>
<string name="title_setup_permissions">Grant permissions</string>
<string name="title_setup_permissions_remark">To autocomplete addresses (optional)</string>
<string name="title_setup_to_do">To do</string>
<string name="title_setup_done">Done</string>
<string name="title_setup_granted">Granted</string>
<string name="title_setup_dark_theme">Dark theme</string>
<string name="title_setup_debug">Debug</string>
<string name="title_identity_name">Your name</string>

@ -43,8 +43,8 @@
<string name="title_setup_identity_remark">To send email</string>
<string name="title_setup_permissions">Grant permissions</string>
<string name="title_setup_permissions_remark">To autocomplete addresses (optional)</string>
<string name="title_setup_to_do">To do</string>
<string name="title_setup_done">Done</string>
<string name="title_setup_granted">Granted</string>
<string name="title_setup_dark_theme">Dark theme</string>
<string name="title_setup_debug">Debug</string>
<string name="title_identity_name">Your name</string>

@ -43,8 +43,8 @@
<string name="title_setup_identity_remark">To send email</string>
<string name="title_setup_permissions">Grant permissions</string>
<string name="title_setup_permissions_remark">To autocomplete addresses (optional)</string>
<string name="title_setup_to_do">To do</string>
<string name="title_setup_done">Done</string>
<string name="title_setup_granted">Granted</string>
<string name="title_setup_dark_theme">Dark theme</string>
<string name="title_setup_debug">Debug</string>
<string name="title_identity_name">Your name</string>

@ -51,8 +51,8 @@
<string name="title_setup_identity_remark">To send email</string>
<string name="title_setup_permissions">Grant permissions</string>
<string name="title_setup_permissions_remark">To autocomplete addresses (optional)</string>
<string name="title_setup_to_do">To do</string>
<string name="title_setup_done">Done</string>
<string name="title_setup_granted">Granted</string>
<string name="title_setup_dark_theme">Dark theme</string>
<string name="title_setup_debug">Debug</string>
<string name="title_identity_name">Your name</string>

@ -39,8 +39,8 @@
<string name="title_setup_identity_remark">To send email</string>
<string name="title_setup_permissions">Grant permissions</string>
<string name="title_setup_permissions_remark">To autocomplete addresses (optional)</string>
<string name="title_setup_to_do">To do</string>
<string name="title_setup_done">Done</string>
<string name="title_setup_granted">Granted</string>
<string name="title_setup_dark_theme">Dark theme</string>
<string name="title_setup_debug">Debug</string>
<string name="title_identity_name">Your name</string>

@ -39,8 +39,8 @@
<string name="title_setup_identity_remark">To send email</string>
<string name="title_setup_permissions">Grant permissions</string>
<string name="title_setup_permissions_remark">To autocomplete addresses (optional)</string>
<string name="title_setup_to_do">To do</string>
<string name="title_setup_done">Done</string>
<string name="title_setup_granted">Granted</string>
<string name="title_setup_dark_theme">Dark theme</string>
<string name="title_setup_debug">Debug</string>
<string name="title_identity_name">Your name</string>

@ -43,8 +43,8 @@
<string name="title_setup_identity_remark">To send email</string>
<string name="title_setup_permissions">Grant permissions</string>
<string name="title_setup_permissions_remark">To autocomplete addresses (optional)</string>
<string name="title_setup_to_do">To do</string>
<string name="title_setup_done">Done</string>
<string name="title_setup_granted">Granted</string>
<string name="title_setup_dark_theme">Dark theme</string>
<string name="title_setup_debug">Debug</string>
<string name="title_identity_name">Your name</string>

@ -43,8 +43,8 @@
<string name="title_setup_identity_remark">To send email</string>
<string name="title_setup_permissions">Grant permissions</string>
<string name="title_setup_permissions_remark">To autocomplete addresses (optional)</string>
<string name="title_setup_to_do">To do</string>
<string name="title_setup_done">Done</string>
<string name="title_setup_granted">Granted</string>
<string name="title_setup_dark_theme">Dark theme</string>
<string name="title_setup_debug">Debug</string>
<string name="title_identity_name">Your name</string>

@ -43,8 +43,8 @@
<string name="title_setup_identity_remark">To send email</string>
<string name="title_setup_permissions">Grant permissions</string>
<string name="title_setup_permissions_remark">To autocomplete addresses (optional)</string>
<string name="title_setup_to_do">To do</string>
<string name="title_setup_done">Done</string>
<string name="title_setup_granted">Granted</string>
<string name="title_setup_dark_theme">Dark theme</string>
<string name="title_setup_debug">Debug</string>
<string name="title_identity_name">Your name</string>

@ -51,8 +51,8 @@
<string name="title_setup_identity_remark">To send email</string>
<string name="title_setup_permissions">Grant permissions</string>
<string name="title_setup_permissions_remark">To autocomplete addresses (optional)</string>
<string name="title_setup_to_do">To do</string>
<string name="title_setup_done">Done</string>
<string name="title_setup_granted">Granted</string>
<string name="title_setup_dark_theme">Dark theme</string>
<string name="title_setup_debug">Debug</string>
<string name="title_identity_name">Your name</string>

@ -43,8 +43,8 @@
<string name="title_setup_identity_remark">Para enviar e-mail</string>
<string name="title_setup_permissions">Garantir permissões</string>
<string name="title_setup_permissions_remark">To autocomplete addresses (optional)</string>
<string name="title_setup_to_do">To do</string>
<string name="title_setup_done">Feito</string>
<string name="title_setup_granted">Granted</string>
<string name="title_setup_dark_theme">Tema escuro</string>
<string name="title_setup_debug">Depurar</string>
<string name="title_identity_name">Your name</string>

@ -43,8 +43,8 @@
<string name="title_setup_identity_remark">To send email</string>
<string name="title_setup_permissions">Grant permissions</string>
<string name="title_setup_permissions_remark">To autocomplete addresses (optional)</string>
<string name="title_setup_to_do">To do</string>
<string name="title_setup_done">Done</string>
<string name="title_setup_granted">Granted</string>
<string name="title_setup_dark_theme">Dark theme</string>
<string name="title_setup_debug">Debug</string>
<string name="title_identity_name">Your name</string>

@ -47,8 +47,8 @@
<string name="title_setup_identity_remark">Pentru a trimite e-mail</string>
<string name="title_setup_permissions">Acordă permisiuni</string>
<string name="title_setup_permissions_remark">To autocomplete addresses (optional)</string>
<string name="title_setup_to_do">To do</string>
<string name="title_setup_done">Gata</string>
<string name="title_setup_granted">Granted</string>
<string name="title_setup_dark_theme">Temă întunecată</string>
<string name="title_setup_debug">Depanare</string>
<string name="title_identity_name">Your name</string>

@ -51,8 +51,8 @@
<string name="title_setup_identity_remark">To send email</string>
<string name="title_setup_permissions">Grant permissions</string>
<string name="title_setup_permissions_remark">To autocomplete addresses (optional)</string>
<string name="title_setup_to_do">To do</string>
<string name="title_setup_done">Done</string>
<string name="title_setup_granted">Granted</string>
<string name="title_setup_dark_theme">Dark theme</string>
<string name="title_setup_debug">Debug</string>
<string name="title_identity_name">Your name</string>

@ -47,8 +47,8 @@
<string name="title_setup_identity_remark">To send email</string>
<string name="title_setup_permissions">Grant permissions</string>
<string name="title_setup_permissions_remark">To autocomplete addresses (optional)</string>
<string name="title_setup_to_do">To do</string>
<string name="title_setup_done">Done</string>
<string name="title_setup_granted">Granted</string>
<string name="title_setup_dark_theme">Dark theme</string>
<string name="title_setup_debug">Debug</string>
<string name="title_identity_name">Your name</string>

@ -43,8 +43,8 @@
<string name="title_setup_identity_remark">To send email</string>
<string name="title_setup_permissions">Grant permissions</string>
<string name="title_setup_permissions_remark">To autocomplete addresses (optional)</string>
<string name="title_setup_to_do">To do</string>
<string name="title_setup_done">Done</string>
<string name="title_setup_granted">Granted</string>
<string name="title_setup_dark_theme">Dark theme</string>
<string name="title_setup_debug">Debug</string>
<string name="title_identity_name">Your name</string>

@ -43,8 +43,8 @@
<string name="title_setup_identity_remark">To send email</string>
<string name="title_setup_permissions">Grant permissions</string>
<string name="title_setup_permissions_remark">To autocomplete addresses (optional)</string>
<string name="title_setup_to_do">To do</string>
<string name="title_setup_done">Done</string>
<string name="title_setup_granted">Granted</string>
<string name="title_setup_dark_theme">Dark theme</string>
<string name="title_setup_debug">Debug</string>
<string name="title_identity_name">Your name</string>

@ -51,8 +51,8 @@
<string name="title_setup_identity_remark">To send email</string>
<string name="title_setup_permissions">Grant permissions</string>
<string name="title_setup_permissions_remark">To autocomplete addresses (optional)</string>
<string name="title_setup_to_do">To do</string>
<string name="title_setup_done">Done</string>
<string name="title_setup_granted">Granted</string>
<string name="title_setup_dark_theme">Dark theme</string>
<string name="title_setup_debug">Debug</string>
<string name="title_identity_name">Your name</string>

@ -39,8 +39,8 @@
<string name="title_setup_identity_remark">To send email</string>
<string name="title_setup_permissions">Grant permissions</string>
<string name="title_setup_permissions_remark">To autocomplete addresses (optional)</string>
<string name="title_setup_to_do">To do</string>
<string name="title_setup_done">Done</string>
<string name="title_setup_granted">Granted</string>
<string name="title_setup_dark_theme">Dark theme</string>
<string name="title_setup_debug">Debug</string>
<string name="title_identity_name">Your name</string>

@ -39,8 +39,8 @@
<string name="title_setup_identity_remark">To send email</string>
<string name="title_setup_permissions">Grant permissions</string>
<string name="title_setup_permissions_remark">To autocomplete addresses (optional)</string>
<string name="title_setup_to_do">To do</string>
<string name="title_setup_done">Done</string>
<string name="title_setup_granted">Granted</string>
<string name="title_setup_dark_theme">Dark theme</string>
<string name="title_setup_debug">Debug</string>
<string name="title_identity_name">Your name</string>

@ -39,8 +39,8 @@
<string name="title_setup_identity_remark">To send email</string>
<string name="title_setup_permissions">Grant permissions</string>
<string name="title_setup_permissions_remark">To autocomplete addresses (optional)</string>
<string name="title_setup_to_do">To do</string>
<string name="title_setup_done">Done</string>
<string name="title_setup_granted">Granted</string>
<string name="title_setup_dark_theme">Dark theme</string>
<string name="title_setup_debug">Debug</string>
<string name="title_identity_name">Your name</string>

@ -57,8 +57,8 @@
<string name="title_setup_identity_remark">To send email</string>
<string name="title_setup_permissions">Grant permissions</string>
<string name="title_setup_permissions_remark">To autocomplete addresses (optional)</string>
<string name="title_setup_to_do">To do</string>
<string name="title_setup_done">Done</string>
<string name="title_setup_granted">Granted</string>
<string name="title_setup_dark_theme">Dark theme</string>
<string name="title_setup_debug">Debug</string>

Loading…
Cancel
Save