mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-12-25 01:00:55 +01:00
Add some click shortcut
This commit is contained in:
parent
ba24c30d38
commit
f76b4c06c5
@ -116,6 +116,7 @@ class RoomProfileFragment @Inject constructor(
|
||||
.observe()
|
||||
.subscribe { handleQuickActions(it) }
|
||||
.disposeOnDestroyView()
|
||||
setupClicks()
|
||||
setupLongClicks()
|
||||
}
|
||||
|
||||
@ -124,6 +125,22 @@ class RoomProfileFragment @Inject constructor(
|
||||
views.waitingView.waitingStatusText.isVisible = true
|
||||
}
|
||||
|
||||
private fun setupClicks() {
|
||||
// Shortcut to room settings
|
||||
listOf(
|
||||
headerViews.roomProfileNameView,
|
||||
views.matrixProfileToolbarTitleView,
|
||||
).forEach {
|
||||
it.setOnClickListener {
|
||||
roomProfileSharedActionViewModel.post(RoomProfileSharedAction.OpenRoomSettings)
|
||||
}
|
||||
}
|
||||
// Shortcut to room alias
|
||||
headerViews.roomProfileAliasView.setOnClickListener {
|
||||
roomProfileSharedActionViewModel.post(RoomProfileSharedAction.OpenRoomAliasesSettings)
|
||||
}
|
||||
}
|
||||
|
||||
private fun setupLongClicks() {
|
||||
headerViews.roomProfileNameView.copyOnLongClick()
|
||||
headerViews.roomProfileAliasView.copyOnLongClick()
|
||||
|
Loading…
Reference in New Issue
Block a user