Browse Source

fix: redirect to home after clearing cache

leizhe 4 years ago
parent
commit
296bbd7b1d
1 changed files with 4 additions and 2 deletions
  1. 4 2
      src/electron/electron/handler.cljs

+ 4 - 2
src/electron/electron/handler.cljs

@@ -15,7 +15,8 @@
             [clojure.core.async :as async]
             [clojure.core.async :as async]
             [electron.search :as search]
             [electron.search :as search]
             [electron.git :as git]
             [electron.git :as git]
-            [electron.plugin :as plugin]))
+            [electron.plugin :as plugin]
+            [frontend.handler.route :as route-handler]))
 
 
 (defmulti handle (fn [_window args] (keyword (first args))))
 (defmulti handle (fn [_window args] (keyword (first args))))
 
 
@@ -187,7 +188,8 @@
         (try
         (try
           (fs-extra/removeSync path)
           (fs-extra/removeSync path)
           (catch js/Error e
           (catch js/Error e
-            (js/console.error e)))))))
+            (js/console.error e)))))
+    (route-handler/redirect-to-home!)))
 
 
 (defmethod handle :clearCache [_window _]
 (defmethod handle :clearCache [_window _]
   (search/close!)
   (search/close!)