Skip to content

Commit

Permalink
Merge pull request #122 from dmzz-yyhyy/update_download_fix
Browse files Browse the repository at this point in the history
修复自动下载失败
  • Loading branch information
dmzz-yyhyy authored Oct 26, 2024
2 parents 94f7714 + b94360d commit 00c1d62
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ android {
minSdk = 24
targetSdk = 34
// 版本号为x.y.z则versionCode为x*1000000+y*10000+z*100+debug版本号(开发需要时迭代, 两位数)
versionCode = 1_00_00_002
versionCode = 1_00_00_003
versionName = "1.0.0"

testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
Expand Down
5 changes: 4 additions & 1 deletion app/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,7 @@
-dontwarn javax.lang.model.util.ElementFilter
-dontwarn javax.lang.model.util.SimpleElementVisitor8
-dontwarn javax.lang.model.util.SimpleTypeVisitor8
-dontwarn javax.lang.model.util.Types
-dontwarn javax.lang.model.util.Types
-keep,allowobfuscation,allowshrinking interface retrofit2.Call
-keep,allowobfuscation,allowshrinking class retrofit2.Response
-keep,allowobfuscation,allowshrinking class kotlin.coroutines.Continuation
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class CheckUpdateWork @AssistedInject constructor(
notify(
it.id,
NotificationCompat.Builder(appContext, "BookUpdate")
.setSmallIcon(R.drawable.lightnovelreader_big_01)
.setSmallIcon(R.drawable.icon_foreground)
.setContentTitle(appContext.getString(R.string.app_name))
.setContentText("您关注的轻小说 ${it.title} 更新了")
.setPriority(NotificationCompat.PRIORITY_DEFAULT)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package indi.dmzz_yyhyy.lightnovelreader.ui.home.settings

import androidx.compose.animation.AnimatedVisibility
import androidx.compose.animation.fadeIn
import androidx.compose.animation.fadeOut
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Box
Expand Down Expand Up @@ -38,7 +40,6 @@ import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.clip
import androidx.compose.ui.graphics.vector.ImageVector
import androidx.compose.ui.input.nestedscroll.nestedScroll
import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.res.vectorResource
Expand Down Expand Up @@ -69,13 +70,14 @@ fun SettingsScreen(
checkUpdate: () -> Unit,
viewModel: SettingsViewModel = hiltViewModel()
) {
val context = LocalContext.current
val pinnedScrollBehavior = TopAppBarDefaults.pinnedScrollBehavior()
topBar {
TopBar(pinnedScrollBehavior,)
}
AnimatedVisibility(
viewModel.settingState != null
visible = viewModel.settingState != null,
enter = fadeIn(),
exit = fadeOut()
) {
val settingState = viewModel.settingState!!
Column(
Expand Down

0 comments on commit 00c1d62

Please sign in to comment.