From 95df786227508ef1f541b8b4525f9ad5177c78a3 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Wed, 14 Oct 2020 12:21:27 +0200 Subject: [PATCH] Add a click action at the top of the drawer to open the general settings --- .../java/im/vector/app/features/home/HomeDrawerFragment.kt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/vector/src/main/java/im/vector/app/features/home/HomeDrawerFragment.kt b/vector/src/main/java/im/vector/app/features/home/HomeDrawerFragment.kt index b8eb054076..12689cd983 100644 --- a/vector/src/main/java/im/vector/app/features/home/HomeDrawerFragment.kt +++ b/vector/src/main/java/im/vector/app/features/home/HomeDrawerFragment.kt @@ -25,6 +25,7 @@ import im.vector.app.core.extensions.replaceChildFragment import im.vector.app.core.platform.VectorBaseFragment import im.vector.app.features.grouplist.GroupListFragment import im.vector.app.features.settings.VectorPreferences +import im.vector.app.features.settings.VectorSettingsActivity import im.vector.app.features.workers.signout.SignOutUiWorker import kotlinx.android.synthetic.main.fragment_home_drawer.* import org.matrix.android.sdk.api.session.Session @@ -57,6 +58,11 @@ class HomeDrawerFragment @Inject constructor( homeDrawerUserIdView.text = user.userId } } + // Profile + homeDrawerHeader.debouncedClicks { + sharedActionViewModel.post(HomeActivitySharedAction.CloseDrawer) + navigator.openSettings(requireActivity(), directAccess = VectorSettingsActivity.EXTRA_DIRECT_ACCESS_GENERAL) + } // Settings homeDrawerHeaderSettingsView.debouncedClicks { sharedActionViewModel.post(HomeActivitySharedAction.CloseDrawer)