Browse Source

fix(mobile): decode parsing filename when re-indexing

Andelf 3 years ago
parent
commit
7c0665e9b3
1 changed files with 6 additions and 2 deletions
  1. 6 2
      src/main/frontend/components/sidebar.cljs

+ 6 - 2
src/main/frontend/components/sidebar.cljs

@@ -461,13 +461,17 @@
   (let [finished (or (:finished state) 0)
         total (:total state)
         width (js/Math.round (* (.toFixed (/ finished total) 2) 100))
+        file-basename (util/node-path.basename
+                       (:current-parsing-file state))
+        display-filename (if (mobile-util/native-platform?)
+                           (js/decodeURIComponent file-basename)
+                           file-basename)
         left-label [:div.flex.flex-row.font-bold
                     (t :parsing-files)
                     [:div.hidden.md:flex.flex-row
                      [:span.mr-1 ": "]
                      [:div.text-ellipsis-wrapper {:style {:max-width 300}}
-                      (util/node-path.basename
-                       (:current-parsing-file state))]]]]
+                      display-filename]]]]
     (ui/progress-bar-with-label width left-label (str finished "/" total))))
 
 (rum/defc main-content < rum/reactive db-mixins/query