Skip to content

Commit

Permalink
realmd: Handle client changes while Leave dialog is open
Browse files Browse the repository at this point in the history
The client recreates all proxies when the superuser thing emits a
"changed" event. When this happens while the Leave dialog is open, the
"realm" proxy in the Leave dialog becomes unusable.
  • Loading branch information
mvollmer committed Sep 14, 2023
1 parent bff1f57 commit dcd95fe
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pkg/systemd/overview-cards/realmd.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,7 @@ const LeaveDialog = ({ realmd_client }) => {
const [expanded, setExpanded] = useState(false);
const [pending, setPending] = useState(false);
const [error, setError] = useState(null);
useEvent(realmd_client, "changed");
const realm = realmd_client.joined[0];

const onLeave = () => {
Expand Down

0 comments on commit dcd95fe

Please sign in to comment.