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:
2026-07-31 18:08:47 +02:00
parent 5d289d8d97
commit 1134d74423
3 changed files with 9 additions and 11 deletions
@@ -20,13 +20,13 @@ import androidx.compose.ui.unit.dp
import io.element.android.compound.theme.ElementTheme import io.element.android.compound.theme.ElementTheme
import io.element.android.compound.tokens.generated.CompoundIcons import io.element.android.compound.tokens.generated.CompoundIcons
import io.element.android.features.healthchat.api.HealthChatStrings 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.ElementPreview
import io.element.android.libraries.designsystem.preview.PreviewsDayNight 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.Icon
import io.element.android.libraries.designsystem.theme.components.IconButton 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.Text
import io.element.android.libraries.designsystem.theme.components.TextButton import io.element.android.libraries.designsystem.theme.components.TextButton
import io.element.android.features.healthchat.api.R as HealthChatR
@Composable @Composable
fun MemberDirectoryHeader( fun MemberDirectoryHeader(
@@ -175,10 +175,8 @@ class MemberDirectoryPresenterTest {
private fun createPresenter( private fun createPresenter(
directoryService: HealthChatDirectoryService = FakeHealthChatDirectoryService(), directoryService: HealthChatDirectoryService = FakeHealthChatDirectoryService(),
startDMAction: StartDMAction = FakeStartDMAction(), startDMAction: StartDMAction = FakeStartDMAction(),
): MemberDirectoryPresenter { ) = MemberDirectoryPresenter(
return MemberDirectoryPresenter( directoryService = directoryService,
directoryService = directoryService, startDMAction = startDMAction,
startDMAction = startDMAction, )
)
}
} }
@@ -87,12 +87,12 @@ fun HomeView(
onDeclineInviteAndBlockUser: (roomSummary: RoomListRoomSummary) -> Unit, onDeclineInviteAndBlockUser: (roomSummary: RoomListRoomSummary) -> Unit,
acceptDeclineInviteView: @Composable () -> Unit, acceptDeclineInviteView: @Composable () -> Unit,
modifier: Modifier = Modifier, 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 // HealthChat fork: false while another screen is pushed on top of Home, so the
// tab-switching BackHandler cannot swallow back presses during the transition. // tab-switching BackHandler cannot swallow back presses during the transition.
isBackHandlingEnabled: Boolean = true, 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 state: RoomListState = homeState.roomListState
val coroutineScope = rememberCoroutineScope() val coroutineScope = rememberCoroutineScope()
@@ -155,9 +155,9 @@ private fun HomeScaffold(
onStartChatClick: () -> Unit, onStartChatClick: () -> Unit,
onCreateSpaceClick: () -> Unit, onCreateSpaceClick: () -> Unit,
onMenuActionClick: (RoomListMenuAction) -> Unit, onMenuActionClick: (RoomListMenuAction) -> Unit,
memberDirectoryView: @Composable (PaddingValues, LazyListState) -> Unit,
isBackHandlingEnabled: Boolean, isBackHandlingEnabled: Boolean,
modifier: Modifier = Modifier, modifier: Modifier = Modifier,
memberDirectoryView: @Composable (PaddingValues, LazyListState) -> Unit,
) { ) {
fun onRoomClick(room: RoomListRoomSummary) { fun onRoomClick(room: RoomListRoomSummary) {
onRoomClick(room.roomId) onRoomClick(room.roomId)