处理 SonarQube 问题:

双重检查锁方式实现的单例,改为使用静态内部类方式
This commit is contained in:
lyr
2021-12-21 16:51:44 +08:00
parent 27f14ac914
commit 9feb4e774a
330 changed files with 828 additions and 885 deletions

View File

@ -397,7 +397,7 @@ public class CommentUtils {
final ImageView commentLikeIv) {
String entrance = "视频流-评论-取消点赞";
CheckLoginUtils.checkLogin(context, entrance, () -> {
RetrofitManager.getInstance(context).getApi()
RetrofitManager.getInstance().getApi()
.unVoteVideoComment(videoId, commentEntity.getId())
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
@ -501,7 +501,7 @@ public class CommentUtils {
@SuppressLint("CheckResult")
public static void isUserCommentedOnThisGame(String gameId, WeakReference<SimpleCallback<Boolean>> callback) {
RetrofitManager.getInstance(HaloApp.getInstance().getApplication())
RetrofitManager.getInstance()
.getApi()
.isUserCommentedOnThisGame(UserManager.getInstance().getUserId(), gameId)
.subscribeOn(Schedulers.io())