Replies: 2 comments
-
App loading state capsule (websocket connection + data warming up)LoadingValue loadingModeCapsule(CapsuleHandle use) {
// Websocket connection state
{
final loadingMessage = use(websocketConnectionStateCapsule).loadingMessage;
if (loadingMessage != null) {
return LoadingValue(loading: true, message: loadingMessage);
}
}
// Data
{
// On Identified warm up
{
final loadingMessage =
use(onIdentifiedWarmUpManagerCapsule).state.loadingMessage;
if (loadingMessage != null) {
return LoadingValue(loading: true, message: loadingMessage);
}
}
}
return LoadingValue(loading: false, message: null);
} |
Beta Was this translation helpful? Give feedback.
0 replies
-
I’m a bit busy so didn’t have time to really delve into it, but a few things:
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Finally I have acknowledge that was not an optimal approach. The motivation was to have several warm-up "regions", which can had different lifecycles. E.G. One can start on app init, other can start on websocket connecting, other on websocket connected, ...
I show up my best logic that I achieved for now. It starts when a websocket connection gets identified (connected + id).
Any improvement suggestion is welcome.
Warm-up (manager)
Warm-up data (side effect)
Beta Was this translation helpful? Give feedback.
All reactions