-
Notifications
You must be signed in to change notification settings - Fork 171
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix/no internet connection on hub apps (#808)
Background On Hub/Apps screen displayed multiple error placeholders when categories and list could not be loaded. There's should be either displayed categories with list error or fullscreen error in case categories could not be loaded Changes - Removed entirely error placeholder from ComposableCategories as it's not required now - Block list error display when categories error happened - Add fullscreen LazyColumn error display Test plan - Get Charles or HTTP Toolkit to simultate url timeouts or just disable internet on phone - Open Hub>Apps - Await categories loaded and simulate error for list below to see it's error placeholder - Restart app with no internet to see fullscreen error placeholder on this screen when categories not loaded
- Loading branch information
1 parent
13b4c74
commit 381b8d0
Showing
5 changed files
with
60 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
.../flipperdevices/faphub/catalogtab/impl/composable/categories/ComposableFullScreenError.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package com.flipperdevices.faphub.catalogtab.impl.composable.categories | ||
|
||
import androidx.compose.foundation.lazy.LazyListScope | ||
import androidx.compose.ui.Modifier | ||
import com.flipperdevices.faphub.errors.api.FapErrorSize | ||
import com.flipperdevices.faphub.errors.api.FapHubComposableErrorsRenderer | ||
import com.flipperdevices.faphub.errors.api.throwable.FapHubError | ||
|
||
@Suppress("FunctionNaming") | ||
internal fun LazyListScope.ComposableFullScreenError( | ||
fapHubError: FapHubError, | ||
errorsRenderer: FapHubComposableErrorsRenderer, | ||
onRetry: () -> Unit, | ||
modifier: Modifier = Modifier | ||
) { | ||
with(errorsRenderer) { | ||
ComposableThrowableErrorListItem( | ||
modifier = modifier, | ||
throwable = fapHubError, | ||
onRetry = onRetry, | ||
fapErrorSize = FapErrorSize.FULLSCREEN | ||
) | ||
} | ||
} |