Skip to content

Commit

Permalink
Simplify code
Browse files Browse the repository at this point in the history
  • Loading branch information
xfangfang committed Jan 31, 2025
1 parent b158eb3 commit e04bfa1
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
1 change: 0 additions & 1 deletion wiliwili/source/fragment/search_history.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ brls::View *SearchHistory::create() { return new SearchHistory(); }

SearchHistory::~SearchHistory() {
brls::Logger::debug("Fragment SearchHistory: delete");
this->recyclingGrid->clearData();
}

class HistoryDataSource : public RecyclingGridDataSource {
Expand Down
1 change: 0 additions & 1 deletion wiliwili/source/fragment/search_hots.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ brls::View *SearchHots::create() { return new SearchHots(); }

SearchHots::~SearchHots() {
brls::Logger::debug("Fragment Hots: delete");
this->recyclingGrid->clearData();
}

class HotsDataSource : public RecyclingGridDataSource {
Expand Down
5 changes: 3 additions & 2 deletions wiliwili/source/view/recycling_grid.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -288,11 +288,12 @@ void RecyclingGrid::reloadData() {
if (!layouted) return;

// 将所有节点从屏幕上移除放入重复利用的列表中
auto children = this->contentBox->getChildren();
auto &children = this->contentBox->getChildren();
for (auto const& child : children) {
queueReusableCell((RecyclingGridItem*)child);
this->removeCell(child);
child->willDisappear(true);
}
children.clear();

visibleMin = UINT_MAX;
visibleMax = 0;
Expand Down

0 comments on commit e04bfa1

Please sign in to comment.