| 126 | } |
| 127 | |
| 128 | void UserService::ClearUserData() |
| 129 | { |
| 130 | BasicUI::CallAfter( |
| 131 | [this]() |
| 132 | { |
| 133 | // No valid data was present, do not spam Publish() |
| 134 | if (GetUserSlug().empty()) |
| 135 | return; |
| 136 | |
| 137 | userId.Write({}); |
| 138 | userName.Write({}); |
| 139 | displayName.Write({}); |
| 140 | avatarEtag.Write({}); |
| 141 | |
| 142 | gPrefs->Flush(); |
| 143 | |
| 144 | Publish({}); |
| 145 | }); |
| 146 | } |
| 147 | |
| 148 | UserService& GetUserService() |
| 149 | { |
no test coverage detected