Changes destination after joining space from hamburger invite

This commit is contained in:
ericdecanini 2022-04-14 13:22:54 +02:00
parent 9b7e94ebab
commit 538e6e453f
3 changed files with 6 additions and 2 deletions

View File

@ -580,7 +580,7 @@ class HomeActivity :
}
override fun spaceInviteBottomSheetOnAccept(spaceId: String) {
navigator.switchToSpace(this, spaceId, Navigator.PostSwitchSpaceAction.None)
navigator.switchToSpace(this, spaceId, Navigator.PostSwitchSpaceAction.OpenRoomList)
}
override fun spaceInviteBottomSheetOnDecline(spaceId: String) {

View File

@ -176,6 +176,9 @@ class DefaultNavigator @Inject constructor(
Navigator.PostSwitchSpaceAction.OpenAddExistingRooms -> {
startActivity(context, SpaceManageActivity.newIntent(context, spaceId, ManageType.AddRooms), false)
}
Navigator.PostSwitchSpaceAction.OpenRoomList -> {
startActivity(context, SpaceExploreActivity.newIntent(context, spaceId), false)
}
is Navigator.PostSwitchSpaceAction.OpenDefaultRoom -> {
val args = TimelineArgs(
postSwitchSpaceAction.roomId,

View File

@ -54,8 +54,9 @@ interface Navigator {
sealed class PostSwitchSpaceAction {
object None : PostSwitchSpaceAction()
data class OpenDefaultRoom(val roomId: String, val showShareSheet: Boolean) : PostSwitchSpaceAction()
object OpenAddExistingRooms : PostSwitchSpaceAction()
object OpenRoomList : PostSwitchSpaceAction()
data class OpenDefaultRoom(val roomId: String, val showShareSheet: Boolean) : PostSwitchSpaceAction()
}
fun switchToSpace(context: Context, spaceId: String, postSwitchSpaceAction: PostSwitchSpaceAction)