修复bug
This commit is contained in:
parent
5c1b2c7ffb
commit
6a6a19b4a8
@ -131,6 +131,7 @@ class SPPlayerListViewController: SPViewController {
|
||||
|
||||
|
||||
func setDataArr(dataArr: [Any], completer: (() -> Void)?) {
|
||||
clearDataArr()
|
||||
self.dataArr = dataArr
|
||||
reloadData(completion: completer)
|
||||
}
|
||||
@ -157,6 +158,8 @@ class SPPlayerListViewController: SPViewController {
|
||||
func clearDataArr() {
|
||||
self.dataArr.removeAll()
|
||||
self.viewModel.currentPlayer = nil
|
||||
self.currentIndexPath = .init(row: 0, section: 0)
|
||||
self.collectionView.contentOffset = .init(x: 0, y: 0)
|
||||
self.collectionView.reloadData()
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user