فهرست منبع

fix: present sheets in release mode

Tienson Qin 1 ماه پیش
والد
کامیت
e373199d54
3فایلهای تغییر یافته به همراه6 افزوده شده و 6 حذف شده
  1. 1 1
      src/main/frontend/mobile/util.cljs
  2. 2 2
      src/main/mobile/components/header.cljs
  3. 3 3
      src/main/mobile/components/popup.cljs

+ 1 - 1
src/main/frontend/mobile/util.cljs

@@ -86,7 +86,7 @@
 (defn check-ios-zoomed-display
   "Detect whether iOS device is in Zoom Display"
   []
-  (p/let [is-zoomed? (p/chain (.isZoomed ios-utils)
+  (p/let [is-zoomed? (p/chain (.isZoomed ^js ios-utils)
                               #(js->clj % :keywordize-keys true))]
     (when (:isZoomed is-zoomed?)
       (let [^js cl (.-classList js/document.documentElement)]

+ 2 - 2
src/main/mobile/components/header.cljs

@@ -165,7 +165,7 @@
 (defn- register-native-top-bar-events! []
   (when (and (mobile-util/native-ios?)
              (not @native-top-bar-listener?))
-    (.addListener mobile-util/native-top-bar "buttonTapped"
+    (.addListener ^js mobile-util/native-top-bar "buttonTapped"
                   (fn [^js e]
                     (case (.-id e)
                       "title" (open-graph-switcher!)
@@ -219,7 +219,7 @@
           header (cond-> base
                    right-buttons (assoc :rightButtons right-buttons)
                    (= tab "home") (assoc :titleClickable true))]
-      (.configure mobile-util/native-top-bar
+      (.configure ^js mobile-util/native-top-bar
                   (clj->js header)))))
 
 (rum/defc header-inner

+ 3 - 3
src/main/mobile/components/popup.cljs

@@ -21,7 +21,7 @@
 
 (defn- present-native-sheet!
   [data]
-  (when-let [plugin mobile-util/native-bottom-sheet]
+  (when-let [^js plugin mobile-util/native-bottom-sheet]
     (let [{:keys [opts]} data
           id (:id opts)
           popup-exists? (and id (= id (get-in @*last-popup-data [:opts :id])))]
@@ -36,7 +36,7 @@
 
 (defn- dismiss-native-sheet!
   []
-  (when-let [plugin mobile-util/native-bottom-sheet]
+  (when-let [^js plugin mobile-util/native-bottom-sheet]
     (mobile-state/set-popup! nil)
     (reset! *last-popup-data nil)
     (.dismiss plugin #js {})))
@@ -64,7 +64,7 @@
 
 (defonce native-sheet-listener
   (when (mobile-util/native-ios?)
-    (when-let [plugin mobile-util/native-bottom-sheet]
+    (when-let [^js plugin mobile-util/native-bottom-sheet]
       (.addListener plugin "state" handle-native-sheet-state!))))
 
 (defn popup-show!