Skip to content

Commit f0c999d

Browse files
bennycodeGregor Herdmann
authored and
Gregor Herdmann
committed
fix: Focus loss on first incoming notification (WEBAPP-4191) (#804)
1 parent c327586 commit f0c999d

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

electron/renderer/src/components/Webviews.js

+11
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,17 @@ class Webviews extends Component {
2929
super(props);
3030
}
3131

32+
shouldComponentUpdate(nextProps) {
33+
for (const account of nextProps.accounts) {
34+
const match = this.props.accounts.find((_account) => account.id === _account.id);
35+
if (!match || match.visible !== account.visible) {
36+
return true;
37+
}
38+
}
39+
40+
return false;
41+
}
42+
3243
_getEnvironmentUrl(account) {
3344
const envParam = decodeURIComponent(new URL(window.location).searchParams.get('env'));
3445
const url = new URL(envParam);

0 commit comments

Comments
 (0)