1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2024-12-26 17:57:16 +00:00

Indent folders below accounts

This commit is contained in:
M66B 2024-02-19 16:31:32 +01:00
parent d1eb3f6a27
commit 74f11a1872

View file

@ -84,6 +84,7 @@ public class AdapterAccount extends RecyclerView.Adapter<AdapterAccount.ViewHold
private LifecycleOwner owner;
private LayoutInflater inflater;
private int dp24;
private int colorStripeWidth;
private int colorWarning;
private int colorUnread;
@ -197,6 +198,9 @@ public class AdapterAccount extends RecyclerView.Adapter<AdapterAccount.ViewHold
}
private void bindTo(TupleAccountFolder account) {
int start = (account.folderName == null ? 0 : dp24);
view.setPaddingRelative(start, 0, 0, 0);
if (account.folderName == null) {
view.setActivated(account.tbd != null);
view.setAlpha(account.synchronize ? 1.0f : Helper.LOW_LIGHT);
@ -863,6 +867,8 @@ public class AdapterAccount extends RecyclerView.Adapter<AdapterAccount.ViewHold
this.owner = parentFragment.getViewLifecycleOwner();
this.inflater = LayoutInflater.from(context);
this.dp24 = Helper.dp2pixels(context, 24);
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
boolean color_stripe_wide = prefs.getBoolean("color_stripe_wide", false);
this.colorStripeWidth = Helper.dp2pixels(context, color_stripe_wide ? 12 : 6);