mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-11-27 03:49:04 +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)
|
val intent = InviteUsersToRoomActivity.getIntent(requireContext(), event.spaceId)
|
||||||
startActivity(intent)
|
startActivity(intent)
|
||||||
}
|
}
|
||||||
is ShareSpaceViewEvents.ShowInviteByLing -> {
|
is ShareSpaceViewEvents.ShowInviteByLink -> {
|
||||||
startSharePlainTextIntent(
|
startSharePlainTextIntent(
|
||||||
fragment = this,
|
fragment = this,
|
||||||
activityResultLauncher = null,
|
activityResultLauncher = null,
|
||||||
|
@ -117,7 +117,6 @@ class ShareSpaceBottomSheet : VectorBaseBottomSheetDialogFragment<BottomSheetSpa
|
||||||
|
|
||||||
fun show(fragmentManager: FragmentManager, spaceId: String, postCreation: Boolean = false): ShareSpaceBottomSheet {
|
fun show(fragmentManager: FragmentManager, spaceId: String, postCreation: Boolean = false): ShareSpaceBottomSheet {
|
||||||
return ShareSpaceBottomSheet().apply {
|
return ShareSpaceBottomSheet().apply {
|
||||||
isCancelable = true
|
|
||||||
setArguments(Args(spaceId = spaceId, postCreation = postCreation))
|
setArguments(Args(spaceId = spaceId, postCreation = postCreation))
|
||||||
}.also {
|
}.also {
|
||||||
it.show(fragmentManager, ShareSpaceBottomSheet::class.java.name)
|
it.show(fragmentManager, ShareSpaceBottomSheet::class.java.name)
|
||||||
|
|
|
@ -20,5 +20,5 @@ import im.vector.app.core.platform.VectorViewEvents
|
||||||
|
|
||||||
sealed class ShareSpaceViewEvents : VectorViewEvents {
|
sealed class ShareSpaceViewEvents : VectorViewEvents {
|
||||||
data class NavigateToInviteUser(val spaceId: String) : ShareSpaceViewEvents()
|
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)
|
session.permalinkService().createRoomPermalink(initialState.spaceId)
|
||||||
}
|
}
|
||||||
if (permalink != null) {
|
if (permalink != null) {
|
||||||
_viewEvents.post(ShareSpaceViewEvents.ShowInviteByLing(permalink, roomSummary?.name ?: ""))
|
_viewEvents.post(ShareSpaceViewEvents.ShowInviteByLink(permalink, roomSummary?.name ?: ""))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ShareSpaceAction.InviteByMxId -> {
|
ShareSpaceAction.InviteByMxId -> {
|
||||||
|
|
Loading…
Reference in a new issue