mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-11-26 19:36:08 +03:00
Code review
This commit is contained in:
parent
14629f2041
commit
39b89ff103
3 changed files with 3 additions and 4 deletions
|
@ -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)
|
||||
|
|
|
@ -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()
|
||||
}
|
||||
|
|
|
@ -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 -> {
|
||||
|
|
Loading…
Reference in a new issue