-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Handle connection drops when upgrading #6767
Conversation
@@ -33,6 +34,11 @@ class HassioDashboard extends LitElement { | |||
|
|||
@property({ attribute: false }) public hassOsInfo!: HassioHassOSInfo; | |||
|
|||
protected firstUpdated(changedProps) { | |||
super.firstUpdated(changedProps); | |||
this._postUpdateDialog(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a good event that can be listened on here?
Currently, if the user now refreshes while doing the upgrade this will trigger, I guess that is fine.
I tried listening to the connection -> ready event, but that fires too early, the dialogs would not show.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It will also trigger when I navigated away during the download/update and come back a week later, that is weird I think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we want to go this way, we should store a time or something to make sure it only shows right after the update
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And if I updated in the meantime to a version higher it will say my update failed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All true, which is why I asked about a event
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The event will not fix it if the user is not at this page when it is fired?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No matter how we do this, it will be some weird situations.
I'll take this part out of the PR, and we can implement something (if needed) when something for home-assistant/supervisor#1946 is in place.
Breaking change
Proposed change
Type of change
Example configuration
Additional information
Checklist
If user exposed functionality or configuration variables are added/changed: