Browse Source

:wastebasket: 注释掉未使用的流量统计代码

Mizore 1 year ago
parent
commit
b791848555
1 changed files with 14 additions and 14 deletions
  1. 14 14
      script/util_notify.lua

+ 14 - 14
script/util_notify.lua

@@ -318,20 +318,20 @@ local function append()
     if band >= 0 then msg = msg .. "\n频段: B" .. band end
 
     -- 流量统计
-    local uplinkGB, uplinkB, downlinkGB, downlinkB = mobile.dataTraffic()
-    uplinkB = uplinkGB * 1024 * 1024 * 1024 + uplinkB
-    downlinkB = downlinkGB * 1024 * 1024 * 1024 + downlinkB
-    local function formatBytes(bytes)
-        if bytes < 1024 then
-            return bytes .. "B"
-        elseif bytes < 1024 * 1024 then
-            return string.format("%.2fKB", bytes / 1024)
-        elseif bytes < 1024 * 1024 * 1024 then
-            return string.format("%.2fMB", bytes / 1024 / 1024)
-        else
-            return string.format("%.2fGB", bytes / 1024 / 1024 / 1024)
-        end
-    end
+    -- local uplinkGB, uplinkB, downlinkGB, downlinkB = mobile.dataTraffic()
+    -- uplinkB = uplinkGB * 1024 * 1024 * 1024 + uplinkB
+    -- downlinkB = downlinkGB * 1024 * 1024 * 1024 + downlinkB
+    -- local function formatBytes(bytes)
+    --     if bytes < 1024 then
+    --         return bytes .. "B"
+    --     elseif bytes < 1024 * 1024 then
+    --         return string.format("%.2fKB", bytes / 1024)
+    --     elseif bytes < 1024 * 1024 * 1024 then
+    --         return string.format("%.2fMB", bytes / 1024 / 1024)
+    --     else
+    --         return string.format("%.2fGB", bytes / 1024 / 1024 / 1024)
+    --     end
+    -- end
     -- msg = msg .. "\n流量: ↑" .. formatBytes(uplinkB) .. " ↓" .. formatBytes(downlinkB)
 
     -- 位置