Skip to content

Commit

Permalink
Merge pull request #111 from dmzz-yyhyy/optimization
Browse files Browse the repository at this point in the history
大规模的细节优化
  • Loading branch information
dmzz-yyhyy authored Sep 17, 2024
2 parents 6b530a3 + 159b752 commit c80719e
Show file tree
Hide file tree
Showing 28 changed files with 904 additions and 313 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/marge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
keyPassword: ${{ secrets.KEY_PASSWORD }}
env:
BUILD_TOOLS_VERSION: "34.0.0"
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
with:
name: LightNovelReader-${{steps.android_version.outputs.VERSION_NAME}}-${{steps.android_version.outputs.VERSION_CODE}}-release
path: ${{steps.sign_app.outputs.signedReleaseFile}}
2 changes: 1 addition & 1 deletion .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
keyPassword: ${{ secrets.KEY_PASSWORD }}
env:
BUILD_TOOLS_VERSION: "34.0.0"
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
with:
name: LightNovelReader-${{steps.android_version.outputs.VERSION_CODE}}-debug
path: ${{steps.sign_app.outputs.signedReleaseFile}}
31 changes: 31 additions & 0 deletions .idea/inspectionProfiles/Project_Default.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 11 additions & 11 deletions 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 = 4_04_023
versionCode = 4_04_024
versionName = "0.4.4"

testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
Expand Down Expand Up @@ -77,24 +77,24 @@ android {

dependencies {
// desugaring support
coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:2.1.1")
coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:2.1.2")
// android lib
implementation("androidx.core:core-ktx:1.13.1")
implementation ("androidx.core:core-splashscreen:1.0.1")
implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.8.4")
implementation("androidx.lifecycle:lifecycle-runtime-compose-android:2.8.4")
implementation("androidx.lifecycle:lifecycle-viewmodel-compose:2.8.4")
implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.8.5")
implementation("androidx.lifecycle:lifecycle-runtime-compose-android:2.8.5")
implementation("androidx.lifecycle:lifecycle-viewmodel-compose:2.8.5")
// compose
implementation("androidx.activity:activity-compose:1.9.1")
implementation("androidx.compose.animation:animation-graphics-android:1.6.8")
implementation(platform("androidx.compose:compose-bom:2024.08.00"))
implementation("androidx.activity:activity-compose:1.9.2")
implementation("androidx.compose.animation:animation-graphics-android:1.7.1")
implementation(platform("androidx.compose:compose-bom:2024.09.01"))
implementation("androidx.compose.ui:ui")
implementation("androidx.compose.ui:ui-graphics")
implementation("androidx.compose.ui:ui-tooling-preview")
implementation("androidx.compose.material3:material3:1.3.0-rc01")
implementation("androidx.compose.material3:material3:1.3.0")
debugImplementation("androidx.compose.ui:ui-tooling")
debugImplementation("androidx.compose.ui:ui-test-manifest")
androidTestImplementation(platform("androidx.compose:compose-bom:2024.08.00"))
androidTestImplementation(platform("androidx.compose:compose-bom:2024.09.01"))
androidTestImplementation("androidx.compose.ui:ui-test-junit4")
// junit
testImplementation("junit:junit:4.13.2")
Expand All @@ -111,7 +111,7 @@ dependencies {
implementation("androidx.hilt:hilt-work:$androidXHilt")
implementation("androidx.hilt:hilt-navigation-compose:$androidXHilt")
// navigation
val navVersion = "2.7.7"
val navVersion = "2.8.0"
implementation("androidx.navigation:navigation-fragment-ktx:$navVersion")
implementation("androidx.navigation:navigation-ui-ktx:$navVersion")
implementation("androidx.navigation:navigation-dynamic-features-fragment:$navVersion")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,17 @@ sealed class UserDataPath(
data object IsUsingFlipPage : UserDataPath("isUsingFlipPage", Reader)
data object IsUsingClickFlipPage : UserDataPath("isUsingClickFlipPage", Reader)
data object IsUsingVolumeKeyFlip : UserDataPath("isUsingVolumeKeyFlip", Reader)
data object IsUsingFlipAnime : UserDataPath("isUsingFlipAnime", Reader)
data object FastChapterChange : UserDataPath("fastChapterChange", Reader)
data object EnableBatteryIndicator : UserDataPath("enableBatteryIndicator", Reader)
data object EnableTimeIndicator : UserDataPath("enableTimeIndicator", Reader)
data object EnableChapterTitleIndicator : UserDataPath("enableChapterTitleIndicator", Reader)
data object EnableReadingChapterProgressIndicator : UserDataPath("enableReadingChapterProgressIndicator", Reader)
data object AutoPadding : UserDataPath("autoPadding", Reader)
data object TopPadding : UserDataPath("topPadding", Reader)
data object BottomPadding : UserDataPath("bottomPadding", Reader)
data object LeftPadding : UserDataPath("leftPadding", Reader)
data object RightPadding : UserDataPath("rightPadding", Reader)
}
data object ReadingBooks : UserDataPath("reading_books")
data object Search: UserDataPath("search") {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ fun BookScreen(
val scrollBehavior = TopAppBarDefaults.pinnedScrollBehavior()
val navController = rememberNavController()
var topBar : @Composable (TopAppBarScrollBehavior) -> Unit by remember { mutableStateOf(@Composable {}) }
var bottomBar : @Composable () -> Unit by remember { mutableStateOf(@Composable {}) }
var lastIncomingChapterId by remember { mutableStateOf(-1) }
Scaffold(
modifier = Modifier.nestedScroll(scrollBehavior.nestedScrollConnection),
Expand All @@ -41,7 +40,6 @@ fun BookScreen(
topBar(scrollBehavior)
}
},
bottomBar = bottomBar
) { paddingValues ->
NavHost(
modifier = Modifier.padding(paddingValues),
Expand All @@ -67,7 +65,6 @@ fun BookScreen(
cacheBook = cacheBook,
requestAddBookToBookshelf = requestAddBookToBookshelf,
)
bottomBar = {}
}
composable(
route = Screen.Book.Content.route,
Expand All @@ -81,9 +78,6 @@ fun BookScreen(
topBar = { newTopBar ->
topBar = newTopBar
},
bottomBar = { newBottomBar ->
bottomBar = newBottomBar
},
bookId = bookId,
chapterId = bundle.getInt("chapterId")
)
Expand Down
Loading

0 comments on commit c80719e

Please sign in to comment.