Skip to content
Snippets Groups Projects

Improve lifecycle of SPA

Merged Jonathan Weth requested to merge improve-lifecycle-spa into release-3.0
8 files
+ 73
13
Compare changes
  • Side-by-side
  • Inline
Files
8
@@ -70,7 +70,7 @@ const apolloOpts = {
}
// Add a snackbar on all errors returned by the GraphQL endpoint
// If App is offline, don't add snackbar since only the ping query is active
if (!vm.$root.offline) {
if (!vm.$root.offline && !vm.$root.invalidation) {
vm.$root.snackbarItems.push({
id: crypto.randomUUID(),
timeout: 5000,
@@ -79,7 +79,7 @@ const apolloOpts = {
});
}
}
if (networkError) {
if (networkError && !vm.$root.invalidation) {
// Set app offline globally on network errors
// This will cause the offline logic to kick in, starting a ping check or
// similar recovery strategies depending on the app/navigator state
Loading