Density is context dependent

pull/146/head
M66B 6 years ago
parent 45016d8720
commit 7ba1ace5b0

@ -1446,7 +1446,7 @@ public class AdapterMessage extends PagedListAdapter<TupleMessageEx, AdapterMess
this.preview = prefs.getBoolean("preview", false);
this.debug = prefs.getBoolean("debug", false);
this.dp24 = Math.round(24 * Resources.getSystem().getDisplayMetrics().density);
this.dp24 = Math.round(24 * context.getResources().getDisplayMetrics().density);
this.theme = prefs.getString("theme", "light");
}

@ -347,7 +347,7 @@ public class FragmentMessages extends FragmentEx {
boolean inbox = (EntityFolder.ARCHIVE.equals(message.folderType) || EntityFolder.TRASH.equals(message.folderType));
View itemView = viewHolder.itemView;
int margin = Math.round(12 * (getResources().getDisplayMetrics().density));
int margin = Math.round(12 * (getContext().getResources().getDisplayMetrics().density));
if (dX > margin) {
// Right swipe

Loading…
Cancel
Save