Address deprecation, suggestion and spotless
(cherry picked from commit 3bf70b230fc2c3eda58c4d46dec3fb75668e4f69)
This commit is contained in:
parent
4639077756
commit
185920b984
@ -386,7 +386,7 @@ class DownloadCache(
|
||||
}
|
||||
}
|
||||
}
|
||||
.awaitAll()
|
||||
.awaitAll()
|
||||
|
||||
rootDownloadsDir = updatedRootDir
|
||||
}
|
||||
|
@ -346,12 +346,13 @@ class MainActivity : BaseActivity() {
|
||||
@Composable
|
||||
private fun HandleOnNewIntent(context: Context, navigator: Navigator) {
|
||||
LaunchedEffect(Unit) {
|
||||
callbackFlow<Intent> {
|
||||
callbackFlow {
|
||||
val componentActivity = context as ComponentActivity
|
||||
val consumer = Consumer<Intent> { trySend(it) }
|
||||
componentActivity.addOnNewIntentListener(consumer)
|
||||
awaitClose { componentActivity.removeOnNewIntentListener(consumer) }
|
||||
}.collectLatest { handleIntentAction(it, navigator) }
|
||||
}
|
||||
.collectLatest { handleIntentAction(it, navigator) }
|
||||
}
|
||||
}
|
||||
|
||||
@ -407,6 +408,7 @@ class MainActivity : BaseActivity() {
|
||||
* When custom animation is used, status and navigation bar color will be set to transparent and will be restored
|
||||
* after the animation is finished.
|
||||
*/
|
||||
@Suppress("Deprecation")
|
||||
private fun setSplashScreenExitAnimation(splashScreen: SplashScreen?) {
|
||||
val root = findViewById<View>(android.R.id.content)
|
||||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.S && splashScreen != null) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user