feat(core): improve platform compatibility and startup robustness
This update enhances cross-platform reliability by addressing potential hangs during application startup on Linux environments using WebKitGTK. Additionally, native taskbar badge functionality is improved for macOS and Linux, ensuring accurate display of sync status. Configuration settings are also updated to include more specific internal crate reads and web search capabilities. - Added timeout fallback to waitForAnimationFrame in Svelte - Improved set_sync_badge logic for macOS/Linux platforms - Updated local configuration with detailed dependency reads
This commit is contained in:
+15
-1
@@ -421,7 +421,21 @@
|
||||
}
|
||||
|
||||
function waitForAnimationFrame(): Promise<void> {
|
||||
return new Promise((resolve) => requestAnimationFrame(() => resolve()));
|
||||
// requestAnimationFrame never fires for an unmapped/invisible window on
|
||||
// WebKitGTK (Linux) — the compositor frame clock only runs for realized
|
||||
// windows. The main window starts hidden until the splashscreen closes,
|
||||
// so without a timeout fallback this promise (and the whole startup
|
||||
// sequence, including closing the splashscreen) would hang forever on Linux.
|
||||
return new Promise((resolve) => {
|
||||
let settled = false;
|
||||
const settle = () => {
|
||||
if (settled) return;
|
||||
settled = true;
|
||||
resolve();
|
||||
};
|
||||
requestAnimationFrame(() => settle());
|
||||
window.setTimeout(settle, 50);
|
||||
});
|
||||
}
|
||||
|
||||
async function waitForStartupPaint() {
|
||||
|
||||
Reference in New Issue
Block a user