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:
+1
-1
@@ -14,7 +14,7 @@ open class AsyncActionProvider : PreviewParameterProvider<AsyncAction<Unit>> {
|
||||
override val values: Sequence<AsyncAction<Unit>>
|
||||
get() = sequenceOf(
|
||||
AsyncAction.Uninitialized,
|
||||
AsyncAction.Confirming,
|
||||
AsyncAction.ConfirmingNoParams,
|
||||
AsyncAction.Loading,
|
||||
AsyncAction.Failure(Exception("An error occurred")),
|
||||
AsyncAction.Success(Unit),
|
||||
|
||||
+1
-1
@@ -42,7 +42,7 @@ fun <T> AsyncActionView(
|
||||
) {
|
||||
when (async) {
|
||||
AsyncAction.Uninitialized -> Unit
|
||||
AsyncAction.Confirming -> confirmationDialog()
|
||||
is AsyncAction.Confirming -> confirmationDialog()
|
||||
is AsyncAction.Loading -> progressDialog()
|
||||
is AsyncAction.Failure -> {
|
||||
if (onRetry == null) {
|
||||
|
||||
Reference in New Issue
Block a user