Troubleshoot notifications screen

This commit is contained in:
Benoit Marty 2024-03-26 11:36:31 +01:00
parent 6c9ea2b920
commit 2bfe125a77
80 changed files with 3086 additions and 99 deletions

View file

@ -39,6 +39,7 @@ import io.element.android.features.preferences.impl.developer.DeveloperSettingsN
import io.element.android.features.preferences.impl.developer.tracing.ConfigureTracingNode
import io.element.android.features.preferences.impl.notifications.NotificationSettingsNode
import io.element.android.features.preferences.impl.notifications.edit.EditDefaultNotificationSettingNode
import io.element.android.features.preferences.impl.notifications.troubleshoot.TroubleshootNotificationsNode
import io.element.android.features.preferences.impl.root.PreferencesRootNode
import io.element.android.features.preferences.impl.user.editprofile.EditUserProfileNode
import io.element.android.libraries.architecture.BackstackView
@ -85,6 +86,9 @@ class PreferencesFlowNode @AssistedInject constructor(
@Parcelize
data object NotificationSettings : NavTarget
@Parcelize
data object TroubleshootNotifications : NavTarget
@Parcelize
data object LockScreenSettings : NavTarget
@ -177,9 +181,16 @@ class PreferencesFlowNode @AssistedInject constructor(
override fun editDefaultNotificationMode(isOneToOne: Boolean) {
backstack.push(NavTarget.EditDefaultNotificationSetting(isOneToOne))
}
override fun onTroubleshootNotificationsClicked() {
backstack.push(NavTarget.TroubleshootNotifications)
}
}
createNode<NotificationSettingsNode>(buildContext, listOf(notificationSettingsCallback))
}
NavTarget.TroubleshootNotifications -> {
createNode<TroubleshootNotificationsNode>(buildContext)
}
is NavTarget.EditDefaultNotificationSetting -> {
val callback = object : EditDefaultNotificationSettingNode.Callback {
override fun openRoomNotificationSettings(roomId: RoomId) {

View file

@ -35,6 +35,7 @@ class NotificationSettingsNode @AssistedInject constructor(
) : Node(buildContext, plugins = plugins) {
interface Callback : Plugin {
fun editDefaultNotificationMode(isOneToOne: Boolean)
fun onTroubleshootNotificationsClicked()
}
private val callbacks = plugins<Callback>()
@ -43,6 +44,10 @@ class NotificationSettingsNode @AssistedInject constructor(
callbacks.forEach { it.editDefaultNotificationMode(isOneToOne) }
}
private fun onTroubleshootNotificationsClicked() {
callbacks.forEach { it.onTroubleshootNotificationsClicked() }
}
@Composable
override fun View(modifier: Modifier) {
val state = presenter.present()
@ -50,6 +55,7 @@ class NotificationSettingsNode @AssistedInject constructor(
state = state,
onOpenEditDefault = { openEditDefault(isOneToOne = it) },
onBackPressed = ::navigateUp,
onTroubleshootNotificationsClicked = ::onTroubleshootNotificationsClicked,
modifier = modifier,
)
}

View file

@ -46,6 +46,7 @@ import io.element.android.libraries.ui.strings.CommonStrings
fun NotificationSettingsView(
state: NotificationSettingsState,
onOpenEditDefault: (isOneToOne: Boolean) -> Unit,
onTroubleshootNotificationsClicked: () -> Unit,
onBackPressed: () -> Unit,
modifier: Modifier = Modifier,
) {
@ -77,6 +78,7 @@ fun NotificationSettingsView(
// TODO We are removing the call notification toggle until support for call notifications has been added
// onCallsNotificationsChanged = { state.eventSink(NotificationSettingsEvents.SetCallNotificationsEnabled(it)) },
onInviteForMeNotificationsChanged = { state.eventSink(NotificationSettingsEvents.SetInviteForMeNotificationsEnabled(it)) },
onTroubleshootNotificationsClicked = onTroubleshootNotificationsClicked,
)
}
AsyncActionView(
@ -99,6 +101,7 @@ private fun NotificationSettingsContentView(
// TODO We are removing the call notification toggle until support for call notifications has been added
// onCallsNotificationsChanged: (Boolean) -> Unit,
onInviteForMeNotificationsChanged: (Boolean) -> Unit,
onTroubleshootNotificationsClicked: () -> Unit,
) {
val context = LocalContext.current
if (systemSettings.appNotificationsEnabled && !systemSettings.systemNotificationsEnabled) {
@ -163,6 +166,13 @@ private fun NotificationSettingsContentView(
onCheckedChange = onInviteForMeNotificationsChanged
)
}
PreferenceCategory(title = "Troubleshoot") {
PreferenceText(
modifier = Modifier,
title = "Troubleshoot notifications",
onClick = onTroubleshootNotificationsClicked
)
}
}
}
@ -204,6 +214,7 @@ internal fun NotificationSettingsViewPreview(@PreviewParameter(NotificationSetti
state = state,
onBackPressed = {},
onOpenEditDefault = {},
onTroubleshootNotificationsClicked = {},
)
}

View file

@ -0,0 +1,23 @@
/*
* Copyright (c) 2024 New Vector Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.element.android.features.preferences.impl.notifications.troubleshoot
sealed interface TroubleshootNotificationsEvents {
data object StartTests : TroubleshootNotificationsEvents
data object RetryFailedTests : TroubleshootNotificationsEvents
data class QuickFix(val testIndex: Int) : TroubleshootNotificationsEvents
}

View file

@ -0,0 +1,44 @@
/*
* Copyright (c) 2024 New Vector Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.element.android.features.preferences.impl.notifications.troubleshoot
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import com.bumble.appyx.core.modality.BuildContext
import com.bumble.appyx.core.node.Node
import com.bumble.appyx.core.plugin.Plugin
import dagger.assisted.Assisted
import dagger.assisted.AssistedInject
import io.element.android.anvilannotations.ContributesNode
import io.element.android.libraries.di.SessionScope
@ContributesNode(SessionScope::class)
class TroubleshootNotificationsNode @AssistedInject constructor(
@Assisted buildContext: BuildContext,
@Assisted plugins: List<Plugin>,
private val presenter: TroubleshootNotificationsPresenter,
) : Node(buildContext, plugins = plugins) {
@Composable
override fun View(modifier: Modifier) {
val state = presenter.present()
TroubleshootNotificationsView(
state = state,
onBackPressed = ::navigateUp,
modifier = modifier,
)
}
}

View file

@ -0,0 +1,58 @@
/*
* Copyright (c) 2024 New Vector Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.element.android.features.preferences.impl.notifications.troubleshoot
import androidx.compose.runtime.Composable
import androidx.compose.runtime.LaunchedEffect
import androidx.compose.runtime.collectAsState
import androidx.compose.runtime.getValue
import androidx.compose.runtime.rememberCoroutineScope
import io.element.android.libraries.architecture.Presenter
import kotlinx.coroutines.launch
import javax.inject.Inject
class TroubleshootNotificationsPresenter @Inject constructor(
private val troubleshootTestSuite: TroubleshootTestSuite,
) : Presenter<TroubleshootNotificationsState> {
@Composable
override fun present(): TroubleshootNotificationsState {
val coroutineScope = rememberCoroutineScope()
LaunchedEffect(Unit) {
troubleshootTestSuite.start(this)
}
val testSuiteState by troubleshootTestSuite.state.collectAsState()
fun handleEvents(event: TroubleshootNotificationsEvents) {
when (event) {
TroubleshootNotificationsEvents.StartTests -> coroutineScope.launch {
troubleshootTestSuite.runTestSuite(this)
}
is TroubleshootNotificationsEvents.QuickFix -> coroutineScope.launch {
troubleshootTestSuite.quickFix(event.testIndex, this)
}
TroubleshootNotificationsEvents.RetryFailedTests -> coroutineScope.launch {
troubleshootTestSuite.retryFailedTest(this)
}
}
}
return TroubleshootNotificationsState(
testSuiteState = testSuiteState,
eventSink = ::handleEvents
)
}
}

View file

@ -0,0 +1,24 @@
/*
* Copyright (c) 2024 New Vector Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.element.android.features.preferences.impl.notifications.troubleshoot
data class TroubleshootNotificationsState(
val testSuiteState: TroubleshootTestSuiteState,
val eventSink: (TroubleshootNotificationsEvents) -> Unit,
) {
val hasFailedTests: Boolean = testSuiteState.mainState.isFailure()
}

View file

@ -0,0 +1,119 @@
/*
* Copyright (c) 2024 New Vector Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.element.android.features.preferences.impl.notifications.troubleshoot
import androidx.compose.ui.tooling.preview.PreviewParameterProvider
import io.element.android.libraries.core.notifications.NotificationTroubleshootTestState
import kotlinx.collections.immutable.toImmutableList
open class TroubleshootNotificationsStateProvider : PreviewParameterProvider<TroubleshootNotificationsState> {
override val values: Sequence<TroubleshootNotificationsState>
get() = sequenceOf(
aTroubleshootNotificationsState(
listOf(
aTroubleshootTestStateIdle(),
aTroubleshootTestStateIdle(),
aTroubleshootTestStateIdle(visible = false),
)
),
aTroubleshootNotificationsState(
listOf(
aTroubleshootTestStateInProgress(),
aTroubleshootTestStateIdle(),
aTroubleshootTestStateIdle(),
)
),
aTroubleshootNotificationsState(
listOf(
aTroubleshootTestStateSuccess(),
aTroubleshootTestStateInProgress(),
aTroubleshootTestStateIdle(),
)
),
aTroubleshootNotificationsState(
listOf(
aTroubleshootTestStateSuccess(),
aTroubleshootTestStateWaitingForUser(),
aTroubleshootTestStateIdle(),
)
),
aTroubleshootNotificationsState(
listOf(
aTroubleshootTestStateSuccess(),
aTroubleshootTestStateFailure(hasQuickFix = true),
aTroubleshootTestStateInProgress(),
)
),
aTroubleshootNotificationsState(
listOf(
aTroubleshootTestStateSuccess(),
aTroubleshootTestStateFailure(hasQuickFix = true),
aTroubleshootTestStateFailure(hasQuickFix = false),
)
),
aTroubleshootNotificationsState(
listOf(
aTroubleshootTestStateSuccess(),
aTroubleshootTestStateSuccess(),
aTroubleshootTestStateSuccess(),
)
),
aTroubleshootNotificationsState(
listOf(
aTroubleshootTestStateWaitingForUser(),
)
),
)
}
fun aTroubleshootNotificationsState(
tests: List<NotificationTroubleshootTestState> = emptyList(),
eventSink: (TroubleshootNotificationsEvents) -> Unit = {},
) = TroubleshootNotificationsState(
eventSink = eventSink,
testSuiteState = TroubleshootTestSuiteState(
mainState = tests.computeMainState(),
tests = tests.toImmutableList(),
),
)
fun aTroubleshootTestState(
status: NotificationTroubleshootTestState.Status,
name: String = "Test",
description: String = "Description",
): NotificationTroubleshootTestState {
return NotificationTroubleshootTestState(
name = name,
description = description,
status = status,
)
}
fun aTroubleshootTestStateIdle(visible: Boolean = true) =
aTroubleshootTestState(status = NotificationTroubleshootTestState.Status.Idle(visible = visible))
fun aTroubleshootTestStateInProgress() =
aTroubleshootTestState(status = NotificationTroubleshootTestState.Status.InProgress)
fun aTroubleshootTestStateWaitingForUser() =
aTroubleshootTestState(status = NotificationTroubleshootTestState.Status.WaitingForUser)
fun aTroubleshootTestStateSuccess() =
aTroubleshootTestState(status = NotificationTroubleshootTestState.Status.Success)
fun aTroubleshootTestStateFailure(hasQuickFix: Boolean) =
aTroubleshootTestState(status = NotificationTroubleshootTestState.Status.Failure(hasQuickFix = hasQuickFix))

View file

@ -0,0 +1,220 @@
/*
* Copyright (c) 2024 New Vector Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.element.android.features.preferences.impl.notifications.troubleshoot
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.size
import androidx.compose.foundation.progressSemantics
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.tooling.preview.PreviewParameter
import androidx.compose.ui.unit.dp
import androidx.lifecycle.Lifecycle
import io.element.android.compound.theme.ElementTheme
import io.element.android.compound.tokens.generated.CompoundIcons
import io.element.android.libraries.architecture.AsyncAction
import io.element.android.libraries.core.notifications.NotificationTroubleshootTestState
import io.element.android.libraries.core.notifications.NotificationTroubleshootTestState.Status
import io.element.android.libraries.designsystem.components.list.ListItemContent
import io.element.android.libraries.designsystem.components.preferences.PreferencePage
import io.element.android.libraries.designsystem.preview.ElementPreview
import io.element.android.libraries.designsystem.preview.PreviewsDayNight
import io.element.android.libraries.designsystem.theme.components.Button
import io.element.android.libraries.designsystem.theme.components.CircularProgressIndicator
import io.element.android.libraries.designsystem.theme.components.Icon
import io.element.android.libraries.designsystem.theme.components.ListItem
import io.element.android.libraries.designsystem.theme.components.Text
import io.element.android.libraries.designsystem.utils.OnLifecycleEvent
/**
* A view that allows a user edit their global notification settings.
*/
@Composable
fun TroubleshootNotificationsView(
state: TroubleshootNotificationsState,
onBackPressed: () -> Unit,
modifier: Modifier = Modifier,
) {
OnLifecycleEvent { _, event ->
when (event) {
Lifecycle.Event.ON_RESUME -> {
if (state.hasFailedTests) {
state.eventSink(TroubleshootNotificationsEvents.RetryFailedTests)
}
}
else -> Unit
}
}
PreferencePage(
modifier = modifier,
onBackPressed = onBackPressed,
title = "Troubleshoot notifications",
) {
TroubleshootNotificationsContent(state)
}
}
@Composable
private fun TroubleshootTestView(
testState: NotificationTroubleshootTestState,
onQuickFixClicked: () -> Unit,
) {
if ((testState.status as? Status.Idle)?.visible == false) return
ListItem(
headlineContent = { Text(text = testState.name) },
supportingContent = { Text(text = testState.description) },
trailingContent = when (testState.status) {
is Status.Idle -> null
Status.InProgress -> ListItemContent.Custom {
CircularProgressIndicator(
modifier = Modifier
.progressSemantics()
.size(20.dp),
strokeWidth = 2.dp
)
}
Status.WaitingForUser -> ListItemContent.Custom {
Icon(
contentDescription = null,
modifier = Modifier.size(24.dp),
imageVector = CompoundIcons.Info(),
tint = ElementTheme.colors.iconAccentTertiary
)
}
Status.Success -> ListItemContent.Custom {
Icon(
contentDescription = null,
modifier = Modifier.size(24.dp),
imageVector = CompoundIcons.Check(),
tint = ElementTheme.colors.iconAccentTertiary
)
}
is Status.Failure -> ListItemContent.Custom {
Icon(
contentDescription = null,
modifier = Modifier.size(24.dp),
imageVector = CompoundIcons.Error(),
tint = ElementTheme.colors.textCriticalPrimary
)
}
}
)
if ((testState.status as? Status.Failure)?.hasQuickFix == true) {
ListItem(
headlineContent = {
},
trailingContent = ListItemContent.Custom {
Button(
text = "Attempt to fix",
onClick = onQuickFixClicked
)
}
)
}
}
@Composable
private fun TroubleshootNotificationsContent(state: TroubleshootNotificationsState) {
when (state.testSuiteState.mainState) {
AsyncAction.Loading,
AsyncAction.Confirming,
is AsyncAction.Success,
is AsyncAction.Failure -> {
TestSuiteView(
testSuiteState = state.testSuiteState,
onQuickFixClicked = {
state.eventSink(TroubleshootNotificationsEvents.QuickFix(it))
}
)
}
AsyncAction.Uninitialized -> Unit
}
when (state.testSuiteState.mainState) {
AsyncAction.Uninitialized -> {
ListItem(headlineContent = {
Text(
text = "Run the tests to detect any issue in your configuration " +
"that may make notifications not behave as expected."
)
})
RunTestButton(state = state)
}
AsyncAction.Loading -> Unit
is AsyncAction.Failure -> {
ListItem(headlineContent = {
Text(text = "Some tests failed, please check the details.")
})
RunTestButton(state = state)
}
AsyncAction.Confirming -> {
ListItem(headlineContent = {
Text(
text = "Some tests require your attention. Please check the details."
)
})
}
is AsyncAction.Success -> {
ListItem(headlineContent = {
Text(
text = "All tests passed successfully."
)
})
}
}
}
@Composable
private fun RunTestButton(state: TroubleshootNotificationsState) {
ListItem(
headlineContent = {
Button(
text = if (state.testSuiteState.mainState is AsyncAction.Failure) "Run tests again" else "Run tests",
onClick = {
state.eventSink(TroubleshootNotificationsEvents.StartTests)
},
modifier = Modifier.fillMaxWidth(),
)
}
)
}
@Composable
private fun TestSuiteView(
testSuiteState: TroubleshootTestSuiteState,
onQuickFixClicked: (Int) -> Unit,
) {
testSuiteState.tests.forEachIndexed { index, testState ->
TroubleshootTestView(
testState = testState,
onQuickFixClicked = {
onQuickFixClicked(index)
},
)
}
}
@PreviewsDayNight
@Composable
internal fun TroubleshootNotificationsViewPreview(
@PreviewParameter(TroubleshootNotificationsStateProvider::class) state: TroubleshootNotificationsState,
) = ElementPreview {
TroubleshootNotificationsView(
state = state,
onBackPressed = {},
)
}

View file

@ -0,0 +1,109 @@
/*
* Copyright (c) 2024 New Vector Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.element.android.features.preferences.impl.notifications.troubleshoot
import io.element.android.libraries.architecture.AsyncAction
import io.element.android.libraries.core.notifications.NotificationTroubleshootTest
import io.element.android.libraries.core.notifications.NotificationTroubleshootTestState
import io.element.android.libraries.core.notifications.TestFilterData
import io.element.android.libraries.push.api.GetCurrentPushProvider
import kotlinx.collections.immutable.toImmutableList
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.flow.StateFlow
import kotlinx.coroutines.flow.launchIn
import kotlinx.coroutines.flow.onEach
import javax.inject.Inject
class TroubleshootTestSuite @Inject constructor(
private val notificationTroubleshootTests: Set<@JvmSuppressWildcards NotificationTroubleshootTest>,
private val getCurrentPushProvider: GetCurrentPushProvider,
) {
lateinit var tests: List<NotificationTroubleshootTest>
private val _state: MutableStateFlow<TroubleshootTestSuiteState> = MutableStateFlow(
TroubleshootTestSuiteState(
mainState = AsyncAction.Uninitialized,
tests = emptyList<NotificationTroubleshootTestState>().toImmutableList()
)
)
val state: StateFlow<TroubleshootTestSuiteState> = _state
suspend fun start(coroutineScope: CoroutineScope) {
val testFilterData = TestFilterData(
currentPushProviderName = getCurrentPushProvider.getCurrentPushProvider()
)
tests = notificationTroubleshootTests
.filter { it.isRelevant(testFilterData) }
.sortedBy { it.order }
tests.forEach {
// Observe the state of the tests
it.state.onEach {
emitState()
}.launchIn(coroutineScope)
}
}
suspend fun runTestSuite(coroutineScope: CoroutineScope) {
tests.forEach {
it.reset()
}
tests.forEach {
it.run(coroutineScope)
}
}
suspend fun retryFailedTest(coroutineScope: CoroutineScope) {
tests
.filter { it.state.value.status is NotificationTroubleshootTestState.Status.Failure }
.forEach {
it.run(coroutineScope)
}
}
private fun emitState() {
val states = tests.map { it.state.value }
_state.tryEmit(
TroubleshootTestSuiteState(
mainState = states.computeMainState(),
tests = states.toImmutableList()
)
)
}
suspend fun quickFix(testIndex: Int, coroutineScope: CoroutineScope) {
tests[testIndex].quickFix(coroutineScope)
}
}
fun List<NotificationTroubleshootTestState>.computeMainState(): AsyncAction<Unit> {
val isIdle = all { it.status is NotificationTroubleshootTestState.Status.Idle }
val isRunning = any { it.status is NotificationTroubleshootTestState.Status.InProgress }
return when {
isIdle -> AsyncAction.Uninitialized
isRunning -> AsyncAction.Loading
else -> {
if (any { it.status is NotificationTroubleshootTestState.Status.WaitingForUser }) {
AsyncAction.Confirming
} else if (any { it.status is NotificationTroubleshootTestState.Status.Failure }) {
AsyncAction.Failure(Exception("Some tests failed"))
} else {
AsyncAction.Success(Unit)
}
}
}
}

View file

@ -0,0 +1,26 @@
/*
* Copyright (c) 2024 New Vector Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.element.android.features.preferences.impl.notifications.troubleshoot
import io.element.android.libraries.architecture.AsyncAction
import io.element.android.libraries.core.notifications.NotificationTroubleshootTestState
import kotlinx.collections.immutable.ImmutableList
data class TroubleshootTestSuiteState(
val mainState: AsyncAction<Unit>,
val tests: ImmutableList<NotificationTroubleshootTestState>,
)