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
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion ui/src/message/Messages.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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.

color="primary"
onClick={() => messagesStore.refreshByApp(appId)}
style={{marginRight: 5}}>
Expand Down
Loading