Skip to content

client: Avoid off-line mode instrumentation when off-line mode is not enabled#1361

Merged
jtojnar merged 6 commits into
masterfrom
sw-only-offline
Oct 4, 2022
Merged

client: Avoid off-line mode instrumentation when off-line mode is not enabled#1361
jtojnar merged 6 commits into
masterfrom
sw-only-offline

Conversation

@jtojnar

@jtojnar jtojnar commented Oct 4, 2022

Copy link
Copy Markdown
Member

No description provided.

At least not until submitted – only use it for default checkbox value.
It also was not even updating the `selfoss.db.enableOffline` anyway leading to a inconsistent state.
Not as useful as it once would have been since we already moved majority of those into App.
Whether user is logged in already checked by the selfoss methods.
The service worker would trigger an annoying update notification all the time.

Also make the init functions async, clean up them a bit and add comments.
Might be somewhat annoying when the “log out” button is clicked accidentally but it is generally expected that on log out all session data will be cleared.

Maybe we can hide the button into a submenu in the future.

Also make the `logout` function async and re-organize it a bit (redirect only after user has been logged out).
And use the definition from rooks.
@jtojnar jtojnar merged commit 9d2de77 into master Oct 4, 2022
@jtojnar jtojnar deleted the sw-only-offline branch October 4, 2022 18:30
@jtojnar jtojnar mentioned this pull request Oct 4, 2022
11 tasks
@jtojnar jtojnar added this to the 2.19 milestone Oct 7, 2022
@jtojnar jtojnar mentioned this pull request Oct 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant