Skip to content

Commit 3f7a647

Browse files
committed
fix merge err
1 parent 3a7f28b commit 3f7a647

14 files changed

Lines changed: 31 additions & 78 deletions

File tree

README_TW.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<a><img alt="Jetpack Compose" src="https://img.shields.io/badge/Jetpack%20Compose-4285F4?logo=jetpackcompose&logoColor=white&style=for-the-badge"></a>
88
<a href="http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=P__gXIArh5UDBsEq7ttd4WhIYnNh3y1t&authKey=GAsRKEZ%2FwHpzRv19hNJsDnknOc86lYzNIHMPy2Jxt3S3U8f90qestOd760IAj%2F3l&noverify=0&group_code=867785526"><img alt="QQ Group" src="https://img.shields.io/badge/QQ讨论群-867785526-brightgreen.svg?logoColor=white&style=for-the-badge"></a>
99
<a href="https://discord.gg/pnf4ABmDJt"><img alt="Discord" src="https://img.shields.io/badge/Discord-JOIN-4285F4.svg?logo=discord&logoColor=white&style=for-the-badge"></a>
10-
<a href="https://t.me/lightnoble"><img alt="Discord" src="https://img.shields.io/badge/Telegram-JOIN-188FCA.svg?logo=telegram&logoColor=white&style=for-the-badge"></a>
10+
<a href="https://t.me/lightnoble"><img alt="Telegram" src="https://img.shields.io/badge/Telegram-JOIN-188FCA.svg?logo=telegram&logoColor=white&style=for-the-badge"></a>
1111
<a href="https://f-droid.org/packages/indi.dmzz_yyhyy.lightnovelreader/"><img alt="F-droid" src="https://img.shields.io/f-droid/v/indi.dmzz_yyhyy.lightnovelreader?style=for-the-badge&logo=fdroid&logoColor=white"></a>
1212
<p>輕小說閱讀軟體,使用 Jetpack Compose 框架開發</p>
1313
<img src="assets/header.png" alt="drawing" width="80%"/>
@@ -30,21 +30,21 @@ LightNovelReader <sup>*重構版*</sup> 是一款開源的輕小說閱讀軟體
3030

3131
## 外掛程式開發與自訂資料來源
3232

33-
您可以為LightNovelReader新增自訂的資料來源與插件
33+
您可以為LightNovelReader新增自訂的資料來源與外掛
3434

