MCPcopy Create free account
hub / github.com/XorTroll/Goldleaf / Load

Method Load

Goldleaf/source/ui/ui_AccountLayout.cpp:151–172  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

149 }
150
151 void AccountLayout::Load() {
152 g_Settings.ApplyToMenu(this->options_menu);
153 g_MainApplication->LoadCommonIconMenuData(true, cfg::Strings.GetString(41), CommonIconKind::Accounts, cfg::Strings.GetString(42));
154 const auto rc = acc::ReadSelectedUser(&this->cur_prof_base, nullptr);
155 if(R_FAILED(rc)) {
156 HandleResult(rc, cfg::Strings.GetString(211));
157 g_MainApplication->ReturnToParentLayout();
158 return;
159 }
160
161 acc::ExportSelectedUserIcon();
162 auto sd_exp = fs::GetSdCardExplorer();
163 auto user_icon = acc::GetExportedUserIcon();
164 const auto menu_head = cfg::Strings.GetString(212) + " " + this->cur_prof_base.nickname;
165 if(sd_exp->Exists(user_icon)) {
166 g_MainApplication->LoadFileMenuData(false, cfg::Strings.GetString(41), user_icon, menu_head);
167 }
168 else {
169 g_MainApplication->LoadCommonIconMenuData(false, cfg::Strings.GetString(41), CommonIconKind::Accounts, menu_head);
170 }
171 this->ReloadItems();
172 }
173
174}

Callers

nothing calls this directly

Calls 11

ReloadItemsMethod · 0.95
ReadSelectedUserFunction · 0.85
HandleResultFunction · 0.85
ExportSelectedUserIconFunction · 0.85
GetSdCardExplorerFunction · 0.85
GetExportedUserIconFunction · 0.85
ApplyToMenuMethod · 0.80
ReturnToParentLayoutMethod · 0.80
LoadFileMenuDataMethod · 0.80
ExistsMethod · 0.45

Tested by

no test coverage detected