mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-10-31 16:22:49 +00:00
fix(healthchat): satisfy detekt, ktlint and konsist rules
Import alias order, composable parameter order in HomeView, and konsist presenter helper shape.
This commit is contained in:
+1
-1
@@ -20,13 +20,13 @@ import androidx.compose.ui.unit.dp
|
||||
import io.element.android.compound.theme.ElementTheme
|
||||
import io.element.android.compound.tokens.generated.CompoundIcons
|
||||
import io.element.android.features.healthchat.api.HealthChatStrings
|
||||
import io.element.android.features.healthchat.api.R as HealthChatR
|
||||
import io.element.android.libraries.designsystem.preview.ElementPreview
|
||||
import io.element.android.libraries.designsystem.preview.PreviewsDayNight
|
||||
import io.element.android.libraries.designsystem.theme.components.Icon
|
||||
import io.element.android.libraries.designsystem.theme.components.IconButton
|
||||
import io.element.android.libraries.designsystem.theme.components.Text
|
||||
import io.element.android.libraries.designsystem.theme.components.TextButton
|
||||
import io.element.android.features.healthchat.api.R as HealthChatR
|
||||
|
||||
@Composable
|
||||
fun MemberDirectoryHeader(
|
||||
|
||||
+4
-6
@@ -175,10 +175,8 @@ class MemberDirectoryPresenterTest {
|
||||
private fun createPresenter(
|
||||
directoryService: HealthChatDirectoryService = FakeHealthChatDirectoryService(),
|
||||
startDMAction: StartDMAction = FakeStartDMAction(),
|
||||
): MemberDirectoryPresenter {
|
||||
return MemberDirectoryPresenter(
|
||||
directoryService = directoryService,
|
||||
startDMAction = startDMAction,
|
||||
)
|
||||
}
|
||||
) = MemberDirectoryPresenter(
|
||||
directoryService = directoryService,
|
||||
startDMAction = startDMAction,
|
||||
)
|
||||
}
|
||||
|
||||
+4
-4
@@ -87,12 +87,12 @@ fun HomeView(
|
||||
onDeclineInviteAndBlockUser: (roomSummary: RoomListRoomSummary) -> Unit,
|
||||
acceptDeclineInviteView: @Composable () -> Unit,
|
||||
modifier: Modifier = Modifier,
|
||||
leaveRoomView: @Composable () -> Unit,
|
||||
// HealthChat fork: content of the member directory tab, rendered by features/healthchat.
|
||||
memberDirectoryView: @Composable (PaddingValues, LazyListState) -> Unit = { _, _ -> },
|
||||
// HealthChat fork: false while another screen is pushed on top of Home, so the
|
||||
// tab-switching BackHandler cannot swallow back presses during the transition.
|
||||
isBackHandlingEnabled: Boolean = true,
|
||||
// HealthChat fork: content of the member directory tab, rendered by features/healthchat.
|
||||
memberDirectoryView: @Composable (PaddingValues, LazyListState) -> Unit = { _, _ -> },
|
||||
leaveRoomView: @Composable () -> Unit,
|
||||
) {
|
||||
val state: RoomListState = homeState.roomListState
|
||||
val coroutineScope = rememberCoroutineScope()
|
||||
@@ -155,9 +155,9 @@ private fun HomeScaffold(
|
||||
onStartChatClick: () -> Unit,
|
||||
onCreateSpaceClick: () -> Unit,
|
||||
onMenuActionClick: (RoomListMenuAction) -> Unit,
|
||||
memberDirectoryView: @Composable (PaddingValues, LazyListState) -> Unit,
|
||||
isBackHandlingEnabled: Boolean,
|
||||
modifier: Modifier = Modifier,
|
||||
memberDirectoryView: @Composable (PaddingValues, LazyListState) -> Unit,
|
||||
) {
|
||||
fun onRoomClick(room: RoomListRoomSummary) {
|
||||
onRoomClick(room.roomId)
|
||||
|
||||
Reference in New Issue
Block a user