Hide "Explore rooms" in simplified mode also in new layout

Change-Id: Ica471fbf23b106c2fbe761257c04250131f4d7ee
This commit is contained in:
SpiritCroc 2022-10-23 10:11:03 +02:00
parent 5d147d9665
commit 00e02789e7
1 changed files with 4 additions and 0 deletions

View File

@ -21,16 +21,19 @@ import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.core.view.isVisible
import dagger.hilt.android.AndroidEntryPoint
import im.vector.app.core.platform.VectorBaseBottomSheetDialogFragment
import im.vector.app.databinding.FragmentNewChatBottomSheetBinding
import im.vector.app.features.navigation.Navigator
import im.vector.app.features.settings.VectorPreferences
import javax.inject.Inject
@AndroidEntryPoint
class NewChatBottomSheet : VectorBaseBottomSheetDialogFragment<FragmentNewChatBottomSheetBinding>() {
@Inject lateinit var navigator: Navigator
@Inject lateinit var vectorPreferences: VectorPreferences
override fun getBinding(inflater: LayoutInflater, container: ViewGroup?): FragmentNewChatBottomSheetBinding {
return FragmentNewChatBottomSheetBinding.inflate(inflater, container, false)
@ -55,6 +58,7 @@ class NewChatBottomSheet : VectorBaseBottomSheetDialogFragment<FragmentNewChatBo
dismiss()
navigator.openRoomDirectory(requireContext())
}
views.exploreRooms.isVisible = !vectorPreferences.simplifiedMode()
}
override fun onCreateDialog(savedInstanceState: Bundle?): Dialog {