fixed lint

This commit is contained in:
LagradOst 2022-02-06 16:43:29 +01:00
parent 1cf66601af
commit 0018bc0ee1
6 changed files with 17 additions and 15 deletions

View File

@ -90,8 +90,9 @@ class HomeViewModel : ViewModel() {
)
}?.filterNotNull()
}
_resumeWatching.postValue(resumeWatchingResult)
resumeWatchingResult?.let {
_resumeWatching.postValue(it)
}
}
fun loadStoredData(preferredWatchStatus: EnumSet<WatchType>?) = viewModelScope.launch {
@ -179,7 +180,9 @@ class HomeViewModel : ViewModel() {
}
else -> Unit
}
_page.postValue(data)
data?.let {
_page.postValue(it)
}
} else {
_page.postValue(Resource.Success(HomePageResponse(emptyList())))
}

View File

@ -1,7 +1,6 @@
package com.lagradost.cloudstream3.ui.result
import android.content.Context
import android.net.Uri
import androidx.lifecycle.LiveData
import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.ViewModel
@ -11,7 +10,6 @@ import com.lagradost.cloudstream3.APIHolder.getApiFromNameNull
import com.lagradost.cloudstream3.APIHolder.getId
import com.lagradost.cloudstream3.AcraApplication.Companion.setKey
import com.lagradost.cloudstream3.mvvm.Resource
import com.lagradost.cloudstream3.mvvm.normalSafeApiCall
import com.lagradost.cloudstream3.mvvm.safeApiCall
import com.lagradost.cloudstream3.syncproviders.SyncAPI
import com.lagradost.cloudstream3.ui.APIRepository
@ -19,19 +17,20 @@ import com.lagradost.cloudstream3.ui.WatchType
import com.lagradost.cloudstream3.ui.player.IGenerator
import com.lagradost.cloudstream3.ui.player.RepoLinkGenerator
import com.lagradost.cloudstream3.ui.player.SubtitleData
import com.lagradost.cloudstream3.utils.*
import com.lagradost.cloudstream3.utils.DOWNLOAD_HEADER_CACHE
import com.lagradost.cloudstream3.utils.DataStoreHelper
import com.lagradost.cloudstream3.utils.DataStoreHelper.getBookmarkedData
import com.lagradost.cloudstream3.utils.DataStoreHelper.getDub
import com.lagradost.cloudstream3.utils.DataStoreHelper.getResultSeason
import com.lagradost.cloudstream3.utils.DataStoreHelper.getResultWatchState
import com.lagradost.cloudstream3.utils.DataStoreHelper.getViewPos
import com.lagradost.cloudstream3.utils.DataStoreHelper.removeLastWatched
import com.lagradost.cloudstream3.utils.DataStoreHelper.setBookmarkedData
import com.lagradost.cloudstream3.utils.DataStoreHelper.setDub
import com.lagradost.cloudstream3.utils.DataStoreHelper.setLastWatched
import com.lagradost.cloudstream3.utils.DataStoreHelper.setResultSeason
import com.lagradost.cloudstream3.utils.DataStoreHelper.setResultWatchState
import com.lagradost.cloudstream3.utils.ExtractorLink
import com.lagradost.cloudstream3.utils.FillerEpisodeCheck.getFillerEpisodes
import com.lagradost.cloudstream3.utils.VideoDownloadHelper
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.launch
import kotlinx.coroutines.withContext
@ -195,7 +194,7 @@ class ResultViewModel : ViewModel() {
id.value?.let {
setDub(it, status)
}
_dubStatus.postValue(status)
_dubStatus.postValue(status!!)
updateEpisodes(null, episodes, null)
}
}

View File

@ -31,7 +31,7 @@
<string name="go_back">Retour</string>
<string name="episode_poster_img_des">Miniature de l\'Episode</string>
<string name="play_episode">Lire l\'Episode</string>
<string name="need_storage">Permet de télécharger les épisodes</string>
<!--<string name="need_storage">Permet de télécharger les épisodes</string>-->
<string name="download">Télécharger</string>
<string name="downloaded">Téléchargé</string>
<string name="downloading">Téléchargement</string>

View File

@ -34,11 +34,11 @@
<string name="go_back">Πίσω</string>
<string name="episode_poster_img_des">Πόστερ</string>
<string name="play_episode">Αναπαραγωγή Επισοδείου</string>
<string name="need_storage">Δώσε άδεια για την λήψη επισοδείου</string>
<!--<string name="need_storage">Δώσε άδεια για την λήψη επισοδείου</string>-->
<string name="download">Λήξη</string>
<string name="error_loading_links_toast">Σφάλμα φόρτωσεις συνδέσμων</string>
<string name="download_storage_text">Εσωτερικός χώρος</string>
<string name="options">Επιλογές</string>
<!--<string name="options">Επιλογές</string>-->
<string name="app_dubbed_text">Dub</string>
<string name="app_subbed_text">Sub</string>

View File

@ -32,7 +32,7 @@
<string name="go_back">aauugghhaaaghh</string>
<string name="episode_poster_img_des">oouuhahoooooo-ahahoooohh</string>
<string name="play_episode">aaaaa oh ohaouuhhh</string>
<string name="need_storage">ahouuhhhaaaaa ahhaaaghh ahhh</string>
<!--<string name="need_storage">ahouuhhhaaaaa ahhaaaghh ahhh</string>-->
<string name="download">aauuhahh</string>
<string name="download_storage_text">aauugghhahahhah</string>
<string name="app_dubbed_text">ooooo</string>

View File

@ -34,11 +34,11 @@
<string name="go_back">Ga terug</string>
<string name="episode_poster_img_des">Afleveringsposter</string>
<string name="play_episode">Aflevering afspelen</string>
<string name="need_storage">Toestaan om afleveringen te downloaden</string>
<!--<string name="need_storage">Toestaan om afleveringen te downloaden</string>-->
<string name="download">Download</string>
<string name="error_loading_links_toast">Fout bij laden van links</string>
<string name="download_storage_text">Interne opslag</string>
<string name="options">Opties</string>
<!--<string name="options">Opties</string>-->
<string name="app_dubbed_text">Dub</string>
<string name="app_subbed_text">Sub</string>