]> 127.0.0.1 Git - bili_danmu/.git/commitdiff
Improve 延迟加载列表
authorqydysky <qydysky@foxmail.com>
Sun, 17 Nov 2024 06:30:36 +0000 (14:30 +0800)
committerqydysky <qydysky@foxmail.com>
Sun, 17 Nov 2024 06:30:36 +0000 (14:30 +0800)
Reply/F.go

index 363cf21df5f9167c3bd2cfda68116ab0a4e16c05..df39a6ed2d8077906ba8b18af0928e62ff30cc06 100644 (file)
@@ -1320,8 +1320,10 @@ func init() {
                                size, _ := strconv.Atoi(r.URL.Query().Get("size"))
                                if skip <= len(filePaths) {
                                        filePaths = filePaths[skip:]
+                               } else {
+                                       filePaths = filePaths[:0]
                                }
-                               if size < len(filePaths) {
+                               if size <= len(filePaths) {
                                        filePaths = filePaths[:size]
                                }
                        } else if len(filePaths) == 0 {