use of com.rideread.rideread.data.result.UserInfo in project ride-read-android by Ride-Read.
the class UserMomentsActivity method followUser.
private void followUser() {
if (isFollow) {
ConfirmDialogFragment unFollowDialog = ConfirmDialogFragment.newInstance(R.string.sure2unfollow);
unFollowDialog.show(getSupportFragmentManager(), "dialog");
} else {
ApiUtils.follow(mSelectedUid, new BaseCallback<BaseModel<DefJsonResult>>() {
@Override
protected void onSuccess(BaseModel<DefJsonResult> model) throws Exception {
isFollow = true;
refreshFollowAction(isFollow);
UserInfo myInfo = UserUtils.getCurUser();
int curFollowing = myInfo.getFollowing() + 1;
myInfo.setFollowing(curFollowing);
UserUtils.saveUserInfo(myInfo);
}
});
}
}
use of com.rideread.rideread.data.result.UserInfo in project ride-read-android by Ride-Read.
the class UserInfoActivity method saveCurInfo.
private void saveCurInfo() {
UserInfo curInfo = new UserInfo(mFaceUrl, mNick, mCurSexIndex + 1, mLabels, mSignature, mSchool, mLocation, mHomeTown, mCareer);
ApiUtils.update(curInfo, mBirthday, new BaseCallback<BaseModel<UserInfo>>() {
@Override
protected void onSuccess(BaseModel<UserInfo> model) throws Exception {
UserInfo userInfo = model.getData();
if (null != userInfo) {
UserUtils.saveUserInfo(userInfo);
finish();
EventBus.getDefault().postSticky(new RefreshProfileEvent());
}
}
});
}
Aggregations