mirror of
https://github.com/open-webui/open-webui.git
synced 2026-12-05 11:07:55 -05:00
fix: desktop app shows a toast for every finished reply, even in the chat on screen (#35626)
In the desktop app, every finished reply popped up a toast even when that chat was open and the window was focused. Open WebUI asks the desktop app whether its window is focused, and current desktop versions do not support that request and answer with an error, which was read as "not focused". Only a real answer now counts, and otherwise the page's own visibility decides as in a normal browser. Fixes #35622
This commit is contained in:
1 parent
259fe51cb7
commit
ee2f09d6f0
1 file changed
+2
-2
@@ -504,7 +504,7 @@
|
||||
const res = await window.electronAPI.send({
|
||||
type: 'window:isFocused'
|
||||
});
|
||||
if (res) {
|
||||
if (typeof res?.isFocused === 'boolean') {
|
||||
isInBackground = !res.isFocused;
|
||||
}
|
||||
}
|
||||
@@ -664,7 +664,7 @@
|
||||
const res = await window.electronAPI.send({
|
||||
type: 'window:isFocused'
|
||||
});
|
||||
if (res) {
|
||||
if (typeof res?.isFocused === 'boolean') {
|
||||
isInBackground = !res.isFocused;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user