Skip to content

Commit d2ef385

Browse files
committed
Fixed crash on followed list
1 parent e029d63 commit d2ef385

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

src/Utils/FriendsProfilePage.cpp

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -204,19 +204,28 @@ class $modify(FriendPage, FriendsProfilePage) {
204204
}
205205
}
206206

207+
void setupUsersBrowser(cocos2d::CCArray * users, UserListType type)
208+
{
209+
FriendsProfilePage::setupUsersBrowser(users, type);
210+
211+
if (m_buttonMenu->getChildByID("friendsScrollBar"))
212+
{
213+
m_buttonMenu->removeChildByID("friendsScrollBar");
214+
}
215+
}
216+
207217
virtual void getUserListFinished(cocos2d::CCArray* a1, UserListType a2) {
208218
FriendsProfilePage::getUserListFinished(a1,a2);
209219

210220
auto menu = this->m_buttonMenu;
211-
221+
212222
auto scrollBar = Scrollbar::create(this->m_listLayer->m_list->m_tableView);
213223
scrollBar->setPosition(390, -140);
214224
scrollBar->setID("friendsScrollBar");
215-
216225
menu->addChild(scrollBar);
217226
}
218227

219-
virtual void forceReloadList(UserListType a1) {
228+
virtual void onUpdate(UserListType a1) {
220229
FriendsProfilePage::forceReloadList(a1);
221230

222231
m_buttonMenu->removeChildByID("friendsScrollBar");

0 commit comments

Comments
 (0)