mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-11-27 03:49:04 +03:00
Add some click shortcut
This commit is contained in:
parent
ba24c30d38
commit
f76b4c06c5
1 changed files with 17 additions and 0 deletions
|
@ -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 a new issue