Adapt HealthChat to upstream v26.10.0

Follow-ups needed after rebasing the HealthChat series from v26.07.0 onto
v26.10.0 that span several of the replayed commits:

- Rename the five PreviewParameterProvider subclasses in features/healthchat
  to the *PreviewParam suffix now enforced by Konsist.
- Rename MemberDirectoryEvents and HealthChatProfileSectionEvents to the
  *Event suffix used by every upstream sealed interface.
- Import FakeStartDMAction from features/startchat/test, where it lives now.
- ListItem lost its headlineContent parameter in favour of content.
- HomeView gained onAddAccountClick and onSwitchToAccount, and onRoomClick
  now carries an EventId; update HomeViewBackHandlingTest accordingly.
- Restore upstream's codecov-action pin (v7.1.1) that the CI squash carried
  back to v7.0.0.
- Gate the new pr-checks.yml on the upstream repository: this fork does not
  use the PR- label convention.
- Add the 26.10.0 section to HEALTHCHAT_CHANGES.md.
This commit is contained in:
Sedat Qaja
2026-10-19 09:05:35 +02:00
parent 9cb72c74aa
commit db839dc5c3
25 changed files with 91 additions and 73 deletions
@@ -10,17 +10,17 @@ package io.element.android.features.healthchat.api.directory
import io.element.android.libraries.matrix.api.user.MatrixUser
sealed interface MemberDirectoryEvents {
sealed interface MemberDirectoryEvent {
/**
* Fired by the view on first composition. The tab presenter runs from app start (it is
* composed by the Home presenter), so the first fetch is deferred until the tab is shown.
*/
data object LoadIfNeeded : MemberDirectoryEvents
data object LoadIfNeeded : MemberDirectoryEvent
/** Header refresh and "try again" — one load path. */
data object Refresh : MemberDirectoryEvents
data object Refresh : MemberDirectoryEvent
data class StartDm(val matrixUser: MatrixUser) : MemberDirectoryEvents
data class StartDm(val matrixUser: MatrixUser) : MemberDirectoryEvent
data object ClearStartDmState : MemberDirectoryEvents
data object ClearStartDmState : MemberDirectoryEvent
}
@@ -18,7 +18,7 @@ data class MemberDirectoryState(
val searchQuery: TextFieldState,
val directory: AsyncData<HealthChatMemberDirectory>,
val startDmActionState: AsyncAction<RoomId>,
val eventSink: (MemberDirectoryEvents) -> Unit,
val eventSink: (MemberDirectoryEvent) -> Unit,
) {
/** Unknown-while-loading counts as approved so no banner flashes during the first load. */
val isApproved: Boolean
@@ -25,7 +25,7 @@ fun aMemberDirectoryState(
searchQuery: TextFieldState = TextFieldState(),
directory: AsyncData<HealthChatMemberDirectory> = AsyncData.Success(aMemberDirectory()),
startDmActionState: AsyncAction<RoomId> = AsyncAction.Uninitialized,
eventSink: (MemberDirectoryEvents) -> Unit = {},
eventSink: (MemberDirectoryEvent) -> Unit = {},
) = MemberDirectoryState(
searchQuery = searchQuery,
directory = directory,