mirror of
https://github.com/M66B/FairEmail.git
synced 2026-04-11 19:43:11 +02:00
Show backoff state
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
@@ -89,9 +89,14 @@ public class AdapterNavAccount extends RecyclerView.Adapter<AdapterNavAccount.Vi
|
||||
}
|
||||
|
||||
private void bindTo(TupleAccountEx account) {
|
||||
ivItem.setImageResource("connected".equals(account.state)
|
||||
? account.primary ? R.drawable.twotone_folder_special_24 : R.drawable.twotone_folder_done_24
|
||||
: R.drawable.twotone_folder_24);
|
||||
if ("connected".equals(account.state))
|
||||
ivItem.setImageResource(account.primary
|
||||
? R.drawable.twotone_folder_special_24
|
||||
: R.drawable.twotone_folder_done_24);
|
||||
else
|
||||
ivItem.setImageResource(account.backoff_until == null
|
||||
? R.drawable.twotone_folder_24
|
||||
: R.drawable.twotone_update_24);
|
||||
|
||||
if (account.color == null)
|
||||
ivItem.clearColorFilter();
|
||||
|
||||
@@ -58,9 +58,19 @@ public class FragmentLegend extends FragmentBase {
|
||||
pager = view.findViewById(R.id.pager);
|
||||
adapter = new PagerAdapter(getChildFragmentManager());
|
||||
pager.setAdapter(adapter);
|
||||
} else
|
||||
} else {
|
||||
view = inflater.inflate(layout, container, false);
|
||||
|
||||
if (layout == R.layout.fragment_legend_synchronization) {
|
||||
view.findViewById(R.id.ibInfoBackoff).setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Helper.viewFAQ(getContext(), 123);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
return view;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user