private async void UpdateNewNickname() { UIVM.IsEditingNickname = false; LocalUserVM.LocalUser.Nickname = UIVM.EditingNickname; PutUsers_Result result = await HTTP.PutUsers_(LocalUserVM.JWT, LocalUserVM.LocalUser.Username, UIVM.EditingNickname, "", "", "", -1, -1); switch (result.StatusCode) { case PutUsers_Result.PutUser_StatusCode.Success: break; default: NotificationHelper.ShowToast("修改失败!"); break; } LocalUserVM.Sync(); }
private async void UpdateNewGender(int g) { if (App.AppVM.LocalUserVM.LocalUser.Gender.Equals(g)) { return; } PutUsers_Result result = await HTTP.PutUsers_(LocalUserVM.JWT, LocalUserVM.LocalUser.Username, "", "", "", "", g, -1); switch (result.StatusCode) { case PutUsers_Result.PutUser_StatusCode.Success: break; default: NotificationHelper.ShowToast("修改失败!"); break; } LocalUserVM.Sync(); }