| 112 | } |
| 113 | |
| 114 | void GetEffectsDialog::ReloadEffectList() |
| 115 | { |
| 116 | m_treebook->DeleteAllPages(); |
| 117 | AddLoadingPage(); |
| 118 | GetEffects([this, self = wxWeakRef(this)] (std::vector<EffectsGroup> groups) { |
| 119 | if (!self) |
| 120 | return; |
| 121 | BasicUI::CallAfter([this, groups]() { |
| 122 | // Freeze the window to avoid flickering |
| 123 | Freeze(); |
| 124 | |
| 125 | m_treebook->DeleteAllPages(); |
| 126 | |
| 127 | for (const auto group : groups) { |
| 128 | AddEffectsPage(group.title, group.effects); |
| 129 | } |
| 130 | |
| 131 | if (groups.empty()) { |
| 132 | AddLoadingErrorPage(); |
| 133 | } |
| 134 | |
| 135 | AddBecomeAPartnerPage(); |
| 136 | |
| 137 | Thaw(); |
| 138 | Fit(); |
| 139 | Layout(); |
| 140 | }); |
| 141 | }); |
| 142 | } |
| 143 | |
| 144 | void GetEffectsDialog::FetchImage(RoundedStaticBitmap* bitmap, const std::string& url) |
| 145 | { |
nothing calls this directly
no test coverage detected