Skip to content

Commit

Permalink
update: toastController & compileSdk = 35
Browse files Browse the repository at this point in the history
  • Loading branch information
muedsa committed Sep 10, 2024
1 parent 6cb86c3 commit 70272fa
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ if (keystorePropertiesFile.exists() && keystorePropertiesFile.canRead()) {

android {
namespace = "com.muedsa.jcytv"
compileSdk = 34
compileSdk = 35

defaultConfig {
applicationId = "com.muedsa.jcytv"
minSdk = 24
targetSdk = 34
targetSdk = 35
versionCode = 14
versionName = "1.0.0-rc03"
vectorDrawables {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ fun PlaybackScreen(
backListeners: SnapshotStateList<() -> Unit>
) {
val activity = LocalContext.current as? Activity
val errorMsgBoxState = useLocalToastMsgBoxController()
val toastController = useLocalToastMsgBoxController()

val danmakuSettingLD by playbackViewModel.danmakuSettingLDSF.collectAsState()
val danmakuListLD by playbackViewModel.danmakuListLDSF.collectAsState()
Expand All @@ -55,13 +55,13 @@ fun PlaybackScreen(

LaunchedEffect(key1 = danmakuSettingLD) {
if (danmakuListLD.type == LazyType.FAILURE) {
errorMsgBoxState.error(danmakuListLD.error)
toastController.error(danmakuListLD.error)
}
}

LaunchedEffect(key1 = danmakuListLD) {
if (danmakuListLD.type == LazyType.FAILURE) {
errorMsgBoxState.error(danmakuListLD.error)
toastController.error(danmakuListLD.error)
}
}

Expand All @@ -74,7 +74,7 @@ fun PlaybackScreen(
episodeProgress.updateAt = System.currentTimeMillis()
playbackViewModel.saveEpisodeProgress(episodeProgress)
}
errorMsgBoxState.info("播放结束,即将返回")
toastController.info("播放结束,即将返回")
delay(3_000)
activity?.finish()
}
Expand Down Expand Up @@ -144,7 +144,7 @@ fun PlaybackScreen(
addListener(object : Player.Listener {

override fun onPlayerErrorChanged(error: PlaybackException?) {
errorMsgBoxState.error(error, SnackbarDuration.Long)
toastController.error(error, SnackbarDuration.Long)
error?.let {
LogUtil.fb(it, "exoplayer mediaUrl: $mediaUrl")
}
Expand Down Expand Up @@ -177,7 +177,7 @@ fun PlaybackScreen(
seconds,
)
}
errorMsgBoxState.info("跳转到上次播放位置: $positionStr")
toastController.info("跳转到上次播放位置: $positionStr")
}
}
}
Expand Down
6 changes: 3 additions & 3 deletions benchmark/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ plugins {

android {
namespace = "com.muedsa.jcytv.benchmark"
compileSdk = 34
compileSdk = 35

compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
Expand All @@ -18,7 +18,7 @@ android {

defaultConfig {
minSdk = 24
targetSdk = 34
targetSdk = 35

testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}
Expand All @@ -45,7 +45,7 @@ androidComponents {
val artifactsLoader = v.artifacts.getBuiltArtifactsLoader()
v.instrumentationRunnerArguments.put(
"targetAppId",
v.testedApks.map { artifactsLoader.load(it)?.applicationId }
v.testedApks.map { artifactsLoader.load(it)!!.applicationId }
)
}
}

0 comments on commit 70272fa

Please sign in to comment.