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

Method optsDelete_DefaultKey

Goldleaf/source/ui/ui_AccountLayout.cpp:100–123  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

98 }
99
100 void AccountLayout::optsDelete_DefaultKey() {
101 const auto option = g_MainApplication->DisplayDialog(cfg::Strings.GetString(216), cfg::Strings.GetString(218), { cfg::Strings.GetString(111), cfg::Strings.GetString(18) }, true);
102 if(option == 0) {
103 if(acc::GetUserCount() < 2) {
104 g_MainApplication->DisplayDialog(cfg::Strings.GetString(216), cfg::Strings.GetString(276), { cfg::Strings.GetString(234) }, true);
105 return;
106 }
107
108 auto rc = DeleteUser();
109 if(R_FAILED(rc)) {
110 if(rc == rc::account::ResultUnableToRemoveLinkedAccount) {
111 const auto option_2 = g_MainApplication->DisplayDialog(cfg::Strings.GetString(216), cfg::Strings.GetString(480), { cfg::Strings.GetString(111), cfg::Strings.GetString(18) }, true);
112 if(option_2 == 0) {
113 rc = acc::UnlinkLocally();
114 if(R_SUCCEEDED(rc)) {
115 rc = DeleteUser();
116 }
117 }
118 }
119
120 HandleResult(rc, cfg::Strings.GetString(220));
121 }
122 }
123 }
124
125 void AccountLayout::optsServicesInfo_DefaultKey() {
126 const auto linked_info = acc::GetUserLinkedInfo();

Callers

nothing calls this directly

Calls 5

GetUserCountFunction · 0.85
DeleteUserFunction · 0.85
UnlinkLocallyFunction · 0.85
HandleResultFunction · 0.85
DisplayDialogMethod · 0.80

Tested by

no test coverage detected