fix: address deprecated code (#256)
* fix: address deprecated code Build.RADIO has been deprecated since API 15, which means it hasn't worked since before the lowest target API of the app, and versioncode is deprecated in API 28. * fix: use the convenience method This takes the unused convenience method and the individually declared uses and merges them. * fix: simplify compat switch
This commit is contained in:
parent
5c2ae57d77
commit
cf10229574
4 changed files with 40 additions and 26 deletions
|
@ -54,6 +54,7 @@ import kotlinx.coroutines.launch
|
|||
import kotlinx.coroutines.sync.Mutex
|
||||
import kotlinx.coroutines.sync.withLock
|
||||
import kotlinx.coroutines.withContext
|
||||
import tachiyomi.core.util.lang.launchIO
|
||||
import uy.kohesive.injekt.Injekt
|
||||
import uy.kohesive.injekt.api.get
|
||||
import java.io.File
|
||||
|
@ -357,7 +358,7 @@ class AnimeDownloaderService : Service() {
|
|||
|
||||
@OptIn(DelicateCoroutinesApi::class)
|
||||
private fun saveMediaInfo(task: AnimeDownloadTask) {
|
||||
GlobalScope.launch(Dispatchers.IO) {
|
||||
launchIO {
|
||||
val directory = File(
|
||||
getExternalFilesDir(Environment.DIRECTORY_DOWNLOADS),
|
||||
"${DownloadsManager.animeLocation}/${task.title}"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue