mirror of
https://github.com/M66B/FairEmail.git
synced 2026-03-31 06:08:31 +02:00
Added attachment subsequence
This commit is contained in:
@@ -62,6 +62,7 @@ public class AdapterAttachment extends RecyclerView.Adapter<AdapterAttachment.Vi
|
||||
|
||||
private boolean readonly;
|
||||
private boolean debug;
|
||||
private int dp12;
|
||||
|
||||
private List<EntityAttachment> items = new ArrayList<>();
|
||||
|
||||
@@ -111,6 +112,10 @@ public class AdapterAttachment extends RecyclerView.Adapter<AdapterAttachment.Vi
|
||||
private void bindTo(EntityAttachment attachment) {
|
||||
view.setAlpha(!attachment.isAttachment() ? Helper.LOW_LIGHT : 1.0f);
|
||||
|
||||
ViewGroup.MarginLayoutParams lparam = (ViewGroup.MarginLayoutParams) view.getLayoutParams();
|
||||
lparam.setMarginStart(attachment.subsequence == null ? 0 : dp12);
|
||||
view.setLayoutParams(lparam);
|
||||
|
||||
ibDelete.setVisibility(readonly ? View.GONE : View.VISIBLE);
|
||||
|
||||
int resid = 0;
|
||||
@@ -316,6 +321,7 @@ public class AdapterAttachment extends RecyclerView.Adapter<AdapterAttachment.Vi
|
||||
|
||||
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
|
||||
this.debug = prefs.getBoolean("debug", false);
|
||||
this.dp12 = Helper.dp2pixels(context, 12);
|
||||
|
||||
setHasStableIds(true);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user