From 037bca804e5e9543f85aed32f9e1d993cf14cfe4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20B=C3=A4lz?= Date: Wed, 21 Dec 2016 22:15:58 +0100 Subject: [PATCH] show fab button only when shared pref is true. #652 --- .../kotlin/org/mariotaku/twidere/activity/HomeActivity.kt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/twidere/src/main/kotlin/org/mariotaku/twidere/activity/HomeActivity.kt b/twidere/src/main/kotlin/org/mariotaku/twidere/activity/HomeActivity.kt index 1c974a2cb..a8309274f 100644 --- a/twidere/src/main/kotlin/org/mariotaku/twidere/activity/HomeActivity.kt +++ b/twidere/src/main/kotlin/org/mariotaku/twidere/activity/HomeActivity.kt @@ -354,6 +354,12 @@ class HomeActivity : BaseActivity(), OnClickListener, OnPageChangeListener, Supp drawerToggleButton.visibility = View.GONE } + if (preferences.getBoolean(SharedPreferenceConstants.KEY_FAB_VISIBLE)) { + actionsButton.visibility = View.VISIBLE + } else { + actionsButton.visibility = View.GONE + } + homeContent.addOnLayoutChangeListener { v, left, top, right, bottom, oldLeft, oldTop, oldRight, oldBottom -> if (top != oldTop) { val fragment = leftDrawerFragment