From 783000e2297a9b2ae4f544a81706ba4682dcbbb8 Mon Sep 17 00:00:00 2001 From: M66B Date: Thu, 12 Aug 2021 16:36:39 +0200 Subject: [PATCH] Revert "Make sure unpinning is possible" This reverts commit d5b95d4eeef97527390363cb3a60271d1087952e. --- app/src/main/java/eu/faircode/email/ActivityView.java | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/ActivityView.java b/app/src/main/java/eu/faircode/email/ActivityView.java index e54379ab8c..4f14e6f54b 100644 --- a/app/src/main/java/eu/faircode/email/ActivityView.java +++ b/app/src/main/java/eu/faircode/email/ActivityView.java @@ -910,14 +910,12 @@ public class ActivityView extends ActivityBilling implements FragmentManager.OnB private int getDrawerWidth() { if (!nav_expanded) - return Helper.dp2pixels(this, 48); // One icon + padding + return Helper.dp2pixels(this, 48); DisplayMetrics dm = getResources().getDisplayMetrics(); if (nav_pinned) { - int minWidth = Helper.dp2pixels(this, 72); // Make sure unpinning is possible - int dp300 = Helper.dp2pixels(this, 300); - int maxWidth = dm.widthPixels - dp300; - return Math.max(Math.min(dp300, maxWidth), minWidth); + int maxWidth = dm.widthPixels - Helper.dp2pixels(this, 300); + return Math.min(Helper.dp2pixels(this, 300), maxWidth); } else { int actionBarHeight; TypedValue tv = new TypedValue();