Closed tjmtic closed 1 month ago
But still only one error can be displayed at a time. When the device is offline, will other errors be shown and replaced offline error?
Going to close this PR.
After looking more at the comment in the linked issue I think I see what the intended approach was and will update with a new PR.
Fixes #1435
Simple and Generic Error Handler, with a few extensible error types and an OFFLINE error (per reference to #350 ). Not exactly sure if there was something more specific to be implementing or errors to cover, so will be curious if there is a different approach here.
Included in core/ui due to the dependency reference to SnackbarHostState.
The errorHandler can be passed down through composables from NiaApp, the same way as onShowSnackbar, and then called when necessary by the ui. I am not confident in the instantiation in NiaApp, but am not sure it would be possible before then since the handler requires the snackbarHostState in this implementation.