处理非空异常
This commit is contained in:
@ -102,10 +102,12 @@ class GameDetailViewModel(application: Application,
|
||||
concernLiveData.postValue(ConcernResponse(isConcern, false))
|
||||
}
|
||||
}
|
||||
if (isConcern) {
|
||||
ConcernUtils.postConcernGameId(getApplication(), game?.id!!, listener)
|
||||
} else {
|
||||
ConcernUtils.deleteConcernData(getApplication(), game?.id!!, listener)
|
||||
game?.id?.let {
|
||||
if (isConcern) {
|
||||
ConcernUtils.postConcernGameId(getApplication(), it, listener)
|
||||
} else {
|
||||
ConcernUtils.deleteConcernData(getApplication(), it, listener)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user