From 930a50bafce85dd6fd78ba8670a910365c7d3d80 Mon Sep 17 00:00:00 2001 From: yicheng <11733500+yichengchen@users.noreply.github.com> Date: Mon, 10 Jun 2024 17:48:36 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E6=AD=A3=E9=A6=96=E5=B1=8F?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E4=B8=8D=E6=BB=A1=E6=97=B6=E7=9A=84=E5=88=86?= =?UTF-8?q?=E9=A1=B5=E5=8A=A0=E8=BD=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Component/Feed/FeedCollectionViewController.swift | 7 ++++++- .../Module/ViewController/FollowsViewController.swift | 5 +++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/BilibiliLive/Component/Feed/FeedCollectionViewController.swift b/BilibiliLive/Component/Feed/FeedCollectionViewController.swift index 8e89f5b4..aed91c9c 100644 --- a/BilibiliLive/Component/Feed/FeedCollectionViewController.swift +++ b/BilibiliLive/Component/Feed/FeedCollectionViewController.swift @@ -89,10 +89,15 @@ class FeedCollectionViewController: UIViewController { func appendData(displayData: [any DisplayData]) { _displayData.append(contentsOf: displayData.map { AnyDispplayData(data: $0) }.filter({ !_displayData.contains($0) })) - if displayData.count < pageSize - 5 { + if displayData.count < pageSize - 5 || displayData.count == 0 { finished = true } isLoading = false + + if _displayData.count < 12 { + isLoading = true + loadMore?() + } } override func viewDidLoad() { diff --git a/BilibiliLive/Module/ViewController/FollowsViewController.swift b/BilibiliLive/Module/ViewController/FollowsViewController.swift index b00045ee..fdea5071 100644 --- a/BilibiliLive/Module/ViewController/FollowsViewController.swift +++ b/BilibiliLive/Module/ViewController/FollowsViewController.swift @@ -23,6 +23,7 @@ class FollowsViewController: StandardVideoCollectionViewController