mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-03 16:10:00 +00:00
Extract MainActionsSection from the when cases, since this is code duplication.
This commit is contained in:
committed by
Benoit Marty
parent
17d2d7b0d7
commit
76add1fff1
+6
-13
@@ -135,14 +135,7 @@ fun RoomDetailsView(
|
|||||||
openAvatarPreview(state.roomName, avatarUrl)
|
openAvatarPreview(state.roomName, avatarUrl)
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
MainActionsSection(
|
|
||||||
state = state,
|
|
||||||
onShareRoom = onShareRoom,
|
|
||||||
onInvitePeople = invitePeople,
|
|
||||||
onCall = onJoinCallClick,
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
is RoomDetailsType.Dm -> {
|
is RoomDetailsType.Dm -> {
|
||||||
val member = state.roomType.roomMember
|
val member = state.roomType.roomMember
|
||||||
UserProfileHeaderSection(
|
UserProfileHeaderSection(
|
||||||
@@ -153,14 +146,14 @@ fun RoomDetailsView(
|
|||||||
openAvatarPreview(member.getBestName(), avatarUrl)
|
openAvatarPreview(member.getBestName(), avatarUrl)
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
MainActionsSection(
|
|
||||||
state = state,
|
|
||||||
onShareRoom = onShareRoom,
|
|
||||||
onInvitePeople = invitePeople,
|
|
||||||
onCall = onJoinCallClick,
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
MainActionsSection(
|
||||||
|
state = state,
|
||||||
|
onShareRoom = onShareRoom,
|
||||||
|
onInvitePeople = invitePeople,
|
||||||
|
onCall = onJoinCallClick,
|
||||||
|
)
|
||||||
Spacer(Modifier.height(12.dp))
|
Spacer(Modifier.height(12.dp))
|
||||||
|
|
||||||
if (state.roomTopic !is RoomTopicState.Hidden) {
|
if (state.roomTopic !is RoomTopicState.Hidden) {
|
||||||
|
|||||||
Reference in New Issue
Block a user