Skip to content

Commit

Permalink
修复自动刷新可能不刷新的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
Finb committed Jan 6, 2025
1 parent 9e8162e commit a57fdaa
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Controller/MessageListViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ class MessageListViewController: BaseViewController<MessageListViewModel> {

NotificationCenter.default.rx
.notification(UIApplication.willEnterForegroundNotification)
.delay(.milliseconds(500), scheduler: MainScheduler.instance) // 延迟0.5秒,等待数据库 Results 更新到最新数据集
.subscribe(onNext: { [weak self] _ in
self?.reloadRelay.accept(())
}).disposed(by: rx.disposeBag)
Expand Down

0 comments on commit a57fdaa

Please sign in to comment.