Show backoff state

This commit is contained in:
M66B
2020-10-31 09:06:06 +01:00
parent 952bcd87e6
commit cb8f4480d2
6 changed files with 72 additions and 8 deletions

View File

@@ -186,8 +186,13 @@ public class AdapterAccount extends RecyclerView.Adapter<AdapterAccount.ViewHold
ivState.setImageResource(R.drawable.twotone_cancel_24);
ivState.setContentDescription(context.getString(R.string.title_legend_closing));
} else {
ivState.setImageResource(R.drawable.twotone_cloud_off_24);
ivState.setContentDescription(context.getString(R.string.title_legend_disconnected));
if (account.backoff_until == null) {
ivState.setImageResource(R.drawable.twotone_cloud_off_24);
ivState.setContentDescription(context.getString(R.string.title_legend_disconnected));
} else {
ivState.setImageResource(R.drawable.twotone_update_24);
ivState.setContentDescription(context.getString(R.string.title_legend_backoff));
}
}
ivState.setVisibility(account.synchronize || account.state != null ? View.VISIBLE : View.INVISIBLE);
@@ -456,7 +461,7 @@ public class AdapterAccount extends RecyclerView.Adapter<AdapterAccount.ViewHold
this.colorUnread = (highlight_unread ? colorHighlight : Helper.resolveColor(context, R.attr.colorUnread));
this.textColorSecondary = Helper.resolveColor(context, android.R.attr.textColorSecondary);
this.DTF = Helper.getDateTimeInstance(context, DateFormat.SHORT, DateFormat.SHORT);
this.DTF = Helper.getDateTimeInstance(context, DateFormat.SHORT, DateFormat.MEDIUM);
setHasStableIds(true);