Skip to content

Commit

Permalink
[1.0.0+1]🔧Fix: 修正了释放判断的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
MaJialun committed Aug 4, 2021
1 parent 5ff6a44 commit e110de9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/controller/tikTokVideoListController.dart
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class TikTokVideoListController extends ChangeNotifier {
// 处理预加载/释放内存
for (var i = 0; i < playerList.length; i++) {
// 需要释放[disposeCount]之前的视频
if (i < newIndex - disposeCount) {
if (i < newIndex - disposeCount || i > newIndex + disposeCount) {
print('释放$i');
playerOfIndex(i)?.controller.removeListener(_didUpdateValue);
playerOfIndex(i)?.showPauseIcon.removeListener(_didUpdateValue);
Expand Down

0 comments on commit e110de9

Please sign in to comment.