ソースを参照

Fixed minor glitch for File Manager hash refresh

Toby Chui 3 年 前
コミット
f5636d843c
1 ファイル変更3 行追加2 行削除
  1. 3 2
      web/SystemAO/file_system/file_explorer.html

+ 3 - 2
web/SystemAO/file_system/file_explorer.html

@@ -1317,13 +1317,14 @@
                     if (enableAutoRefresh == false){
                         return;
                     }
+                    let currentPagePath = currentPath;
                     getDirHash(function(hash){
                         if (hash.error !== undefined){
                             //Something went wrong. Ignore this request
                             console.log(hash.error)
                         }else{
-                            //Check if the hash match with the last hash.
-                            if (hash != currentPathHash){
+                            //Check if the hash match with the last hash && user is still on the same page
+                            if (hash != currentPathHash && currentPagePath == currentPath){
                                 //console.log(currentPathHash, hash);
                                 refreshList();
                                 currentPathHash = hash;