Add some click shortcut
This commit is contained in:
parent
ba24c30d38
commit
f76b4c06c5
@ -116,6 +116,7 @@ class RoomProfileFragment @Inject constructor(
|
|||||||
.observe()
|
.observe()
|
||||||
.subscribe { handleQuickActions(it) }
|
.subscribe { handleQuickActions(it) }
|
||||||
.disposeOnDestroyView()
|
.disposeOnDestroyView()
|
||||||
|
setupClicks()
|
||||||
setupLongClicks()
|
setupLongClicks()
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -124,6 +125,22 @@ class RoomProfileFragment @Inject constructor(
|
|||||||
views.waitingView.waitingStatusText.isVisible = true
|
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() {
|
private fun setupLongClicks() {
|
||||||
headerViews.roomProfileNameView.copyOnLongClick()
|
headerViews.roomProfileNameView.copyOnLongClick()
|
||||||
headerViews.roomProfileAliasView.copyOnLongClick()
|
headerViews.roomProfileAliasView.copyOnLongClick()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user