Code review

This commit is contained in:
Valere 2021-05-14 18:54:11 +02:00
parent 14629f2041
commit 39b89ff103
3 changed files with 3 additions and 4 deletions

View file

@ -100,7 +100,7 @@ class ShareSpaceBottomSheet : VectorBaseBottomSheetDialogFragment<BottomSheetSpa
val intent = InviteUsersToRoomActivity.getIntent(requireContext(), event.spaceId)
startActivity(intent)
}
is ShareSpaceViewEvents.ShowInviteByLing -> {
is ShareSpaceViewEvents.ShowInviteByLink -> {
startSharePlainTextIntent(
fragment = this,
activityResultLauncher = null,
@ -117,7 +117,6 @@ class ShareSpaceBottomSheet : VectorBaseBottomSheetDialogFragment<BottomSheetSpa
fun show(fragmentManager: FragmentManager, spaceId: String, postCreation: Boolean = false): ShareSpaceBottomSheet {
return ShareSpaceBottomSheet().apply {
isCancelable = true
setArguments(Args(spaceId = spaceId, postCreation = postCreation))
}.also {
it.show(fragmentManager, ShareSpaceBottomSheet::class.java.name)

View file

@ -20,5 +20,5 @@ import im.vector.app.core.platform.VectorViewEvents
sealed class ShareSpaceViewEvents : VectorViewEvents {
data class NavigateToInviteUser(val spaceId: String) : ShareSpaceViewEvents()
data class ShowInviteByLing(val permalink: String, val spaceName: String) : ShareSpaceViewEvents()
data class ShowInviteByLink(val permalink: String, val spaceName: String) : ShareSpaceViewEvents()
}

View file

@ -87,7 +87,7 @@ class ShareSpaceViewModel @AssistedInject constructor(
session.permalinkService().createRoomPermalink(initialState.spaceId)
}
if (permalink != null) {
_viewEvents.post(ShareSpaceViewEvents.ShowInviteByLing(permalink, roomSummary?.name ?: ""))
_viewEvents.post(ShareSpaceViewEvents.ShowInviteByLink(permalink, roomSummary?.name ?: ""))
}
}
ShareSpaceAction.InviteByMxId -> {