use of com.rideread.rideread.common.dialog.ConfirmDialogFragment 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);
}
});
}
}
Aggregations