Skip to content

Commit

Permalink
fix crashes on older phones
Browse files Browse the repository at this point in the history
  • Loading branch information
DatL4g committed Jun 13, 2024
1 parent c3fa80f commit b4834fa
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,12 @@ actual class BurningSeriesResolver(
) {
constructor(packageManager: PackageManager, contentResolver: ContentResolver) : this(
packageManager = packageManager,
episodeClient = contentResolver.acquireContentProviderClient(episodesContentUri),
seriesClient = contentResolver.acquireContentProviderClient(seriesContentUri)
episodeClient = scopeCatching {
contentResolver.acquireContentProviderClient(episodesContentUri)
}.getOrNull(),
seriesClient = scopeCatching {
contentResolver.acquireContentProviderClient(seriesContentUri)
}.getOrNull()
)

constructor(context: Context) : this(context.packageManager, context.contentResolver)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,13 @@ import androidx.compose.runtime.Composable
import androidx.compose.runtime.remember
import androidx.compose.ui.platform.LocalContext
import com.google.android.gms.instantapps.InstantApps
import com.google.android.gms.common.wrappers.InstantApps as CommonInstantApps
import dev.datlag.aniflow.findActivity

actual class InstantAppHelper(private val context: Context) {

actual val isInstantApp: Boolean
get() = InstantApps.getPackageManagerCompat(context).isInstantApp
get() = CommonInstantApps.isInstantApp(context)

actual fun showInstallPrompt() {
context.findActivity()?.let {
Expand Down
10 changes: 5 additions & 5 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ appcompat = "1.7.0"
appupdate = "2.1.0"
atomicfu = "0.24.0"
coil = "3.0.0-alpha06"
compose = "1.6.10"
compose = "1.6.11"
complete-kotlin = "1.1.0"
coroutines = "1.8.1"
crashlytics-plugin = "3.0.1"
datastore = "1.1.1"
datetime = "0.6.0-RC.2"
datetime = "0.6.0"
decompose = "3.0.0"
desugar = "2.0.4"
firebase = "1.12.0"
Expand All @@ -41,13 +41,13 @@ ksp = "2.0.0-1.0.21"
ktor = "2.3.11"
ktorfit = "1.14.0"
markdown-renderer = "0.16.0"
moko-resources = "0.24.0-beta-4"
moko-resources = "0.24.0"
multidex = "2.0.1"
napier = "2.7.1"
sekret = "2.0.0-alpha-05"
serialization = "1.6.3"
serialization = "1.7.0"
splashscreen = "1.0.1"
tooling = "1.5.1"
tooling = "1.5.2"
translate = "17.0.2"
ump = "2.2.0"
versions = "0.51.0"
Expand Down

0 comments on commit b4834fa

Please sign in to comment.