mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-03 06:55:41 +00:00
Let AsyncAction.Confirming be an interface, with a AsyncAction.ConfirmingNoParams data object.
This will allow inheritance of `AsyncAction.Confirming` with parameter(s).
This commit is contained in:
+2
-2
@@ -122,7 +122,7 @@ private fun ColumnScope.TroubleshootTestView(
|
||||
private fun ColumnScope.TroubleshootNotificationsContent(state: TroubleshootNotificationsState) {
|
||||
when (state.testSuiteState.mainState) {
|
||||
AsyncAction.Loading,
|
||||
AsyncAction.Confirming,
|
||||
is AsyncAction.Confirming,
|
||||
is AsyncAction.Success,
|
||||
is AsyncAction.Failure -> {
|
||||
TestSuiteView(
|
||||
@@ -150,7 +150,7 @@ private fun ColumnScope.TroubleshootNotificationsContent(state: TroubleshootNoti
|
||||
})
|
||||
RunTestButton(state = state)
|
||||
}
|
||||
AsyncAction.Confirming -> {
|
||||
is AsyncAction.Confirming -> {
|
||||
ListItem(headlineContent = {
|
||||
Text(
|
||||
text = stringResource(id = R.string.troubleshoot_notifications_screen_waiting)
|
||||
|
||||
+1
-1
@@ -102,7 +102,7 @@ fun List<NotificationTroubleshootTestState>.computeMainState(): AsyncAction<Unit
|
||||
isRunning -> AsyncAction.Loading
|
||||
else -> {
|
||||
if (any { it.status is NotificationTroubleshootTestState.Status.WaitingForUser }) {
|
||||
AsyncAction.Confirming
|
||||
AsyncAction.ConfirmingNoParams
|
||||
} else if (any { it.status is NotificationTroubleshootTestState.Status.Failure }) {
|
||||
AsyncAction.Failure(Exception("Some tests failed"))
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user