Skip to content
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

change: removal of disabled flag from messages Refresh button #637

Merged
merged 1 commit into from Mar 12, 2024

Conversation

iarp
Copy link
Contributor

@iarp iarp commented Mar 11, 2024

In reference to #636

@iarp iarp requested a review from a team as a code owner March 11, 2024 19:15
Copy link

codecov bot commented Mar 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 86.81%. Comparing base (46281d6) to head (02c9613).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #637   +/-   ##
=======================================
  Coverage   86.81%   86.81%           
=======================================
  Files          44       44           
  Lines        1593     1593           
=======================================
  Hits         1383     1383           
  Misses        125      125           
  Partials       85       85           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -70,7 +70,6 @@ class Messages extends Component<IProps & Stores<'messagesStore' | 'appStore'>,
<Button
id="refresh-all"
variant="contained"
disabled={!hasMessages}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the webapp is cache-reopened, then it's likely that the websocket connection isn't reconnected. So you will be able to refresh the messages, but this won't reconnect the websocket.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we somehow get the refresh button to check connection status and call upon WebSocketStore.listen if needed? I'm not all familiar with how react works.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Possible yes, but I'd rather solve this automatically on page load but I currently don't know a way to reproduce this cached reopen where the site state is kept.

Copy link
Contributor Author

@iarp iarp Mar 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Assuming your browser reopens previously opened tabs, open gotify in a tab and close the browser. Reopen the browser and thats it. Or open gotify, leave the browser open and sleep the computer. (I'm using Firefox)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm doing this, but my firefox correctly reestablishes the websocket connection and has messages that were sent while the browser was closed.

Copy link
Member

@jmattheis jmattheis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. It's weird, that this was disabled when there are no messages (:.

@jmattheis jmattheis merged commit 13cbccc into gotify:master Mar 12, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants