|
@@ -322,7 +322,7 @@ class HomeViewModel : BaseViewModel() {
|
|
|
FoodContentModel(
|
|
|
it.photoPath ?: "",
|
|
|
it.name ?: "",
|
|
|
- 3,
|
|
|
+ it.score?.toInt() ?: 0,
|
|
|
getTime(it.makeHours ?: 0, it.makeMinutes ?: 0),
|
|
|
it.difficultyLevel ?: "",
|
|
|
foodId = it.number ?: "",
|
|
@@ -338,7 +338,7 @@ class HomeViewModel : BaseViewModel() {
|
|
|
FoodContentModel(
|
|
|
it.photoPath ?: "",
|
|
|
it.name ?: "",
|
|
|
- 3,
|
|
|
+ it.score?.toInt() ?: 0,
|
|
|
getTime(it.makeHours ?: 0, it.makeMinutes ?: 0),
|
|
|
it.difficultyLevel ?: "",
|
|
|
foodId = it.number ?: "",
|
|
@@ -354,7 +354,7 @@ class HomeViewModel : BaseViewModel() {
|
|
|
FoodContentModel(
|
|
|
it.photoPath ?: "",
|
|
|
it.name ?: "",
|
|
|
- 3,
|
|
|
+ it.score?.toInt() ?: 0,
|
|
|
getTime(it.makeHours ?: 0, it.makeMinutes ?: 0),
|
|
|
it.difficultyLevel ?: "",
|
|
|
foodId = it.number ?: "",
|
|
@@ -415,7 +415,7 @@ class HomeViewModel : BaseViewModel() {
|
|
|
FoodContentModel(
|
|
|
it.photoPath ?: "",
|
|
|
it.name ?: "",
|
|
|
- 3,
|
|
|
+ it.score?.toInt() ?: 0,
|
|
|
getTime(it.makeHours ?: 0, it.makeMinutes ?: 0),
|
|
|
it.difficultyLevel ?: "",
|
|
|
foodId = it.number ?: ""
|
|
@@ -430,7 +430,7 @@ class HomeViewModel : BaseViewModel() {
|
|
|
FoodContentModel(
|
|
|
it.photoPath ?: "",
|
|
|
it.name ?: "",
|
|
|
- 3,
|
|
|
+ it.score?.toInt() ?: 0,
|
|
|
getTime(it.makeHours ?: 0, it.makeMinutes ?: 0),
|
|
|
it.difficultyLevel ?: "",
|
|
|
foodId = it.number ?: ""
|
|
@@ -445,7 +445,7 @@ class HomeViewModel : BaseViewModel() {
|
|
|
FoodContentModel(
|
|
|
it.photoPath ?: "",
|
|
|
it.name ?: "",
|
|
|
- 3,
|
|
|
+ it.score?.toInt() ?: 0,
|
|
|
getTime(it.makeHours ?: 0, it.makeMinutes ?: 0),
|
|
|
it.difficultyLevel ?: "",
|
|
|
foodId = it.number ?: ""
|
|
@@ -532,7 +532,7 @@ class HomeViewModel : BaseViewModel() {
|
|
|
onlineCategoryLiveData.postValue(result)
|
|
|
|
|
|
}.catch {
|
|
|
- errorCallback.postValue(it.message?:"")
|
|
|
+ errorCallback.postValue(it.message ?: "")
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -544,7 +544,7 @@ class HomeViewModel : BaseViewModel() {
|
|
|
addQuery("lang", MMkvUtils.getString(CURRENT_LANGUAGE) ?: "EN")
|
|
|
}.await().hotTags.toMutableList()
|
|
|
}.catch {
|
|
|
- errorCallback.postValue(it.message?:"")
|
|
|
+ errorCallback.postValue(it.message ?: "")
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -588,7 +588,7 @@ class HomeViewModel : BaseViewModel() {
|
|
|
)
|
|
|
}
|
|
|
}.catch {
|
|
|
- errorCallback.postValue(it.message?:"")
|
|
|
+ errorCallback.postValue(it.message ?: "")
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -650,7 +650,7 @@ class HomeViewModel : BaseViewModel() {
|
|
|
moreLocalRecipeLiveData.postValue(foodList)
|
|
|
}
|
|
|
}.catch {
|
|
|
- errorCallback.postValue(it.message?:"")
|
|
|
+ errorCallback.postValue(it.message ?: "")
|
|
|
}
|
|
|
} else {
|
|
|
return false
|
|
@@ -714,7 +714,7 @@ class HomeViewModel : BaseViewModel() {
|
|
|
onlineHotWordSearchRecipesLiveData.postValue(result)
|
|
|
|
|
|
}.catch {
|
|
|
- errorCallback.postValue(it.message?:"")
|
|
|
+ errorCallback.postValue(it.message ?: "")
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -765,7 +765,7 @@ class HomeViewModel : BaseViewModel() {
|
|
|
}
|
|
|
moreSearchOnlineRecipeLiveData.postValue(foodContentList)
|
|
|
}.catch {
|
|
|
- errorCallback.postValue(it.message?:"")
|
|
|
+ errorCallback.postValue(it.message ?: "")
|
|
|
}
|
|
|
} else {
|
|
|
return false
|
|
@@ -782,7 +782,7 @@ class HomeViewModel : BaseViewModel() {
|
|
|
addQuery("lang", MMkvUtils.getString(CURRENT_LANGUAGE) ?: "EN")
|
|
|
}.await().informs.toMutableList()
|
|
|
}.catch {
|
|
|
- errorCallback.postValue(it.message?:"")
|
|
|
+ errorCallback.postValue(it.message ?: "")
|
|
|
}
|
|
|
}
|
|
|
|