Skip to content

Commit

Permalink
Rename method and class for more clarity
Browse files Browse the repository at this point in the history
  • Loading branch information
bmarty committed Nov 27, 2020
1 parent c96aee8 commit 0ac04eb
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -99,11 +99,11 @@ class RoomProfileActivity :
.observe()
.subscribe { sharedAction ->
when (sharedAction) {
is RoomProfileSharedAction.OpenRoomMembers -> openRoomMembers()
is RoomProfileSharedAction.OpenRoomSettings -> openRoomSettings()
is RoomProfileSharedAction.OpenRoomAlias -> openRoomAlias()
is RoomProfileSharedAction.OpenRoomUploads -> openRoomUploads()
is RoomProfileSharedAction.OpenBannedRoomMembers -> openBannedRoomMembers()
is RoomProfileSharedAction.OpenRoomMembers -> openRoomMembers()
is RoomProfileSharedAction.OpenRoomSettings -> openRoomSettings()
is RoomProfileSharedAction.OpenRoomAliasesSettings -> openRoomAlias()
is RoomProfileSharedAction.OpenRoomUploads -> openRoomUploads()
is RoomProfileSharedAction.OpenBannedRoomMembers -> openBannedRoomMembers()
}
}
.disposeOnDestroy()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import im.vector.app.core.platform.VectorSharedAction
*/
sealed class RoomProfileSharedAction : VectorSharedAction {
object OpenRoomSettings : RoomProfileSharedAction()
object OpenRoomAlias : RoomProfileSharedAction()
object OpenRoomAliasesSettings : RoomProfileSharedAction()
object OpenRoomUploads : RoomProfileSharedAction()
object OpenRoomMembers : RoomProfileSharedAction()
object OpenBannedRoomMembers : RoomProfileSharedAction()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class RoomSettingsController @Inject constructor(
fun onNameChanged(name: String)
fun onTopicChanged(topic: String)
fun onHistoryVisibilityClicked()
fun onOpenAlias()
fun onRoomAliasesClicked()
}

private val dividerColor = colorProvider.getColorFromAttribute(R.attr.vctr_list_divider_color)
Expand Down Expand Up @@ -115,7 +115,7 @@ class RoomSettingsController @Inject constructor(
dividerColor = dividerColor,
divider = true,
editable = true,
action = { callback?.onOpenAlias() }
action = { callback?.onRoomAliasesClicked() }
)

buildProfileAction(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,8 @@ class RoomSettingsFragment @Inject constructor(
return@withState
}

override fun onOpenAlias() {
roomProfileSharedActionViewModel.post(RoomProfileSharedAction.OpenRoomAlias)
override fun onRoomAliasesClicked() {
roomProfileSharedActionViewModel.post(RoomProfileSharedAction.OpenRoomAliasesSettings)
}

override fun onImageReady(uri: Uri?) {
Expand Down

0 comments on commit 0ac04eb

Please sign in to comment.