Skip to content

Commit 9e2fe79

Browse files
authored
Revert "Enhance (UX): Electron loading (#10049)" (#10165)
This reverts commit 12642f5.
1 parent 850bc1a commit 9e2fe79

File tree

3 files changed

+3
-10
lines changed

3 files changed

+3
-10
lines changed

src/electron/electron/handler.cljs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
["buffer" :as buffer]
77
["diff-match-patch" :as google-diff]
88
["electron" :refer [app autoUpdater dialog ipcMain shell]]
9-
["electron-window-state" :as windowStateKeeper]
109
["fs" :as fs]
1110
["fs-extra" :as fs-extra]
1211
["os" :as os]
@@ -619,10 +618,6 @@
619618
(defmethod handle :window-close [^js win]
620619
(.close win))
621620

622-
(defmethod handle :theme-loaded [^js win]
623-
(.manage (windowStateKeeper) win)
624-
(.show win))
625-
626621
;;;;;;;;;;;;;;;;;;;;;;;
627622
;; file-sync-rs-apis ;;
628623
;;;;;;;;;;;;;;;;;;;;;;;

src/electron/electron/window.cljs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@
3535
:titleBarStyle "hiddenInset"
3636
:trafficLightPosition {:x 16 :y 16}
3737
:autoHideMenuBar (not mac?)
38-
:show false
3938
:webPreferences
4039
{:plugins true ; pdf
4140
:nodeIntegration false
@@ -56,6 +55,7 @@
5655
linux?
5756
(assoc :icon (node-path/join js/__dirname "icons/logseq.png")))
5857
win (BrowserWindow. (clj->js win-opts))]
58+
(.manage win-state win)
5959
(.onBeforeSendHeaders (.. session -defaultSession -webRequest)
6060
(clj->js {:urls (array "*://*.youtube.com/*")})
6161
(fn [^js details callback]

src/main/frontend/components/theme.cljs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
(ns frontend.components.theme
2-
(:require [electron.ipc :as ipc]
3-
[frontend.extensions.pdf.core :as pdf]
2+
(:require [frontend.extensions.pdf.core :as pdf]
43
[frontend.config :as config]
54
[frontend.handler.plugin :as plugin-handler]
65
[frontend.handler.plugin-config :as plugin-config-handler]
@@ -34,8 +33,7 @@
3433

3534
(rum/use-effect!
3635
#(let [doc js/document.documentElement]
37-
(.setAttribute doc "lang" preferred-language)
38-
(js/setTimeout (fn [] (ipc/ipc "theme-loaded")) 100))) ; Wait for the theme to be applied
36+
(.setAttribute doc "lang" preferred-language)))
3937

4038
(rum/use-effect!
4139
#(when (and restored-sidebar?

0 commit comments

Comments
 (0)