3535
以下為相關資源鏈接
3636
- [範例外掛程式](https://github.com/dmzz-yyhyy/LightNovelReaderPlguin-Template)
37-
- [開髮指南](https://lnr.nariko.org/plugin-dev/)
37+
- [開發指南](https://lnr.nariko.org/plugin-dev/)
3838
- [LNR Api KDoc](https://api-doc.lnr.nariko.org/)
3939

4040
歡迎各位開發者進行開發!
4141

4242
## 下載
4343

44-
[GitHub Releases](https://github.com/dmzz-yyhyy/LightNovelReader/releases/latest) 下載最新發布版。要體驗最新的功能與錯誤修復,請從 [Actions](https://github.com/dmzz-yyhyy/LightNovelReader/actions) 下載最新建置
44+
[GitHub Releases](https://github.com/dmzz-yyhyy/LightNovelReader/releases/latest) 下載最新發布版。要體驗最新的功能與錯誤修復,請從 [Actions](https://github.com/dmzz-yyhyy/LightNovelReader/actions) 下載最新Alpha開發版
4545

4646
[<img src="https://f-droid.org/badge/get-it-on-zh-tw.png"
47-
alt="取得於 F-Droid 立即下載"
47+
alt="立即在F-droid下載"
4848
height="80">](https://f-droid.org/packages/indi.dmzz_yyhyy.lightnovelreader)
4949

5050
## 支援

api/src/main/kotlin/io/nightfish/lightnovelreader/api/userdata/UserDataPath.kt

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -133,20 +133,9 @@ sealed class UserDataPath(
133133
data object DarkMode : UserDataPath("dark_mode", Display)
134134
/** 动态颜色设置 @since Api 2 */
135135
data object DynamicColors : UserDataPath("dynamic_color", Display)
136-
<<<<<<< HEAD
137-
<<<<<<< HEAD
138136
/** 启用 Material 3 Expressive @since Api 2 */
139-
=======
140-
data object enableCostumeThemeScheme : UserDataPath("enable_costume_theme_scheme", Display)
141-
data object CostumeThemeSurface : UserDataPath("costume_theme_surface", Display)
142-
data object CostumeThemeBackground : UserDataPath("costume_theme_background", Display)
143-
<<<<<<< HEAD
144-
>>>>>>> 5ea137dc (user costume color)
145-
=======
146-
data object CostumeThemePrimary : UserDataPath("costume_theme_primary", Display)
147-
>>>>>>> 59a396c7 (add primary color)
148-
=======
149-
// costume theme scheme
137+
data object EnableM3E : UserDataPath("enable_m3_expressive", Display)
138+
/* 自定義調色盤 */
150139
data object EnableCostumeThemeScheme : UserDataPath("enable_costume_theme_scheme", Display)
151140
data object CostumeThemeSchemePrimary : UserDataPath("costume_theme_scheme_primary", Display)
152141
data object CostumeThemeSchemeOnPrimary : UserDataPath("costume_theme_scheme_on_primary", Display)
@@ -166,9 +155,6 @@ sealed class UserDataPath(
166155
data object CostumeThemeSchemeOnSurface : UserDataPath("costume_theme_scheme_on_surface", Display)
167156
data object CostumeThemeSchemeError : UserDataPath("costume_theme_scheme_error", Display)
168157
data object CostumeThemeSchemeOnError : UserDataPath("costume_theme_scheme_on_error", Display)
169-
//
170-
>>>>>>> d10c874c (自定意顏色移至CostumeThemeSchemeScreen (獨立設定畫面))
171-
data object EnableM3E : UserDataPath("enable_m3_expressive", Display)
172158
/** 应用语言设置 @since Api 2 */
173159
data object AppLocale : UserDataPath("app_locale", Display)
174160
/** 浅色主题名称 @since Api 2 */

app/build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ android {
2424
minSdk = 24
2525
targetSdk = 36
2626
// 版本号为x.y.z则versionCode为x*1000000+y*10000+z*1000+debug版本号(开发需要时迭代, 三位数)
27-
versionCode = 1_02_01_003
27+
versionCode = 1_02_01_004
2828
versionName = "1.2.1"
2929

3030
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
@@ -223,4 +223,4 @@ tasks.register("printVersionCode") {
223223
doFirst {
224224
println(android.defaultConfig.versionCode)
225225
}
226-
}
226+
}

app/src/main/kotlin/indi/dmzz_yyhyy/lightnovelreader/data/work/ExportBookToEPUBWork.kt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,7 @@ class ExportBookToEPUBWork @AssistedInject constructor(
5151
) : CoroutineWorker(appContext, workerParams) {
5252
companion object {
5353
fun ofId(id: String): String = "export_to_epub:$id"
54-
<<<<<<< HEAD
5554
private const val TAG = "ExportEPUB"
56-
=======
57-
>>>>>>> 5ea137dc (user costume color)
5855
}
5956

6057
private val notificationManager = appContext.getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager

app/src/main/kotlin/indi/dmzz_yyhyy/lightnovelreader/ui/downloadmanager/DownloadManagerViewModel.kt

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,8 @@
11
package indi.dmzz_yyhyy.lightnovelreader.ui.downloadmanager
22

3-
<<<<<<< HEAD
43
import androidx.compose.runtime.getValue
54
import androidx.compose.runtime.mutableStateOf
65
import androidx.compose.runtime.setValue
7-
=======
8-
import androidx.compose.runtime.mutableStateMapOf
9-
import androidx.compose.runtime.snapshotFlow
10-
>>>>>>> 5ea137dc (user costume color)
116
import androidx.lifecycle.ViewModel
127
import androidx.lifecycle.viewModelScope
138
import androidx.work.WorkManager
@@ -32,7 +27,6 @@ class DownloadManagerViewModel @Inject constructor(
3227
val workManager: WorkManager
3328
) : ViewModel() {
3429
val downloadItemIdList get() = downloadProgressRepository.downloadItemIdList
35-
<<<<<<< HEAD
3630
var bookInformationMap: Map<String, BookInformation> by mutableStateOf(emptyMap())
3731
private set
3832
private val loadingJobs = mutableMapOf<String, Job>()
@@ -46,23 +40,6 @@ class DownloadManagerViewModel @Inject constructor(
4640
bookRepository.getBookInformationFlow(bookId).collect { bookInformation ->
4741
withContext(Dispatchers.Main) {
4842
bookInformationMap = bookInformationMap + (bookId to bookInformation)
49-
=======
50-
private val _bookInformationMap = mutableStateMapOf<String, BookInformation>()
51-
val bookInformationMap: Map<String, BookInformation> = _bookInformationMap
52-
53-
init {
54-
viewModelScope.launch(Dispatchers.IO) {
55-
snapshotFlow {
56-
downloadProgressRepository.downloadItemIdList
57-
}.collect { downloadItems ->
58-
downloadItems.forEach { downloadItem ->
59-
if (_bookInformationMap.containsKey(downloadItem.bookId))
60-
return@forEach
61-
viewModelScope.launch(Dispatchers.IO) {
62-
bookRepository.getBookInformationFlow(downloadItem.bookId).collect {
63-
_bookInformationMap[it.id] = it
64-
}
65-
>>>>>>> 5ea137dc (user costume color)
6643
}
6744
}
6845
} finally {
@@ -83,4 +60,4 @@ class DownloadManagerViewModel @Inject constructor(
8360
downloadProgressRepository.removeExportItem(item)
8461
}
8562
fun onClickClearCompleted() = downloadProgressRepository.clearCompleted()
86-
}
63+
}

app/src/main/kotlin/indi/dmzz_yyhyy/lightnovelreader/ui/home/settings/pluginmanager/detail/PluginDetailNavigation.kt

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,6 @@ package indi.dmzz_yyhyy.lightnovelreader.ui.home.settings.pluginmanager.detail
22

33
import androidx.compose.runtime.collectAsState
44
import androidx.compose.runtime.getValue
5-
<<<<<<< HEAD
6-
=======
7-
import androidx.compose.runtime.mutableStateMapOf
8-
>>>>>>> 5ea137dc (user costume color)
95
import androidx.compose.runtime.mutableStateOf
106
import androidx.compose.runtime.remember
117
import androidx.compose.runtime.setValue
@@ -16,10 +12,6 @@ import androidx.navigation.compose.composable
1612
import androidx.navigation.toRoute
1713
import indi.dmzz_yyhyy.lightnovelreader.ui.home.settings.pluginmanager.PluginManagerViewModel
1814
import indi.dmzz_yyhyy.lightnovelreader.ui.home.settings.pluginmanager.PluginSignatureDialog
19-
<<<<<<< HEAD
20-
=======
21-
import indi.dmzz_yyhyy.lightnovelreader.ui.navigation.Route
22-
>>>>>>> 5ea137dc (user costume color)
2315
import indi.dmzz_yyhyy.lightnovelreader.utils.popBackStackIfResumed
2416
import io.nightfish.lightnovelreader.api.Route
2517
import io.nightfish.lightnovelreader.api.ui.LocalNavController

app/src/main/kotlin/indi/dmzz_yyhyy/lightnovelreader/ui/home/settings/theme/ThemeNavigation.kt

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,16 @@
11
package indi.dmzz_yyhyy.lightnovelreader.ui.home.settings.theme
22

3-
import androidx.compose.ui.graphics.Color
43
import androidx.compose.ui.graphics.Color
54
import androidx.hilt.lifecycle.viewmodel.compose.hiltViewModel
65
import androidx.navigation.NavController
76
import androidx.navigation.NavGraphBuilder
87
import androidx.navigation.compose.composable
98
import indi.dmzz_yyhyy.lightnovelreader.theme.DEFAULT_COLOR_PRESETS
10-
import indi.dmzz_yyhyy.lightnovelreader.theme.DEFAULT_COLOR_PRESETS
119
import indi.dmzz_yyhyy.lightnovelreader.ui.LocalAppTheme
1210
import indi.dmzz_yyhyy.lightnovelreader.ui.book.reader.ColorPickerDialogViewModel
13-
import indi.dmzz_yyhyy.lightnovelreader.ui.book.reader.ColorPickerDialogViewModel
1411
import indi.dmzz_yyhyy.lightnovelreader.ui.book.reader.navigateToColorPickerDialog
1512
import indi.dmzz_yyhyy.lightnovelreader.ui.book.reader.navigateToCostumeColorPickerDialog
1613
import io.nightfish.lightnovelreader.api.Route
17-
=======
18-
import indi.dmzz_yyhyy.lightnovelreader.ui.book.reader.navigateToCostumeColorPickerDialog
19-
import indi.dmzz_yyhyy.lightnovelreader.ui.navigation.Route
20-
>>>>>>> d10c874c (自定意顏色移至CostumeThemeSchemeScreen (獨立設定畫面))
2114
import indi.dmzz_yyhyy.lightnovelreader.utils.popBackStackIfResumed
2215
import io.nightfish.lightnovelreader.api.ui.LocalNavController
2316
import io.nightfish.lightnovelreader.api.userdata.UserDataPath
@@ -52,13 +45,13 @@ fun NavGraphBuilder.settingsThemeDestination() {
5245
},
5346
)
5447
}
55-
48+
5649
composable<Route.Main.Settings.Theme.CostumeThemeScheme> {
5750
val navController = LocalNavController.current
5851
val viewModel = hiltViewModel<ThemeViewModel>()
5952
val readerSettingState = viewModel.settingState
6053
val isDark = LocalAppTheme.current.isDark
61-
54+
6255
CostumeThemeSchemeScreen(
6356
settingState = readerSettingState,
6457
onClickBack = navController::popBackStackIfResumed,

app/src/main/kotlin/indi/dmzz_yyhyy/lightnovelreader/ui/home/settings/theme/ThemeScreen.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -275,8 +275,8 @@ fun ThemeSettingsList(
275275
SettingsSwitchEntry(
276276
modifier = Modifier.background(colorScheme.surfaceContainer),
277277
painter = painterResource(R.drawable.palette_24px),
278-
title = "啟用覆蓋主題配色",
279-
description = "覆蓋主題原有顏色,字定義配色",
278+
title = stringResource(R.string.settings_theme_enable_costume_color_scheme),
279+
description = stringResource(R.string.settings_theme_enable_costume_color_scheme_desc),
280280
checked = settingState.enableCostumeThemeScheme,
281281
booleanUserData = settingState.enableCostumeThemeSchemeUserData
282282
)
@@ -304,8 +304,8 @@ fun ThemeSettingsList(
304304
SettingsClickableEntry(
305305
modifier = Modifier.background(colorScheme.surfaceContainer),
306306
painter = painterResource(R.drawable.palette_24px),
307-
title = "覆蓋主題配色設定",
308-
description = "開啟主題配色設定頁面調整所有配色",
307+
title = stringResource(R.string.settings_theme_open_costume_color_scheme),
308+
description = stringResource(R.string.settings_theme_open_costume_color_scheme_desc),
309309
onClick = onClickOpenCostumeThemeScheme
310310
)
311311
}

app/src/main/kotlin/indi/dmzz_yyhyy/lightnovelreader/utils/Extentions.kt

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,7 @@ import androidx.navigation.NavController
3333
import androidx.navigation.NavDestination
3434
import androidx.navigation.NavDestination.Companion.hierarchy
3535
import indi.dmzz_yyhyy.lightnovelreader.ui.home.reading.stats.TimeBarItem
36-
<<<<<<< HEAD
3736
import io.nightfish.lightnovelreader.api.Route
38-
=======
39-
import indi.dmzz_yyhyy.lightnovelreader.ui.navigation.Route
40-
>>>>>>> 5ea137dc (user costume color)
4137
import kotlinx.coroutines.Dispatchers
4238
import kotlinx.coroutines.flow.Flow
4339
import kotlinx.coroutines.flow.flow
@@ -217,4 +213,4 @@ fun List<TimeBarItem>.normalize(): List<Pair<TimeBarItem, Float>> {
217213
return map {
218214
it to (it.timeSeconds.toFloat() / total).coerceAtLeast(0.01f)
219215
}
220-
}
216+
}

app/src/main/res/values-zh-rTW/strings.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,12 @@
169169
<string name="settings_theme_dynamic_colors_desc">從系統主題套用動態配色</string>
170170
<string name="settings_theme_m3e">Material 3 Expressive</string>
171171
<string name="settings_theme_m3e_description">啟用 Material 3 Expressive 設計。此功能屬於實驗性內容,仍處於測試階段</string>
172+
173+
<string name="settings_theme_enable_costume_color_scheme">啟用覆蓋主題配色</string>
174+
<string name="settings_theme_enable_costume_color_scheme_desc">覆蓋主題原有顏色,自定義配色</string>
175+
<string name="settings_theme_open_costume_color_scheme">開啟覆蓋主題配色設定</string>
176+
<string name="settings_theme_open_costume_color_scheme_desc">開啟主題配色設定頁面以調整配色</string>
177+
172178
<string name="settings_formats">格式</string>
173179
<string name="settings_formats_desc">設定日期或文字格式</string>
174180
<string name="date_time_formats_settings">日期和時間</string>

0 commit comments

Comments
 (0)