mirror of
https://github.com/vector-im/element-android.git
synced 2024-11-16 02:05:06 +08:00
Rename JoinedToAnotherRoom to JoinRoomCommandSucces.
This commit is contained in:
parent
85a987ca8d
commit
e3246a1f2c
@ -297,13 +297,13 @@ class RoomDetailFragment @Inject constructor(
|
|||||||
is RoomDetailViewEvents.NavigateToEvent -> navigateToEvent(it)
|
is RoomDetailViewEvents.NavigateToEvent -> navigateToEvent(it)
|
||||||
is RoomDetailViewEvents.FileTooBigError -> displayFileTooBigError(it)
|
is RoomDetailViewEvents.FileTooBigError -> displayFileTooBigError(it)
|
||||||
is RoomDetailViewEvents.DownloadFileState -> handleDownloadFileState(it)
|
is RoomDetailViewEvents.DownloadFileState -> handleDownloadFileState(it)
|
||||||
is RoomDetailViewEvents.JoinedToAnotherRoom -> handleJoinedToAnotherRoom(it)
|
is RoomDetailViewEvents.JoinRoomCommandSucces -> handleJoinedToAnotherRoom(it)
|
||||||
is RoomDetailViewEvents.SendMessageResult -> renderSendMessageResult(it)
|
is RoomDetailViewEvents.SendMessageResult -> renderSendMessageResult(it)
|
||||||
}.exhaustive
|
}.exhaustive
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun handleJoinedToAnotherRoom(action: RoomDetailViewEvents.JoinedToAnotherRoom) {
|
private fun handleJoinedToAnotherRoom(action: RoomDetailViewEvents.JoinRoomCommandSucces) {
|
||||||
updateComposerText("")
|
updateComposerText("")
|
||||||
lockSendButton = false
|
lockSendButton = false
|
||||||
navigator.openRoom(vectorBaseActivity, action.roomId)
|
navigator.openRoom(vectorBaseActivity, action.roomId)
|
||||||
|
@ -50,7 +50,7 @@ sealed class RoomDetailViewEvents : VectorViewEvents {
|
|||||||
abstract class SendMessageResult : RoomDetailViewEvents()
|
abstract class SendMessageResult : RoomDetailViewEvents()
|
||||||
|
|
||||||
object MessageSent : SendMessageResult()
|
object MessageSent : SendMessageResult()
|
||||||
data class JoinedToAnotherRoom(val roomId: String) : SendMessageResult()
|
data class JoinRoomCommandSucces(val roomId: String) : SendMessageResult()
|
||||||
class SlashCommandError(val command: Command) : SendMessageResult()
|
class SlashCommandError(val command: Command) : SendMessageResult()
|
||||||
class SlashCommandUnknown(val command: String) : SendMessageResult()
|
class SlashCommandUnknown(val command: String) : SendMessageResult()
|
||||||
data class SlashCommandHandled(@StringRes val messageRes: Int? = null) : SendMessageResult()
|
data class SlashCommandHandled(@StringRes val messageRes: Int? = null) : SendMessageResult()
|
||||||
|
@ -518,7 +518,7 @@ class RoomDetailViewModel @AssistedInject constructor(
|
|||||||
session.getRoomSummary(command.roomAlias)
|
session.getRoomSummary(command.roomAlias)
|
||||||
?.roomId
|
?.roomId
|
||||||
?.let {
|
?.let {
|
||||||
_viewEvents.post(RoomDetailViewEvents.JoinedToAnotherRoom(it))
|
_viewEvents.post(RoomDetailViewEvents.JoinRoomCommandSucces(it))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user