mirror of
https://github.com/vector-im/element-android.git
synced 2024-11-15 01:35:07 +08:00
Rename method and class for more clarity
This commit is contained in:
parent
0cfea40b24
commit
c029564590
@ -99,11 +99,11 @@ class RoomProfileActivity :
|
|||||||
.observe()
|
.observe()
|
||||||
.subscribe { sharedAction ->
|
.subscribe { sharedAction ->
|
||||||
when (sharedAction) {
|
when (sharedAction) {
|
||||||
is RoomProfileSharedAction.OpenRoomMembers -> openRoomMembers()
|
is RoomProfileSharedAction.OpenRoomMembers -> openRoomMembers()
|
||||||
is RoomProfileSharedAction.OpenRoomSettings -> openRoomSettings()
|
is RoomProfileSharedAction.OpenRoomSettings -> openRoomSettings()
|
||||||
is RoomProfileSharedAction.OpenRoomAlias -> openRoomAlias()
|
is RoomProfileSharedAction.OpenRoomAliasesSettings -> openRoomAlias()
|
||||||
is RoomProfileSharedAction.OpenRoomUploads -> openRoomUploads()
|
is RoomProfileSharedAction.OpenRoomUploads -> openRoomUploads()
|
||||||
is RoomProfileSharedAction.OpenBannedRoomMembers -> openBannedRoomMembers()
|
is RoomProfileSharedAction.OpenBannedRoomMembers -> openBannedRoomMembers()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.disposeOnDestroy()
|
.disposeOnDestroy()
|
||||||
|
@ -23,7 +23,7 @@ import im.vector.app.core.platform.VectorSharedAction
|
|||||||
*/
|
*/
|
||||||
sealed class RoomProfileSharedAction : VectorSharedAction {
|
sealed class RoomProfileSharedAction : VectorSharedAction {
|
||||||
object OpenRoomSettings : RoomProfileSharedAction()
|
object OpenRoomSettings : RoomProfileSharedAction()
|
||||||
object OpenRoomAlias : RoomProfileSharedAction()
|
object OpenRoomAliasesSettings : RoomProfileSharedAction()
|
||||||
object OpenRoomUploads : RoomProfileSharedAction()
|
object OpenRoomUploads : RoomProfileSharedAction()
|
||||||
object OpenRoomMembers : RoomProfileSharedAction()
|
object OpenRoomMembers : RoomProfileSharedAction()
|
||||||
object OpenBannedRoomMembers : RoomProfileSharedAction()
|
object OpenBannedRoomMembers : RoomProfileSharedAction()
|
||||||
|
@ -46,7 +46,7 @@ class RoomSettingsController @Inject constructor(
|
|||||||
fun onNameChanged(name: String)
|
fun onNameChanged(name: String)
|
||||||
fun onTopicChanged(topic: String)
|
fun onTopicChanged(topic: String)
|
||||||
fun onHistoryVisibilityClicked()
|
fun onHistoryVisibilityClicked()
|
||||||
fun onOpenAlias()
|
fun onRoomAliasesClicked()
|
||||||
}
|
}
|
||||||
|
|
||||||
private val dividerColor = colorProvider.getColorFromAttribute(R.attr.vctr_list_divider_color)
|
private val dividerColor = colorProvider.getColorFromAttribute(R.attr.vctr_list_divider_color)
|
||||||
@ -115,7 +115,7 @@ class RoomSettingsController @Inject constructor(
|
|||||||
dividerColor = dividerColor,
|
dividerColor = dividerColor,
|
||||||
divider = true,
|
divider = true,
|
||||||
editable = true,
|
editable = true,
|
||||||
action = { callback?.onOpenAlias() }
|
action = { callback?.onRoomAliasesClicked() }
|
||||||
)
|
)
|
||||||
|
|
||||||
buildProfileAction(
|
buildProfileAction(
|
||||||
|
@ -168,8 +168,8 @@ class RoomSettingsFragment @Inject constructor(
|
|||||||
return@withState
|
return@withState
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onOpenAlias() {
|
override fun onRoomAliasesClicked() {
|
||||||
roomProfileSharedActionViewModel.post(RoomProfileSharedAction.OpenRoomAlias)
|
roomProfileSharedActionViewModel.post(RoomProfileSharedAction.OpenRoomAliasesSettings)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onImageReady(uri: Uri?) {
|
override fun onImageReady(uri: Uri?) {
|
||||||
|
Loading…
Reference in New Issue
Block a user