Compare commits
45 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| ad28c9a482 | |||
| 8404fb5738 | |||
| 75c057e83e | |||
| d44e2df55e | |||
| aebc15d4e4 | |||
| c835140fe8 | |||
| f35031db7e | |||
| ca81f48c1c | |||
| 30dcc6801a | |||
| 46ba4ac182 | |||
| 2c6a57ab39 | |||
| 79a3aedf5c | |||
| 38fc1fe805 | |||
| 5daf5e82f4 | |||
| dacfb8a740 | |||
| fec9f1f10c | |||
| 293fb7597c | |||
| 0cf6a6ef2d | |||
| 4d44e093d5 | |||
| 2c75649a3c | |||
| 1ca599a550 | |||
| dc7cd5b3c8 | |||
| 67196fb7b6 | |||
| 9b8e81a063 | |||
| 91b7f0c1d0 | |||
| 32bcf49b97 | |||
| 6a9efe3a41 | |||
| 945d5ebf75 | |||
| d38b1d27d0 | |||
| 6ad618b494 | |||
| a63f7b4e62 | |||
| 6e57a62e2a | |||
| 100f16000e | |||
| 78c7facf6c | |||
| b210491db5 | |||
| ca944f3f38 | |||
| 2eca6dc707 | |||
| 90835256ff | |||
| 80351cd594 | |||
| 7cdfa68d77 | |||
| 3f74a6d33f | |||
| 27d8896937 | |||
| 7b92d06eee | |||
| cbfb433e55 | |||
| c3503dbd3c |
@@ -1 +0,0 @@
|
|||||||
ko_fi: inorichi
|
|
||||||
@@ -1,34 +0,0 @@
|
|||||||
**PLEASE READ THIS**
|
|
||||||
|
|
||||||
I acknowledge that:
|
|
||||||
|
|
||||||
- I have updated:
|
|
||||||
- To the latest version of the app (stable is v1.10.2)
|
|
||||||
- All extensions
|
|
||||||
- I have gone through the FAQ (https://tachiyomi.org/docs/faq/general) and troubleshooting guide (https://tachiyomi.org/docs/guides/troubleshooting/)
|
|
||||||
- If this is an issue with an extension, that I should be opening an issue in it's repository
|
|
||||||
- I have searched the existing issues and this is new ticket **NOT** a duplicate or related to another open or closed issue
|
|
||||||
- I will fill out the title and the information in this template
|
|
||||||
|
|
||||||
Note that the issue will be automatically closed if you do not fill out the title or requested information.
|
|
||||||
|
|
||||||
**DELETE THIS SECTION IF YOU HAVE READ AND ACKNOWLEDGED IT**
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## Device information
|
|
||||||
* Tachiyomi version: ?
|
|
||||||
* Android version: ?
|
|
||||||
* Device: ?
|
|
||||||
|
|
||||||
## Steps to reproduce
|
|
||||||
1. First step
|
|
||||||
2. Second step
|
|
||||||
|
|
||||||
## Issue/Request
|
|
||||||
?
|
|
||||||
|
|
||||||
## Other details
|
|
||||||
Additional details and attachments.
|
|
||||||
|
|
||||||
If you're experiencing crashes, share the crash logs from More → Settings → Advanced → Dump crash logs.
|
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
blank_issues_enabled: false
|
blank_issues_enabled: false
|
||||||
contact_links:
|
contact_links:
|
||||||
- name: 🖥️ Tachiyomi website
|
- name: 🖥️ Mihon website
|
||||||
url: https://tachiyomi.org/
|
url: https://mihon.app/
|
||||||
about: Guides, troubleshooting, and answers to common questions
|
about: Guides, troubleshooting, and answers to common questions
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
name: 🐞 Issue report
|
name: 🐞 Issue report
|
||||||
description: Report an issue in Tachiyomi
|
description: Report an issue in TachiyomiSY
|
||||||
labels: [Bug]
|
labels: [Bug]
|
||||||
body:
|
body:
|
||||||
|
|
||||||
@@ -48,12 +48,12 @@ body:
|
|||||||
You can paste the crash logs in plain text or upload it as an attachment.
|
You can paste the crash logs in plain text or upload it as an attachment.
|
||||||
|
|
||||||
- type: input
|
- type: input
|
||||||
id: tachiyomi-version
|
id: tachiyomisy-version
|
||||||
attributes:
|
attributes:
|
||||||
label: Tachiyomi version
|
label: TachiyomiSY version
|
||||||
description: You can find your Tachiyomi version in **More → About**.
|
description: You can find your TachiyomiSY version in **More → About**.
|
||||||
placeholder: |
|
placeholder: |
|
||||||
Example: "1.10.2"
|
Example: "1.10.3"
|
||||||
validations:
|
validations:
|
||||||
required: true
|
required: true
|
||||||
|
|
||||||
@@ -94,11 +94,9 @@ body:
|
|||||||
required: true
|
required: true
|
||||||
- label: I have written a short but informative title.
|
- label: I have written a short but informative title.
|
||||||
required: true
|
required: true
|
||||||
- label: If this is an issue with an extension, I should be opening an issue in the extension's repository.
|
- label: I have gone through the [FAQ](https://mihon.app/docs/faq/general) and [troubleshooting guide](https:/mihon.app/docs/guides/troubleshooting/).
|
||||||
required: true
|
required: true
|
||||||
- label: I have gone through the [FAQ](https://tachiyomi.org/docs/faq/general) and [troubleshooting guide](https://tachiyomi.org/docs/guides/troubleshooting/).
|
- label: I have updated the app to version **[1.10.3](https://github.com/jobobby04/tachiyomisy/releases/latest)**.
|
||||||
required: true
|
|
||||||
- label: I have updated the app to version **[1.10.2](https://github.com/jobobby04/tachiyomisy/releases/latest)**.
|
|
||||||
required: true
|
required: true
|
||||||
- label: I have updated all installed extensions.
|
- label: I have updated all installed extensions.
|
||||||
required: true
|
required: true
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
name: ⭐ Feature request
|
name: ⭐ Feature request
|
||||||
description: Suggest a feature to improve Tachiyomi
|
description: Suggest a feature to improve TachiyomiSY
|
||||||
labels: [Feature request]
|
labels: [Feature request]
|
||||||
body:
|
body:
|
||||||
|
|
||||||
@@ -7,7 +7,7 @@ body:
|
|||||||
id: feature-description
|
id: feature-description
|
||||||
attributes:
|
attributes:
|
||||||
label: Describe your suggested feature
|
label: Describe your suggested feature
|
||||||
description: How can Tachiyomi be improved?
|
description: How can TachiyomiSY be improved?
|
||||||
placeholder: |
|
placeholder: |
|
||||||
Example:
|
Example:
|
||||||
"It should work like this..."
|
"It should work like this..."
|
||||||
@@ -31,9 +31,7 @@ body:
|
|||||||
required: true
|
required: true
|
||||||
- label: I have written a short but informative title.
|
- label: I have written a short but informative title.
|
||||||
required: true
|
required: true
|
||||||
- label: If this is an issue with an official extension, I should be opening an issue in the extension's repository.
|
- label: I have updated the app to version **[1.10.3](https://github.com/jobobby04/tachiyomisy/releases/latest)**.
|
||||||
required: true
|
|
||||||
- label: I have updated the app to version **[1.10.2](https://github.com/jobobby04/tachiyomisy/releases/latest)**.
|
|
||||||
required: true
|
required: true
|
||||||
- label: I will fill out all of the requested information in this form.
|
- label: I will fill out all of the requested information in this form.
|
||||||
required: true
|
required: true
|
||||||
|
|||||||
@@ -94,6 +94,8 @@ jobs:
|
|||||||
| armeabi-v7a | ${{ env.APK_ARMEABI_V7A_SHA }} |
|
| armeabi-v7a | ${{ env.APK_ARMEABI_V7A_SHA }} |
|
||||||
| x86 | ${{ env.APK_X86_SHA }} |
|
| x86 | ${{ env.APK_X86_SHA }} |
|
||||||
| x86_64 | ${{ env.APK_X86_64_SHA }} |
|
| x86_64 | ${{ env.APK_X86_64_SHA }} |
|
||||||
|
|
||||||
|
## If you are unsure which version to choose then go with TachiyomiSY.apk
|
||||||
files: |
|
files: |
|
||||||
TachiyomiSY.apk
|
TachiyomiSY.apk
|
||||||
TachiyomiSY-arm64-v8a.apk
|
TachiyomiSY-arm64-v8a.apk
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ jobs:
|
|||||||
"regex": ".*(?:fail(?:ed|ure|s)?|can\\s*(?:no|')?t|(?:not|un).*able|(?<!n[o']?t )blocked by|error) (?:to )?(?:get past|by ?pass|penetrate)?.*cloud ?fl?are.*",
|
"regex": ".*(?:fail(?:ed|ure|s)?|can\\s*(?:no|')?t|(?:not|un).*able|(?<!n[o']?t )blocked by|error) (?:to )?(?:get past|by ?pass|penetrate)?.*cloud ?fl?are.*",
|
||||||
"ignoreCase": true,
|
"ignoreCase": true,
|
||||||
"labels": ["Cloudflare protected"],
|
"labels": ["Cloudflare protected"],
|
||||||
"message": "Refer to the **Solving Cloudflare issues** section at https://tachiyomi.org/docs/guides/troubleshooting/#cloudflare. If it doesn't work, migrate to other sources or wait until they lower their protection."
|
"message": "Refer to the **Solving Cloudflare issues** section at https://mihon.app/docs/guides/troubleshooting/#cloudflare. If it doesn't work, migrate to other sources or wait until they lower their protection."
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
auto-close-ignore-label: do-not-autoclose
|
auto-close-ignore-label: do-not-autoclose
|
||||||
|
|||||||
@@ -115,5 +115,5 @@ See [CODE_OF_CONDUCT.md](./CODE_OF_CONDUCT.md).
|
|||||||
|
|
||||||
## FAQ
|
## FAQ
|
||||||
|
|
||||||
[See our website.](https://tachiyomi.org/)
|
[See our website.](https://mihon.app/)
|
||||||
You can also reach out to us on [Discord](https://discord.gg/mihon).
|
You can also reach out to us on [Discord](https://discord.gg/mihon).
|
||||||
+12
-13
@@ -26,8 +26,8 @@ android {
|
|||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId = "eu.kanade.tachiyomi.sy"
|
applicationId = "eu.kanade.tachiyomi.sy"
|
||||||
|
|
||||||
versionCode = 62
|
versionCode = 63
|
||||||
versionName = "1.10.2"
|
versionName = "1.10.3"
|
||||||
|
|
||||||
buildConfigField("String", "COMMIT_COUNT", "\"${getCommitCount()}\"")
|
buildConfigField("String", "COMMIT_COUNT", "\"${getCommitCount()}\"")
|
||||||
buildConfigField("String", "COMMIT_SHA", "\"${getGitSha()}\"")
|
buildConfigField("String", "COMMIT_SHA", "\"${getGitSha()}\"")
|
||||||
@@ -140,18 +140,18 @@ android {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation(project(":i18n"))
|
implementation(projects.i18n)
|
||||||
// SY -->
|
// SY -->
|
||||||
implementation(project(":i18n-sy"))
|
implementation(projects.i18nSy)
|
||||||
// SY <--
|
// SY <--
|
||||||
implementation(project(":core"))
|
implementation(projects.core.common)
|
||||||
implementation(project(":core-metadata"))
|
implementation(projects.coreMetadata)
|
||||||
implementation(project(":source-api"))
|
implementation(projects.sourceApi)
|
||||||
implementation(project(":source-local"))
|
implementation(projects.sourceLocal)
|
||||||
implementation(project(":data"))
|
implementation(projects.data)
|
||||||
implementation(project(":domain"))
|
implementation(projects.domain)
|
||||||
implementation(project(":presentation-core"))
|
implementation(projects.presentationCore)
|
||||||
implementation(project(":presentation-widget"))
|
implementation(projects.presentationWidget)
|
||||||
|
|
||||||
// Compose
|
// Compose
|
||||||
implementation(platform(compose.bom))
|
implementation(platform(compose.bom))
|
||||||
@@ -167,7 +167,6 @@ dependencies {
|
|||||||
implementation(compose.ui.util)
|
implementation(compose.ui.util)
|
||||||
implementation(compose.accompanist.webview)
|
implementation(compose.accompanist.webview)
|
||||||
implementation(compose.accompanist.systemuicontroller)
|
implementation(compose.accompanist.systemuicontroller)
|
||||||
lintChecks(compose.lintchecks)
|
|
||||||
|
|
||||||
implementation(androidx.paging.runtime)
|
implementation(androidx.paging.runtime)
|
||||||
implementation(androidx.paging.compose)
|
implementation(androidx.paging.compose)
|
||||||
|
|||||||
@@ -180,7 +180,7 @@
|
|||||||
<category android:name="android.intent.category.DEFAULT" />
|
<category android:name="android.intent.category.DEFAULT" />
|
||||||
<category android:name="android.intent.category.BROWSABLE" />
|
<category android:name="android.intent.category.BROWSABLE" />
|
||||||
|
|
||||||
<data android:scheme="tachiyomi" />
|
<data android:scheme="mihon" />
|
||||||
|
|
||||||
<data android:host="anilist-auth" />
|
<data android:host="anilist-auth" />
|
||||||
<data android:host="bangumi-auth" />
|
<data android:host="bangumi-auth" />
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package eu.kanade.core.preference
|
package eu.kanade.core.preference
|
||||||
|
|
||||||
import androidx.compose.ui.state.ToggleableState
|
import androidx.compose.ui.state.ToggleableState
|
||||||
import tachiyomi.core.preference.CheckboxState
|
import tachiyomi.core.common.preference.CheckboxState
|
||||||
|
|
||||||
fun <T> CheckboxState.TriState<T>.asToggleableState() = when (this) {
|
fun <T> CheckboxState.TriState<T>.asToggleableState() = when (this) {
|
||||||
is CheckboxState.TriState.Exclude -> ToggleableState.Indeterminate
|
is CheckboxState.TriState.Exclude -> ToggleableState.Indeterminate
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import androidx.compose.runtime.mutableStateOf
|
|||||||
import kotlinx.coroutines.CoroutineScope
|
import kotlinx.coroutines.CoroutineScope
|
||||||
import kotlinx.coroutines.flow.launchIn
|
import kotlinx.coroutines.flow.launchIn
|
||||||
import kotlinx.coroutines.flow.onEach
|
import kotlinx.coroutines.flow.onEach
|
||||||
import tachiyomi.core.preference.Preference
|
import tachiyomi.core.common.preference.Preference
|
||||||
|
|
||||||
class PreferenceMutableState<T>(
|
class PreferenceMutableState<T>(
|
||||||
private val preference: Preference<T>,
|
private val preference: Preference<T>,
|
||||||
|
|||||||
@@ -4,8 +4,8 @@ import android.content.Context
|
|||||||
import dev.icerock.moko.resources.StringResource
|
import dev.icerock.moko.resources.StringResource
|
||||||
import eu.kanade.tachiyomi.util.system.isPreviewBuildType
|
import eu.kanade.tachiyomi.util.system.isPreviewBuildType
|
||||||
import eu.kanade.tachiyomi.util.system.isReleaseBuildType
|
import eu.kanade.tachiyomi.util.system.isReleaseBuildType
|
||||||
import tachiyomi.core.preference.Preference
|
import tachiyomi.core.common.preference.Preference
|
||||||
import tachiyomi.core.preference.PreferenceStore
|
import tachiyomi.core.common.preference.PreferenceStore
|
||||||
import tachiyomi.i18n.MR
|
import tachiyomi.i18n.MR
|
||||||
|
|
||||||
class BasePreferences(
|
class BasePreferences(
|
||||||
|
|||||||
@@ -5,9 +5,9 @@ import eu.kanade.domain.base.BasePreferences.ExtensionInstaller
|
|||||||
import eu.kanade.tachiyomi.util.system.hasMiuiPackageInstaller
|
import eu.kanade.tachiyomi.util.system.hasMiuiPackageInstaller
|
||||||
import eu.kanade.tachiyomi.util.system.isShizukuInstalled
|
import eu.kanade.tachiyomi.util.system.isShizukuInstalled
|
||||||
import kotlinx.coroutines.CoroutineScope
|
import kotlinx.coroutines.CoroutineScope
|
||||||
import tachiyomi.core.preference.Preference
|
import tachiyomi.core.common.preference.Preference
|
||||||
import tachiyomi.core.preference.PreferenceStore
|
import tachiyomi.core.common.preference.PreferenceStore
|
||||||
import tachiyomi.core.preference.getEnum
|
import tachiyomi.core.common.preference.getEnum
|
||||||
|
|
||||||
class ExtensionInstallerPreference(
|
class ExtensionInstallerPreference(
|
||||||
private val context: Context,
|
private val context: Context,
|
||||||
|
|||||||
@@ -3,8 +3,8 @@ package eu.kanade.domain.chapter.interactor
|
|||||||
import eu.kanade.domain.download.interactor.DeleteDownload
|
import eu.kanade.domain.download.interactor.DeleteDownload
|
||||||
import exh.source.MERGED_SOURCE_ID
|
import exh.source.MERGED_SOURCE_ID
|
||||||
import logcat.LogPriority
|
import logcat.LogPriority
|
||||||
import tachiyomi.core.util.lang.withNonCancellableContext
|
import tachiyomi.core.common.util.lang.withNonCancellableContext
|
||||||
import tachiyomi.core.util.system.logcat
|
import tachiyomi.core.common.util.system.logcat
|
||||||
import tachiyomi.domain.chapter.interactor.GetMergedChaptersByMangaId
|
import tachiyomi.domain.chapter.interactor.GetMergedChaptersByMangaId
|
||||||
import tachiyomi.domain.chapter.model.Chapter
|
import tachiyomi.domain.chapter.model.Chapter
|
||||||
import tachiyomi.domain.chapter.model.ChapterUpdate
|
import tachiyomi.domain.chapter.model.ChapterUpdate
|
||||||
|
|||||||
@@ -171,7 +171,7 @@ class SyncChaptersWithSource(
|
|||||||
var updatedToAdd = newChapters.map { toAddItem ->
|
var updatedToAdd = newChapters.map { toAddItem ->
|
||||||
var chapter = toAddItem.copy(dateFetch = nowMillis + itemCount--)
|
var chapter = toAddItem.copy(dateFetch = nowMillis + itemCount--)
|
||||||
|
|
||||||
if (chapter.isRecognizedNumber.not() || chapter.chapterNumber !in deletedChapterNumbers) return@map chapter
|
if (!chapter.isRecognizedNumber || chapter.chapterNumber !in deletedChapterNumbers) return@map chapter
|
||||||
|
|
||||||
chapter = chapter.copy(
|
chapter = chapter.copy(
|
||||||
read = chapter.chapterNumber in deletedReadChapterNumbers,
|
read = chapter.chapterNumber in deletedReadChapterNumbers,
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package eu.kanade.domain.download.interactor
|
package eu.kanade.domain.download.interactor
|
||||||
|
|
||||||
import eu.kanade.tachiyomi.data.download.DownloadManager
|
import eu.kanade.tachiyomi.data.download.DownloadManager
|
||||||
import tachiyomi.core.util.lang.withNonCancellableContext
|
import tachiyomi.core.common.util.lang.withNonCancellableContext
|
||||||
import tachiyomi.domain.chapter.model.Chapter
|
import tachiyomi.domain.chapter.model.Chapter
|
||||||
import tachiyomi.domain.manga.model.Manga
|
import tachiyomi.domain.manga.model.Manga
|
||||||
import tachiyomi.domain.source.service.SourceManager
|
import tachiyomi.domain.source.service.SourceManager
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package eu.kanade.domain.extension.interactor
|
package eu.kanade.domain.extension.interactor
|
||||||
|
|
||||||
import eu.kanade.domain.source.service.SourcePreferences
|
import eu.kanade.domain.source.service.SourcePreferences
|
||||||
import tachiyomi.core.preference.plusAssign
|
import tachiyomi.core.common.preference.plusAssign
|
||||||
|
|
||||||
class CreateExtensionRepo(private val preferences: SourcePreferences) {
|
class CreateExtensionRepo(private val preferences: SourcePreferences) {
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package eu.kanade.domain.extension.interactor
|
package eu.kanade.domain.extension.interactor
|
||||||
|
|
||||||
import eu.kanade.domain.source.service.SourcePreferences
|
import eu.kanade.domain.source.service.SourcePreferences
|
||||||
import tachiyomi.core.preference.minusAssign
|
import tachiyomi.core.common.preference.minusAssign
|
||||||
|
|
||||||
class DeleteExtensionRepo(private val preferences: SourcePreferences) {
|
class DeleteExtensionRepo(private val preferences: SourcePreferences) {
|
||||||
|
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ class GetExtensionSources(
|
|||||||
ExtensionSourceItem(
|
ExtensionSourceItem(
|
||||||
source = source,
|
source = source,
|
||||||
enabled = source.isEnabled(),
|
enabled = source.isEnabled(),
|
||||||
labelAsName = isMultiSource && isMultiLangSingleSource.not(),
|
labelAsName = isMultiSource && !isMultiLangSingleSource,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,10 +22,10 @@ class GetExtensionsByType(
|
|||||||
extensionManager.availableExtensionsFlow,
|
extensionManager.availableExtensionsFlow,
|
||||||
) { _activeLanguages, _installed, _untrusted, _available ->
|
) { _activeLanguages, _installed, _untrusted, _available ->
|
||||||
val (updates, installed) = _installed
|
val (updates, installed) = _installed
|
||||||
.filter { (showNsfwSources || it.isNsfw.not()) }
|
.filter { (showNsfwSources || !it.isNsfw) }
|
||||||
.sortedWith(
|
.sortedWith(
|
||||||
compareBy<Extension.Installed> {
|
compareBy<Extension.Installed> {
|
||||||
it.isObsolete.not() /* SY --> */ && it.isRedundant.not() /* SY <-- */
|
!it.isObsolete /* SY --> */ && !it.isRedundant /* SY <-- */
|
||||||
}.thenBy(String.CASE_INSENSITIVE_ORDER) { it.name },
|
}.thenBy(String.CASE_INSENSITIVE_ORDER) { it.name },
|
||||||
)
|
)
|
||||||
.partition { it.hasUpdate }
|
.partition { it.hasUpdate }
|
||||||
@@ -37,7 +37,7 @@ class GetExtensionsByType(
|
|||||||
.filter { extension ->
|
.filter { extension ->
|
||||||
_installed.none { it.pkgName == extension.pkgName } &&
|
_installed.none { it.pkgName == extension.pkgName } &&
|
||||||
_untrusted.none { it.pkgName == extension.pkgName } &&
|
_untrusted.none { it.pkgName == extension.pkgName } &&
|
||||||
(showNsfwSources || extension.isNsfw.not())
|
(showNsfwSources || !extension.isNsfw)
|
||||||
}
|
}
|
||||||
.flatMap { ext ->
|
.flatMap { ext ->
|
||||||
if (ext.sources.isEmpty()) {
|
if (ext.sources.isEmpty()) {
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package eu.kanade.domain.extension.interactor
|
|||||||
import android.content.pm.PackageInfo
|
import android.content.pm.PackageInfo
|
||||||
import androidx.core.content.pm.PackageInfoCompat
|
import androidx.core.content.pm.PackageInfoCompat
|
||||||
import eu.kanade.domain.source.service.SourcePreferences
|
import eu.kanade.domain.source.service.SourcePreferences
|
||||||
import tachiyomi.core.preference.getAndSet
|
import tachiyomi.core.common.preference.getAndSet
|
||||||
|
|
||||||
class TrustExtension(
|
class TrustExtension(
|
||||||
private val preferences: SourcePreferences,
|
private val preferences: SourcePreferences,
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
package eu.kanade.domain.manga.interactor
|
package eu.kanade.domain.manga.interactor
|
||||||
|
|
||||||
import tachiyomi.core.preference.plusAssign
|
import tachiyomi.core.common.preference.plusAssign
|
||||||
import tachiyomi.domain.library.service.LibraryPreferences
|
import tachiyomi.domain.library.service.LibraryPreferences
|
||||||
|
|
||||||
class CreateSortTag(
|
class CreateSortTag(
|
||||||
|
|||||||
@@ -6,9 +6,9 @@ import eu.kanade.tachiyomi.source.model.SManga
|
|||||||
import eu.kanade.tachiyomi.ui.reader.setting.ReaderOrientation
|
import eu.kanade.tachiyomi.ui.reader.setting.ReaderOrientation
|
||||||
import eu.kanade.tachiyomi.ui.reader.setting.ReadingMode
|
import eu.kanade.tachiyomi.ui.reader.setting.ReadingMode
|
||||||
import eu.kanade.tachiyomi.util.storage.CbzCrypto
|
import eu.kanade.tachiyomi.util.storage.CbzCrypto
|
||||||
|
import tachiyomi.core.common.preference.TriState
|
||||||
import tachiyomi.core.metadata.comicinfo.ComicInfo
|
import tachiyomi.core.metadata.comicinfo.ComicInfo
|
||||||
import tachiyomi.core.metadata.comicinfo.ComicInfoPublishingStatus
|
import tachiyomi.core.metadata.comicinfo.ComicInfoPublishingStatus
|
||||||
import tachiyomi.core.preference.TriState
|
|
||||||
import tachiyomi.domain.chapter.model.Chapter
|
import tachiyomi.domain.chapter.model.Chapter
|
||||||
import tachiyomi.domain.manga.model.Manga
|
import tachiyomi.domain.manga.model.Manga
|
||||||
import uy.kohesive.injekt.Injekt
|
import uy.kohesive.injekt.Injekt
|
||||||
@@ -55,6 +55,7 @@ fun Manga.copyFrom(other: SManga): Manga {
|
|||||||
// SY -->
|
// SY -->
|
||||||
val author = other.author ?: ogAuthor
|
val author = other.author ?: ogAuthor
|
||||||
val artist = other.artist ?: ogArtist
|
val artist = other.artist ?: ogArtist
|
||||||
|
val thumbnailUrl = other.thumbnail_url ?: ogThumbnailUrl
|
||||||
val description = other.description ?: ogDescription
|
val description = other.description ?: ogDescription
|
||||||
val genres = if (other.genre != null) {
|
val genres = if (other.genre != null) {
|
||||||
other.getGenres()
|
other.getGenres()
|
||||||
@@ -62,15 +63,14 @@ fun Manga.copyFrom(other: SManga): Manga {
|
|||||||
ogGenre
|
ogGenre
|
||||||
}
|
}
|
||||||
// SY <--
|
// SY <--
|
||||||
val thumbnailUrl = other.thumbnail_url ?: thumbnailUrl
|
|
||||||
return this.copy(
|
return this.copy(
|
||||||
// SY -->
|
// SY -->
|
||||||
ogAuthor = author,
|
ogAuthor = author,
|
||||||
ogArtist = artist,
|
ogArtist = artist,
|
||||||
|
ogThumbnailUrl = thumbnailUrl,
|
||||||
ogDescription = description,
|
ogDescription = description,
|
||||||
ogGenre = genres,
|
ogGenre = genres,
|
||||||
// SY <--
|
// SY <--
|
||||||
thumbnailUrl = thumbnailUrl,
|
|
||||||
// SY -->
|
// SY -->
|
||||||
ogStatus = other.status.toLong(),
|
ogStatus = other.status.toLong(),
|
||||||
// SY <--
|
// SY <--
|
||||||
@@ -86,11 +86,11 @@ fun SManga.toDomainManga(sourceId: Long): Manga {
|
|||||||
ogTitle = title,
|
ogTitle = title,
|
||||||
ogArtist = artist,
|
ogArtist = artist,
|
||||||
ogAuthor = author,
|
ogAuthor = author,
|
||||||
|
ogThumbnailUrl = thumbnail_url,
|
||||||
ogDescription = description,
|
ogDescription = description,
|
||||||
ogGenre = getGenres(),
|
ogGenre = getGenres(),
|
||||||
ogStatus = status.toLong(),
|
ogStatus = status.toLong(),
|
||||||
// SY <--
|
// SY <--
|
||||||
thumbnailUrl = thumbnail_url,
|
|
||||||
updateStrategy = update_strategy,
|
updateStrategy = update_strategy,
|
||||||
initialized = initialized,
|
initialized = initialized,
|
||||||
source = sourceId,
|
source = sourceId,
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package eu.kanade.domain.source.interactor
|
package eu.kanade.domain.source.interactor
|
||||||
|
|
||||||
import eu.kanade.domain.source.service.SourcePreferences
|
import eu.kanade.domain.source.service.SourcePreferences
|
||||||
import tachiyomi.core.preference.plusAssign
|
import tachiyomi.core.common.preference.plusAssign
|
||||||
|
|
||||||
class CreateSourceCategory(private val preferences: SourcePreferences) {
|
class CreateSourceCategory(private val preferences: SourcePreferences) {
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
package eu.kanade.domain.source.interactor
|
package eu.kanade.domain.source.interactor
|
||||||
|
|
||||||
import eu.kanade.domain.source.service.SourcePreferences
|
import eu.kanade.domain.source.service.SourcePreferences
|
||||||
import tachiyomi.core.preference.getAndSet
|
import tachiyomi.core.common.preference.getAndSet
|
||||||
import tachiyomi.core.preference.minusAssign
|
import tachiyomi.core.common.preference.minusAssign
|
||||||
|
|
||||||
class DeleteSourceCategory(private val preferences: SourcePreferences) {
|
class DeleteSourceCategory(private val preferences: SourcePreferences) {
|
||||||
|
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import kotlinx.coroutines.flow.map
|
|||||||
import kotlinx.serialization.decodeFromString
|
import kotlinx.serialization.decodeFromString
|
||||||
import kotlinx.serialization.json.Json
|
import kotlinx.serialization.json.Json
|
||||||
import kotlinx.serialization.json.JsonArray
|
import kotlinx.serialization.json.JsonArray
|
||||||
import tachiyomi.core.util.lang.withIOContext
|
import tachiyomi.core.common.util.lang.withIOContext
|
||||||
import tachiyomi.domain.source.interactor.GetSavedSearchById
|
import tachiyomi.domain.source.interactor.GetSavedSearchById
|
||||||
import tachiyomi.domain.source.interactor.GetSavedSearchBySourceId
|
import tachiyomi.domain.source.interactor.GetSavedSearchBySourceId
|
||||||
import tachiyomi.domain.source.model.EXHSavedSearch
|
import tachiyomi.domain.source.model.EXHSavedSearch
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package eu.kanade.domain.source.interactor
|
|||||||
import eu.kanade.domain.source.service.SourcePreferences
|
import eu.kanade.domain.source.service.SourcePreferences
|
||||||
import kotlinx.coroutines.flow.Flow
|
import kotlinx.coroutines.flow.Flow
|
||||||
import kotlinx.coroutines.flow.combine
|
import kotlinx.coroutines.flow.combine
|
||||||
import tachiyomi.core.util.lang.compareToWithCollator
|
import tachiyomi.core.common.util.lang.compareToWithCollator
|
||||||
import tachiyomi.domain.source.model.Source
|
import tachiyomi.domain.source.model.Source
|
||||||
import tachiyomi.domain.source.repository.SourceRepository
|
import tachiyomi.domain.source.repository.SourceRepository
|
||||||
import tachiyomi.source.local.isLocal
|
import tachiyomi.source.local.isLocal
|
||||||
@@ -34,15 +34,15 @@ class GetSourcesWithFavoriteCount(
|
|||||||
when (sorting) {
|
when (sorting) {
|
||||||
SetMigrateSorting.Mode.ALPHABETICAL -> {
|
SetMigrateSorting.Mode.ALPHABETICAL -> {
|
||||||
when {
|
when {
|
||||||
a.first.isStub && b.first.isStub.not() -> -1
|
a.first.isStub && !b.first.isStub -> -1
|
||||||
b.first.isStub && a.first.isStub.not() -> 1
|
b.first.isStub && !a.first.isStub -> 1
|
||||||
else -> a.first.name.lowercase().compareToWithCollator(b.first.name.lowercase())
|
else -> a.first.name.lowercase().compareToWithCollator(b.first.name.lowercase())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
SetMigrateSorting.Mode.TOTAL -> {
|
SetMigrateSorting.Mode.TOTAL -> {
|
||||||
when {
|
when {
|
||||||
a.first.isStub && b.first.isStub.not() -> -1
|
a.first.isStub && !b.first.isStub -> -1
|
||||||
b.first.isStub && a.first.isStub.not() -> 1
|
b.first.isStub && !a.first.isStub -> 1
|
||||||
else -> a.second.compareTo(b.second)
|
else -> a.second.compareTo(b.second)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package eu.kanade.domain.source.interactor
|
package eu.kanade.domain.source.interactor
|
||||||
|
|
||||||
import eu.kanade.domain.source.service.SourcePreferences
|
import eu.kanade.domain.source.service.SourcePreferences
|
||||||
import tachiyomi.core.preference.getAndSet
|
import tachiyomi.core.common.preference.getAndSet
|
||||||
|
|
||||||
class RenameSourceCategory(
|
class RenameSourceCategory(
|
||||||
private val preferences: SourcePreferences,
|
private val preferences: SourcePreferences,
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package eu.kanade.domain.source.interactor
|
package eu.kanade.domain.source.interactor
|
||||||
|
|
||||||
import eu.kanade.domain.source.service.SourcePreferences
|
import eu.kanade.domain.source.service.SourcePreferences
|
||||||
import tachiyomi.core.preference.getAndSet
|
import tachiyomi.core.common.preference.getAndSet
|
||||||
import tachiyomi.domain.source.model.Source
|
import tachiyomi.domain.source.model.Source
|
||||||
|
|
||||||
class SetSourceCategories(
|
class SetSourceCategories(
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package eu.kanade.domain.source.interactor
|
package eu.kanade.domain.source.interactor
|
||||||
|
|
||||||
import eu.kanade.domain.source.service.SourcePreferences
|
import eu.kanade.domain.source.service.SourcePreferences
|
||||||
import tachiyomi.core.preference.getAndSet
|
import tachiyomi.core.common.preference.getAndSet
|
||||||
import tachiyomi.domain.source.model.Source
|
import tachiyomi.domain.source.model.Source
|
||||||
|
|
||||||
class ToggleExcludeFromDataSaver(
|
class ToggleExcludeFromDataSaver(
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package eu.kanade.domain.source.interactor
|
package eu.kanade.domain.source.interactor
|
||||||
|
|
||||||
import eu.kanade.domain.source.service.SourcePreferences
|
import eu.kanade.domain.source.service.SourcePreferences
|
||||||
import tachiyomi.core.preference.getAndSet
|
import tachiyomi.core.common.preference.getAndSet
|
||||||
|
|
||||||
class ToggleLanguage(
|
class ToggleLanguage(
|
||||||
val preferences: SourcePreferences,
|
val preferences: SourcePreferences,
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package eu.kanade.domain.source.interactor
|
package eu.kanade.domain.source.interactor
|
||||||
|
|
||||||
import eu.kanade.domain.source.service.SourcePreferences
|
import eu.kanade.domain.source.service.SourcePreferences
|
||||||
import tachiyomi.core.preference.getAndSet
|
import tachiyomi.core.common.preference.getAndSet
|
||||||
import tachiyomi.domain.source.model.Source
|
import tachiyomi.domain.source.model.Source
|
||||||
|
|
||||||
class ToggleSource(
|
class ToggleSource(
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package eu.kanade.domain.source.interactor
|
package eu.kanade.domain.source.interactor
|
||||||
|
|
||||||
import eu.kanade.domain.source.service.SourcePreferences
|
import eu.kanade.domain.source.service.SourcePreferences
|
||||||
import tachiyomi.core.preference.getAndSet
|
import tachiyomi.core.common.preference.getAndSet
|
||||||
import tachiyomi.domain.source.model.Source
|
import tachiyomi.domain.source.model.Source
|
||||||
|
|
||||||
class ToggleSourcePin(
|
class ToggleSourcePin(
|
||||||
|
|||||||
@@ -2,9 +2,9 @@ package eu.kanade.domain.source.service
|
|||||||
|
|
||||||
import eu.kanade.domain.source.interactor.SetMigrateSorting
|
import eu.kanade.domain.source.interactor.SetMigrateSorting
|
||||||
import eu.kanade.tachiyomi.util.system.LocaleHelper
|
import eu.kanade.tachiyomi.util.system.LocaleHelper
|
||||||
import tachiyomi.core.preference.Preference
|
import tachiyomi.core.common.preference.Preference
|
||||||
import tachiyomi.core.preference.PreferenceStore
|
import tachiyomi.core.common.preference.PreferenceStore
|
||||||
import tachiyomi.core.preference.getEnum
|
import tachiyomi.core.common.preference.getEnum
|
||||||
import tachiyomi.domain.library.model.LibraryDisplayMode
|
import tachiyomi.domain.library.model.LibraryDisplayMode
|
||||||
|
|
||||||
class SourcePreferences(
|
class SourcePreferences(
|
||||||
|
|||||||
@@ -8,9 +8,9 @@ import eu.kanade.tachiyomi.data.track.Tracker
|
|||||||
import eu.kanade.tachiyomi.source.Source
|
import eu.kanade.tachiyomi.source.Source
|
||||||
import eu.kanade.tachiyomi.util.lang.convertEpochMillisZone
|
import eu.kanade.tachiyomi.util.lang.convertEpochMillisZone
|
||||||
import logcat.LogPriority
|
import logcat.LogPriority
|
||||||
import tachiyomi.core.util.lang.withIOContext
|
import tachiyomi.core.common.util.lang.withIOContext
|
||||||
import tachiyomi.core.util.lang.withNonCancellableContext
|
import tachiyomi.core.common.util.lang.withNonCancellableContext
|
||||||
import tachiyomi.core.util.system.logcat
|
import tachiyomi.core.common.util.system.logcat
|
||||||
import tachiyomi.domain.chapter.interactor.GetChaptersByMangaId
|
import tachiyomi.domain.chapter.interactor.GetChaptersByMangaId
|
||||||
import tachiyomi.domain.history.interactor.GetHistory
|
import tachiyomi.domain.history.interactor.GetHistory
|
||||||
import tachiyomi.domain.manga.model.Manga
|
import tachiyomi.domain.manga.model.Manga
|
||||||
|
|||||||
@@ -30,9 +30,9 @@ class RefreshTracks(
|
|||||||
.map { (track, service) ->
|
.map { (track, service) ->
|
||||||
async {
|
async {
|
||||||
return@async try {
|
return@async try {
|
||||||
val updatedTrack = service!!.refresh(track.toDbTrack())
|
val updatedTrack = service!!.refresh(track.toDbTrack()).toDomainTrack()!!
|
||||||
insertTrack.await(updatedTrack.toDomainTrack()!!)
|
insertTrack.await(updatedTrack)
|
||||||
syncChapterProgressWithTrack.await(mangaId, track, service)
|
syncChapterProgressWithTrack.await(mangaId, updatedTrack, service)
|
||||||
null
|
null
|
||||||
} catch (e: Throwable) {
|
} catch (e: Throwable) {
|
||||||
service to e
|
service to e
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import eu.kanade.domain.track.model.toDbTrack
|
|||||||
import eu.kanade.tachiyomi.data.track.EnhancedTracker
|
import eu.kanade.tachiyomi.data.track.EnhancedTracker
|
||||||
import eu.kanade.tachiyomi.data.track.Tracker
|
import eu.kanade.tachiyomi.data.track.Tracker
|
||||||
import logcat.LogPriority
|
import logcat.LogPriority
|
||||||
import tachiyomi.core.util.system.logcat
|
import tachiyomi.core.common.util.system.logcat
|
||||||
import tachiyomi.domain.chapter.interactor.GetChaptersByMangaId
|
import tachiyomi.domain.chapter.interactor.GetChaptersByMangaId
|
||||||
import tachiyomi.domain.chapter.interactor.UpdateChapter
|
import tachiyomi.domain.chapter.interactor.UpdateChapter
|
||||||
import tachiyomi.domain.chapter.model.toChapterUpdate
|
import tachiyomi.domain.chapter.model.toChapterUpdate
|
||||||
|
|||||||
@@ -11,8 +11,8 @@ import exh.md.utils.FollowStatus
|
|||||||
import kotlinx.coroutines.async
|
import kotlinx.coroutines.async
|
||||||
import kotlinx.coroutines.awaitAll
|
import kotlinx.coroutines.awaitAll
|
||||||
import logcat.LogPriority
|
import logcat.LogPriority
|
||||||
import tachiyomi.core.util.lang.withNonCancellableContext
|
import tachiyomi.core.common.util.lang.withNonCancellableContext
|
||||||
import tachiyomi.core.util.system.logcat
|
import tachiyomi.core.common.util.system.logcat
|
||||||
import tachiyomi.domain.track.interactor.GetTracks
|
import tachiyomi.domain.track.interactor.GetTracks
|
||||||
import tachiyomi.domain.track.interactor.InsertTrack
|
import tachiyomi.domain.track.interactor.InsertTrack
|
||||||
|
|
||||||
|
|||||||
@@ -19,30 +19,28 @@ fun Track.toDbTrack(): DbTrack = DbTrack.create(trackerId).also {
|
|||||||
it.remote_id = remoteId
|
it.remote_id = remoteId
|
||||||
it.library_id = libraryId
|
it.library_id = libraryId
|
||||||
it.title = title
|
it.title = title
|
||||||
it.last_chapter_read = lastChapterRead.toFloat()
|
it.last_chapter_read = lastChapterRead
|
||||||
it.total_chapters = totalChapters.toInt()
|
it.total_chapters = totalChapters
|
||||||
it.status = status.toInt()
|
it.status = status
|
||||||
it.score = score.toFloat()
|
it.score = score
|
||||||
it.tracking_url = remoteUrl
|
it.tracking_url = remoteUrl
|
||||||
it.started_reading_date = startDate
|
it.started_reading_date = startDate
|
||||||
it.finished_reading_date = finishDate
|
it.finished_reading_date = finishDate
|
||||||
}
|
}
|
||||||
|
|
||||||
fun DbTrack.toDomainTrack(idRequired: Boolean = true): Track? {
|
fun DbTrack.toDomainTrack(idRequired: Boolean = true): Track? {
|
||||||
val trackId = id ?: if (idRequired.not()) -1 else return null
|
val trackId = id ?: if (!idRequired) -1 else return null
|
||||||
return Track(
|
return Track(
|
||||||
id = trackId,
|
id = trackId,
|
||||||
mangaId = manga_id,
|
mangaId = manga_id,
|
||||||
trackerId = tracker_id.toLong(),
|
trackerId = tracker_id,
|
||||||
remoteId = remote_id,
|
remoteId = remote_id,
|
||||||
libraryId = library_id,
|
libraryId = library_id,
|
||||||
title = title,
|
title = title,
|
||||||
lastChapterRead = last_chapter_read.toDouble(),
|
lastChapterRead = last_chapter_read,
|
||||||
totalChapters = total_chapters.toLong(),
|
totalChapters = total_chapters,
|
||||||
status = status.toLong(),
|
status = status,
|
||||||
// Jank workaround due to precision issues while converting
|
score = score,
|
||||||
// See https://github.com/tachiyomiorg/tachiyomi/issues/10343
|
|
||||||
score = score.toString().toDouble(),
|
|
||||||
remoteUrl = tracking_url,
|
remoteUrl = tracking_url,
|
||||||
startDate = started_reading_date,
|
startDate = started_reading_date,
|
||||||
finishDate = finished_reading_date,
|
finishDate = finished_reading_date,
|
||||||
|
|||||||
@@ -12,8 +12,8 @@ import eu.kanade.domain.track.interactor.TrackChapter
|
|||||||
import eu.kanade.domain.track.store.DelayedTrackingStore
|
import eu.kanade.domain.track.store.DelayedTrackingStore
|
||||||
import eu.kanade.tachiyomi.util.system.workManager
|
import eu.kanade.tachiyomi.util.system.workManager
|
||||||
import logcat.LogPriority
|
import logcat.LogPriority
|
||||||
import tachiyomi.core.util.lang.withIOContext
|
import tachiyomi.core.common.util.lang.withIOContext
|
||||||
import tachiyomi.core.util.system.logcat
|
import tachiyomi.core.common.util.system.logcat
|
||||||
import tachiyomi.domain.track.interactor.GetTracks
|
import tachiyomi.domain.track.interactor.GetTracks
|
||||||
import uy.kohesive.injekt.Injekt
|
import uy.kohesive.injekt.Injekt
|
||||||
import uy.kohesive.injekt.api.get
|
import uy.kohesive.injekt.api.get
|
||||||
|
|||||||
@@ -2,8 +2,8 @@ package eu.kanade.domain.track.service
|
|||||||
|
|
||||||
import eu.kanade.tachiyomi.data.track.Tracker
|
import eu.kanade.tachiyomi.data.track.Tracker
|
||||||
import eu.kanade.tachiyomi.data.track.anilist.Anilist
|
import eu.kanade.tachiyomi.data.track.anilist.Anilist
|
||||||
import tachiyomi.core.preference.Preference
|
import tachiyomi.core.common.preference.Preference
|
||||||
import tachiyomi.core.preference.PreferenceStore
|
import tachiyomi.core.common.preference.PreferenceStore
|
||||||
|
|
||||||
class TrackPreferences(
|
class TrackPreferences(
|
||||||
private val preferenceStore: PreferenceStore,
|
private val preferenceStore: PreferenceStore,
|
||||||
@@ -19,9 +19,15 @@ class TrackPreferences(
|
|||||||
"",
|
"",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
fun trackAuthExpired(tracker: Tracker) = preferenceStore.getBoolean(
|
||||||
|
Preference.privateKey("pref_tracker_auth_expired_${tracker.id}"),
|
||||||
|
false,
|
||||||
|
)
|
||||||
|
|
||||||
fun setCredentials(tracker: Tracker, username: String, password: String) {
|
fun setCredentials(tracker: Tracker, username: String, password: String) {
|
||||||
trackUsername(tracker).set(username)
|
trackUsername(tracker).set(username)
|
||||||
trackPassword(tracker).set(password)
|
trackPassword(tracker).set(password)
|
||||||
|
trackAuthExpired(tracker).set(false)
|
||||||
}
|
}
|
||||||
|
|
||||||
fun trackToken(tracker: Tracker) = preferenceStore.getString(Preference.privateKey("track_token_${tracker.id}"), "")
|
fun trackToken(tracker: Tracker) = preferenceStore.getString(Preference.privateKey("track_token_${tracker.id}"), "")
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package eu.kanade.domain.track.store
|
|||||||
import android.content.Context
|
import android.content.Context
|
||||||
import androidx.core.content.edit
|
import androidx.core.content.edit
|
||||||
import logcat.LogPriority
|
import logcat.LogPriority
|
||||||
import tachiyomi.core.util.system.logcat
|
import tachiyomi.core.common.util.system.logcat
|
||||||
|
|
||||||
class DelayedTrackingStore(context: Context) {
|
class DelayedTrackingStore(context: Context) {
|
||||||
|
|
||||||
|
|||||||
@@ -6,8 +6,8 @@ import eu.kanade.domain.ui.model.TabletUiMode
|
|||||||
import eu.kanade.domain.ui.model.ThemeMode
|
import eu.kanade.domain.ui.model.ThemeMode
|
||||||
import eu.kanade.tachiyomi.util.system.DeviceUtil
|
import eu.kanade.tachiyomi.util.system.DeviceUtil
|
||||||
import eu.kanade.tachiyomi.util.system.isDynamicColorAvailable
|
import eu.kanade.tachiyomi.util.system.isDynamicColorAvailable
|
||||||
import tachiyomi.core.preference.PreferenceStore
|
import tachiyomi.core.common.preference.PreferenceStore
|
||||||
import tachiyomi.core.preference.getEnum
|
import tachiyomi.core.common.preference.getEnum
|
||||||
import java.text.DateFormat
|
import java.text.DateFormat
|
||||||
import java.text.SimpleDateFormat
|
import java.text.SimpleDateFormat
|
||||||
import java.util.Locale
|
import java.util.Locale
|
||||||
@@ -38,6 +38,8 @@ class UiPreferences(
|
|||||||
|
|
||||||
fun expandFilters() = preferenceStore.getBoolean("eh_expand_filters", false)
|
fun expandFilters() = preferenceStore.getBoolean("eh_expand_filters", false)
|
||||||
|
|
||||||
|
fun hideFeedTab() = preferenceStore.getBoolean("hide_latest_tab", false)
|
||||||
|
|
||||||
fun feedTabInFront() = preferenceStore.getBoolean("latest_tab_position", false)
|
fun feedTabInFront() = preferenceStore.getBoolean("latest_tab_position", false)
|
||||||
|
|
||||||
fun recommendsInOverflow() = preferenceStore.getBoolean("recommends_in_overflow", false)
|
fun recommendsInOverflow() = preferenceStore.getBoolean("recommends_in_overflow", false)
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ import exh.source.isEhBasedSource
|
|||||||
import kotlinx.collections.immutable.persistentListOf
|
import kotlinx.collections.immutable.persistentListOf
|
||||||
import kotlinx.collections.immutable.toImmutableList
|
import kotlinx.collections.immutable.toImmutableList
|
||||||
import kotlinx.coroutines.flow.StateFlow
|
import kotlinx.coroutines.flow.StateFlow
|
||||||
import tachiyomi.core.i18n.stringResource
|
import tachiyomi.core.common.i18n.stringResource
|
||||||
import tachiyomi.domain.library.model.LibraryDisplayMode
|
import tachiyomi.domain.library.model.LibraryDisplayMode
|
||||||
import tachiyomi.domain.manga.model.Manga
|
import tachiyomi.domain.manga.model.Manga
|
||||||
import tachiyomi.domain.source.model.StubSource
|
import tachiyomi.domain.source.model.StubSource
|
||||||
|
|||||||
@@ -53,6 +53,7 @@ import eu.kanade.tachiyomi.extension.model.Extension
|
|||||||
import eu.kanade.tachiyomi.source.ConfigurableSource
|
import eu.kanade.tachiyomi.source.ConfigurableSource
|
||||||
import eu.kanade.tachiyomi.ui.browse.extension.details.ExtensionDetailsScreenModel
|
import eu.kanade.tachiyomi.ui.browse.extension.details.ExtensionDetailsScreenModel
|
||||||
import eu.kanade.tachiyomi.util.system.LocaleHelper
|
import eu.kanade.tachiyomi.util.system.LocaleHelper
|
||||||
|
import eu.kanade.tachiyomi.util.system.copyToClipboard
|
||||||
import kotlinx.collections.immutable.ImmutableList
|
import kotlinx.collections.immutable.ImmutableList
|
||||||
import kotlinx.collections.immutable.persistentListOf
|
import kotlinx.collections.immutable.persistentListOf
|
||||||
import tachiyomi.i18n.MR
|
import tachiyomi.i18n.MR
|
||||||
@@ -232,7 +233,31 @@ private fun DetailsHeader(
|
|||||||
end = MaterialTheme.padding.medium,
|
end = MaterialTheme.padding.medium,
|
||||||
top = MaterialTheme.padding.medium,
|
top = MaterialTheme.padding.medium,
|
||||||
bottom = MaterialTheme.padding.small,
|
bottom = MaterialTheme.padding.small,
|
||||||
),
|
)
|
||||||
|
.clickable {
|
||||||
|
val extDebugInfo = buildString {
|
||||||
|
append(
|
||||||
|
"""
|
||||||
|
Extension name: ${extension.name} (lang: ${extension.lang}; package: ${extension.pkgName})
|
||||||
|
Extension version: ${extension.versionName} (lib: ${extension.libVersion}; version code: ${extension.versionCode})
|
||||||
|
NSFW: ${extension.isNsfw}
|
||||||
|
""".trimIndent()
|
||||||
|
)
|
||||||
|
|
||||||
|
if (extension is Extension.Installed) {
|
||||||
|
append("\n\n")
|
||||||
|
append(
|
||||||
|
"""
|
||||||
|
Update available: ${extension.hasUpdate}
|
||||||
|
Obsolete: ${extension.isObsolete}
|
||||||
|
Shared: ${extension.isShared}
|
||||||
|
Repository: ${extension.repoUrl}
|
||||||
|
""".trimIndent()
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
context.copyToClipboard("Extension Debug information", extDebugInfo)
|
||||||
|
},
|
||||||
horizontalAlignment = Alignment.CenterHorizontally,
|
horizontalAlignment = Alignment.CenterHorizontally,
|
||||||
) {
|
) {
|
||||||
ExtensionIcon(
|
ExtensionIcon(
|
||||||
|
|||||||
@@ -204,7 +204,13 @@ private fun ExtensionContent(
|
|||||||
items(
|
items(
|
||||||
items = items,
|
items = items,
|
||||||
contentType = { "item" },
|
contentType = { "item" },
|
||||||
key = { "extension-${it.hashCode()}" },
|
key = { item ->
|
||||||
|
when (item.extension) {
|
||||||
|
is Extension.Untrusted -> "extension-untrusted-${item.hashCode()}"
|
||||||
|
is Extension.Installed -> "extension-installed-${item.hashCode()}"
|
||||||
|
is Extension.Available -> "extension-available-${item.hashCode()}"
|
||||||
|
}
|
||||||
|
},
|
||||||
) { item ->
|
) { item ->
|
||||||
ExtensionItem(
|
ExtensionItem(
|
||||||
modifier = Modifier.animateItemPlacement(),
|
modifier = Modifier.animateItemPlacement(),
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ import eu.kanade.tachiyomi.ui.browse.feed.FeedScreenState
|
|||||||
import kotlinx.collections.immutable.ImmutableList
|
import kotlinx.collections.immutable.ImmutableList
|
||||||
import kotlinx.collections.immutable.toImmutableList
|
import kotlinx.collections.immutable.toImmutableList
|
||||||
import kotlinx.coroutines.delay
|
import kotlinx.coroutines.delay
|
||||||
import tachiyomi.core.i18n.stringResource
|
import tachiyomi.core.common.i18n.stringResource
|
||||||
import tachiyomi.domain.manga.model.Manga
|
import tachiyomi.domain.manga.model.Manga
|
||||||
import tachiyomi.domain.source.model.FeedSavedSearch
|
import tachiyomi.domain.source.model.FeedSavedSearch
|
||||||
import tachiyomi.domain.source.model.SavedSearch
|
import tachiyomi.domain.source.model.SavedSearch
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ import eu.kanade.presentation.components.AppBarActions
|
|||||||
import eu.kanade.tachiyomi.ui.browse.migration.advanced.process.MigratingManga
|
import eu.kanade.tachiyomi.ui.browse.migration.advanced.process.MigratingManga
|
||||||
import kotlinx.collections.immutable.ImmutableList
|
import kotlinx.collections.immutable.ImmutableList
|
||||||
import kotlinx.collections.immutable.persistentListOf
|
import kotlinx.collections.immutable.persistentListOf
|
||||||
import tachiyomi.core.util.lang.withIOContext
|
import tachiyomi.core.common.util.lang.withIOContext
|
||||||
import tachiyomi.domain.manga.model.Manga
|
import tachiyomi.domain.manga.model.Manga
|
||||||
import tachiyomi.i18n.MR
|
import tachiyomi.i18n.MR
|
||||||
import tachiyomi.i18n.sy.SYMR
|
import tachiyomi.i18n.sy.SYMR
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ import eu.kanade.presentation.util.rememberResourceBitmapPainter
|
|||||||
import eu.kanade.tachiyomi.R
|
import eu.kanade.tachiyomi.R
|
||||||
import eu.kanade.tachiyomi.extension.model.Extension
|
import eu.kanade.tachiyomi.extension.model.Extension
|
||||||
import eu.kanade.tachiyomi.extension.util.ExtensionLoader
|
import eu.kanade.tachiyomi.extension.util.ExtensionLoader
|
||||||
import tachiyomi.core.util.lang.withIOContext
|
import tachiyomi.core.common.util.lang.withIOContext
|
||||||
import tachiyomi.domain.source.model.Source
|
import tachiyomi.domain.source.model.Source
|
||||||
import tachiyomi.source.local.isLocal
|
import tachiyomi.source.local.isLocal
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -86,7 +86,7 @@ private fun BrowseSourceComfortableGridItem(
|
|||||||
mangaId = manga.id,
|
mangaId = manga.id,
|
||||||
sourceId = manga.source,
|
sourceId = manga.source,
|
||||||
isMangaFavorite = manga.favorite,
|
isMangaFavorite = manga.favorite,
|
||||||
url = manga.thumbnailUrl,
|
ogUrl = manga.thumbnailUrl,
|
||||||
lastModified = manga.coverLastModified,
|
lastModified = manga.coverLastModified,
|
||||||
),
|
),
|
||||||
coverAlpha = if (manga.favorite) CommonMangaItemDefaults.BrowseFavoriteCoverAlpha else 1f,
|
coverAlpha = if (manga.favorite) CommonMangaItemDefaults.BrowseFavoriteCoverAlpha else 1f,
|
||||||
|
|||||||
+1
-1
@@ -86,7 +86,7 @@ private fun BrowseSourceCompactGridItem(
|
|||||||
mangaId = manga.id,
|
mangaId = manga.id,
|
||||||
sourceId = manga.source,
|
sourceId = manga.source,
|
||||||
isMangaFavorite = manga.favorite,
|
isMangaFavorite = manga.favorite,
|
||||||
url = manga.thumbnailUrl,
|
ogUrl = manga.thumbnailUrl,
|
||||||
lastModified = manga.coverLastModified,
|
lastModified = manga.coverLastModified,
|
||||||
),
|
),
|
||||||
coverAlpha = if (manga.favorite) CommonMangaItemDefaults.BrowseFavoriteCoverAlpha else 1f,
|
coverAlpha = if (manga.favorite) CommonMangaItemDefaults.BrowseFavoriteCoverAlpha else 1f,
|
||||||
|
|||||||
+2
-2
@@ -41,8 +41,8 @@ import exh.util.SourceTagsUtil
|
|||||||
import exh.util.SourceTagsUtil.GenreColor
|
import exh.util.SourceTagsUtil.GenreColor
|
||||||
import exh.util.floor
|
import exh.util.floor
|
||||||
import kotlinx.coroutines.flow.StateFlow
|
import kotlinx.coroutines.flow.StateFlow
|
||||||
import tachiyomi.core.i18n.pluralStringResource
|
import tachiyomi.core.common.i18n.pluralStringResource
|
||||||
import tachiyomi.core.util.lang.withIOContext
|
import tachiyomi.core.common.util.lang.withIOContext
|
||||||
import tachiyomi.domain.manga.model.Manga
|
import tachiyomi.domain.manga.model.Manga
|
||||||
import tachiyomi.i18n.MR
|
import tachiyomi.i18n.MR
|
||||||
import tachiyomi.i18n.sy.SYMR
|
import tachiyomi.i18n.sy.SYMR
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ private fun BrowseSourceListItem(
|
|||||||
mangaId = manga.id,
|
mangaId = manga.id,
|
||||||
sourceId = manga.source,
|
sourceId = manga.source,
|
||||||
isMangaFavorite = manga.favorite,
|
isMangaFavorite = manga.favorite,
|
||||||
url = manga.thumbnailUrl,
|
ogUrl = manga.thumbnailUrl,
|
||||||
lastModified = manga.coverLastModified,
|
lastModified = manga.coverLastModified,
|
||||||
),
|
),
|
||||||
coverAlpha = if (manga.favorite) CommonMangaItemDefaults.BrowseFavoriteCoverAlpha else 1f,
|
coverAlpha = if (manga.favorite) CommonMangaItemDefaults.BrowseFavoriteCoverAlpha else 1f,
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ import androidx.compose.ui.unit.dp
|
|||||||
import androidx.compose.ui.unit.sp
|
import androidx.compose.ui.unit.sp
|
||||||
import eu.kanade.presentation.manga.components.MangaCover
|
import eu.kanade.presentation.manga.components.MangaCover
|
||||||
import eu.kanade.tachiyomi.ui.browse.migration.advanced.process.MigratingManga
|
import eu.kanade.tachiyomi.ui.browse.migration.advanced.process.MigratingManga
|
||||||
import tachiyomi.core.util.lang.withIOContext
|
import tachiyomi.core.common.util.lang.withIOContext
|
||||||
import tachiyomi.domain.manga.model.Manga
|
import tachiyomi.domain.manga.model.Manga
|
||||||
import tachiyomi.i18n.MR
|
import tachiyomi.i18n.MR
|
||||||
import tachiyomi.presentation.core.components.Badge
|
import tachiyomi.presentation.core.components.Badge
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ import eu.kanade.presentation.manga.components.MangaCover
|
|||||||
import eu.kanade.presentation.util.rememberResourceBitmapPainter
|
import eu.kanade.presentation.util.rememberResourceBitmapPainter
|
||||||
import eu.kanade.tachiyomi.R
|
import eu.kanade.tachiyomi.R
|
||||||
import eu.kanade.tachiyomi.ui.browse.migration.advanced.process.MigratingManga
|
import eu.kanade.tachiyomi.ui.browse.migration.advanced.process.MigratingManga
|
||||||
import tachiyomi.core.util.lang.withIOContext
|
import tachiyomi.core.common.util.lang.withIOContext
|
||||||
import tachiyomi.domain.manga.model.Manga
|
import tachiyomi.domain.manga.model.Manga
|
||||||
import tachiyomi.i18n.sy.SYMR
|
import tachiyomi.i18n.sy.SYMR
|
||||||
import tachiyomi.presentation.core.i18n.stringResource
|
import tachiyomi.presentation.core.i18n.stringResource
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ package eu.kanade.presentation.category
|
|||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import androidx.compose.runtime.Composable
|
import androidx.compose.runtime.Composable
|
||||||
import tachiyomi.core.i18n.stringResource
|
import tachiyomi.core.common.i18n.stringResource
|
||||||
import tachiyomi.domain.category.model.Category
|
import tachiyomi.domain.category.model.Category
|
||||||
import tachiyomi.i18n.MR
|
import tachiyomi.i18n.MR
|
||||||
import tachiyomi.presentation.core.i18n.stringResource
|
import tachiyomi.presentation.core.i18n.stringResource
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ import eu.kanade.presentation.category.visualName
|
|||||||
import kotlinx.collections.immutable.ImmutableList
|
import kotlinx.collections.immutable.ImmutableList
|
||||||
import kotlinx.collections.immutable.toImmutableList
|
import kotlinx.collections.immutable.toImmutableList
|
||||||
import kotlinx.coroutines.delay
|
import kotlinx.coroutines.delay
|
||||||
import tachiyomi.core.preference.CheckboxState
|
import tachiyomi.core.common.preference.CheckboxState
|
||||||
import tachiyomi.domain.category.model.Category
|
import tachiyomi.domain.category.model.Category
|
||||||
import tachiyomi.i18n.MR
|
import tachiyomi.i18n.MR
|
||||||
import tachiyomi.presentation.core.components.material.padding
|
import tachiyomi.presentation.core.components.material.padding
|
||||||
|
|||||||
@@ -97,5 +97,5 @@ fun AdaptiveSheet(
|
|||||||
|
|
||||||
private val dialogProperties = DialogProperties(
|
private val dialogProperties = DialogProperties(
|
||||||
usePlatformDefaultWidth = false,
|
usePlatformDefaultWidth = false,
|
||||||
decorFitsSystemWindows = false,
|
decorFitsSystemWindows = true,
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -103,7 +103,7 @@ class HistoryScreenModelStateProvider : PreviewParameterProvider<HistoryScreenMo
|
|||||||
mangaId = Random.nextLong(),
|
mangaId = Random.nextLong(),
|
||||||
sourceId = Random.nextLong(),
|
sourceId = Random.nextLong(),
|
||||||
isMangaFavorite = Random.nextBoolean(),
|
isMangaFavorite = Random.nextBoolean(),
|
||||||
url = "https://example.com/cover.png",
|
ogUrl = "https://example.com/cover.png",
|
||||||
lastModified = Random.nextLong(),
|
lastModified = Random.nextLong(),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
+3
-3
@@ -20,7 +20,7 @@ internal class HistoryWithRelationsProvider : PreviewParameterProvider<HistoryWi
|
|||||||
mangaId = 3L,
|
mangaId = 3L,
|
||||||
sourceId = 4L,
|
sourceId = 4L,
|
||||||
isMangaFavorite = false,
|
isMangaFavorite = false,
|
||||||
url = "https://example.com/cover.png",
|
ogUrl = "https://example.com/cover.png",
|
||||||
lastModified = 5L,
|
lastModified = 5L,
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
@@ -39,7 +39,7 @@ internal class HistoryWithRelationsProvider : PreviewParameterProvider<HistoryWi
|
|||||||
mangaId = 3L,
|
mangaId = 3L,
|
||||||
sourceId = 4L,
|
sourceId = 4L,
|
||||||
isMangaFavorite = false,
|
isMangaFavorite = false,
|
||||||
url = "https://example.com/cover.png",
|
ogUrl = "https://example.com/cover.png",
|
||||||
lastModified = 5L,
|
lastModified = 5L,
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
@@ -58,7 +58,7 @@ internal class HistoryWithRelationsProvider : PreviewParameterProvider<HistoryWi
|
|||||||
mangaId = 3L,
|
mangaId = 3L,
|
||||||
sourceId = 4L,
|
sourceId = 4L,
|
||||||
isMangaFavorite = false,
|
isMangaFavorite = false,
|
||||||
url = "https://example.com/cover.png",
|
ogUrl = "https://example.com/cover.png",
|
||||||
lastModified = 5L,
|
lastModified = 5L,
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import androidx.compose.runtime.mutableStateOf
|
|||||||
import androidx.compose.runtime.remember
|
import androidx.compose.runtime.remember
|
||||||
import androidx.compose.runtime.setValue
|
import androidx.compose.runtime.setValue
|
||||||
import dev.icerock.moko.resources.StringResource
|
import dev.icerock.moko.resources.StringResource
|
||||||
import tachiyomi.core.preference.CheckboxState
|
import tachiyomi.core.common.preference.CheckboxState
|
||||||
import tachiyomi.i18n.MR
|
import tachiyomi.i18n.MR
|
||||||
import tachiyomi.presentation.core.components.LabeledCheckbox
|
import tachiyomi.presentation.core.components.LabeledCheckbox
|
||||||
import tachiyomi.presentation.core.i18n.stringResource
|
import tachiyomi.presentation.core.i18n.stringResource
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ import eu.kanade.tachiyomi.util.system.isPreviewBuildType
|
|||||||
import kotlinx.collections.immutable.persistentListOf
|
import kotlinx.collections.immutable.persistentListOf
|
||||||
import kotlinx.collections.immutable.toImmutableList
|
import kotlinx.collections.immutable.toImmutableList
|
||||||
import kotlinx.coroutines.flow.map
|
import kotlinx.coroutines.flow.map
|
||||||
import tachiyomi.core.preference.TriState
|
import tachiyomi.core.common.preference.TriState
|
||||||
import tachiyomi.domain.category.model.Category
|
import tachiyomi.domain.category.model.Category
|
||||||
import tachiyomi.domain.library.model.LibraryDisplayMode
|
import tachiyomi.domain.library.model.LibraryDisplayMode
|
||||||
import tachiyomi.domain.library.model.LibraryGroup
|
import tachiyomi.domain.library.model.LibraryGroup
|
||||||
|
|||||||
+1
-1
@@ -41,7 +41,7 @@ internal fun LibraryComfortableGrid(
|
|||||||
mangaId = manga.id,
|
mangaId = manga.id,
|
||||||
sourceId = manga.source,
|
sourceId = manga.source,
|
||||||
isMangaFavorite = manga.favorite,
|
isMangaFavorite = manga.favorite,
|
||||||
url = manga.thumbnailUrl,
|
ogUrl = manga.thumbnailUrl,
|
||||||
lastModified = manga.coverLastModified,
|
lastModified = manga.coverLastModified,
|
||||||
),
|
),
|
||||||
coverBadgeStart = {
|
coverBadgeStart = {
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ internal fun LibraryCompactGrid(
|
|||||||
mangaId = manga.id,
|
mangaId = manga.id,
|
||||||
sourceId = manga.source,
|
sourceId = manga.source,
|
||||||
isMangaFavorite = manga.favorite,
|
isMangaFavorite = manga.favorite,
|
||||||
url = manga.thumbnailUrl,
|
ogUrl = manga.thumbnailUrl,
|
||||||
lastModified = manga.coverLastModified,
|
lastModified = manga.coverLastModified,
|
||||||
),
|
),
|
||||||
coverBadgeStart = {
|
coverBadgeStart = {
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ internal fun LibraryList(
|
|||||||
mangaId = manga.id,
|
mangaId = manga.id,
|
||||||
sourceId = manga.source,
|
sourceId = manga.source,
|
||||||
isMangaFavorite = manga.favorite,
|
isMangaFavorite = manga.favorite,
|
||||||
url = manga.thumbnailUrl,
|
ogUrl = manga.thumbnailUrl,
|
||||||
lastModified = manga.coverLastModified,
|
lastModified = manga.coverLastModified,
|
||||||
),
|
),
|
||||||
badge = {
|
badge = {
|
||||||
|
|||||||
+1
-1
@@ -14,7 +14,7 @@ import androidx.compose.ui.platform.LocalContext
|
|||||||
import androidx.compose.ui.window.DialogProperties
|
import androidx.compose.ui.window.DialogProperties
|
||||||
import exh.favorites.FavoritesSyncStatus
|
import exh.favorites.FavoritesSyncStatus
|
||||||
import kotlinx.coroutines.delay
|
import kotlinx.coroutines.delay
|
||||||
import tachiyomi.core.i18n.stringResource
|
import tachiyomi.core.common.i18n.stringResource
|
||||||
import tachiyomi.domain.manga.model.Manga
|
import tachiyomi.domain.manga.model.Manga
|
||||||
import tachiyomi.i18n.MR
|
import tachiyomi.i18n.MR
|
||||||
import tachiyomi.i18n.sy.SYMR
|
import tachiyomi.i18n.sy.SYMR
|
||||||
|
|||||||
+1
-1
@@ -13,7 +13,7 @@ import androidx.compose.ui.platform.LocalContext
|
|||||||
import androidx.compose.ui.window.DialogProperties
|
import androidx.compose.ui.window.DialogProperties
|
||||||
import androidx.core.text.HtmlCompat
|
import androidx.core.text.HtmlCompat
|
||||||
import exh.util.toAnnotatedString
|
import exh.util.toAnnotatedString
|
||||||
import tachiyomi.core.i18n.stringResource
|
import tachiyomi.core.common.i18n.stringResource
|
||||||
import tachiyomi.i18n.MR
|
import tachiyomi.i18n.MR
|
||||||
import tachiyomi.i18n.sy.SYMR
|
import tachiyomi.i18n.sy.SYMR
|
||||||
import tachiyomi.presentation.core.i18n.stringResource
|
import tachiyomi.presentation.core.i18n.stringResource
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ import eu.kanade.domain.manga.model.forceDownloaded
|
|||||||
import eu.kanade.presentation.components.TabbedDialog
|
import eu.kanade.presentation.components.TabbedDialog
|
||||||
import eu.kanade.presentation.components.TabbedDialogPaddings
|
import eu.kanade.presentation.components.TabbedDialogPaddings
|
||||||
import kotlinx.collections.immutable.persistentListOf
|
import kotlinx.collections.immutable.persistentListOf
|
||||||
import tachiyomi.core.preference.TriState
|
import tachiyomi.core.common.preference.TriState
|
||||||
import tachiyomi.domain.manga.model.Manga
|
import tachiyomi.domain.manga.model.Manga
|
||||||
import tachiyomi.i18n.MR
|
import tachiyomi.i18n.MR
|
||||||
import tachiyomi.presentation.core.components.LabeledCheckbox
|
import tachiyomi.presentation.core.components.LabeledCheckbox
|
||||||
|
|||||||
+2
-2
@@ -10,7 +10,7 @@ import androidx.compose.material.icons.Icons
|
|||||||
import androidx.compose.material.icons.filled.CheckCircle
|
import androidx.compose.material.icons.filled.CheckCircle
|
||||||
import androidx.compose.material.icons.outlined.ArrowDownward
|
import androidx.compose.material.icons.outlined.ArrowDownward
|
||||||
import androidx.compose.material.icons.outlined.ErrorOutline
|
import androidx.compose.material.icons.outlined.ErrorOutline
|
||||||
import androidx.compose.material.ripple.rememberRipple
|
import androidx.compose.material.ripple
|
||||||
import androidx.compose.material3.CircularProgressIndicator
|
import androidx.compose.material3.CircularProgressIndicator
|
||||||
import androidx.compose.material3.DropdownMenuItem
|
import androidx.compose.material3.DropdownMenuItem
|
||||||
import androidx.compose.material3.Icon
|
import androidx.compose.material3.Icon
|
||||||
@@ -255,7 +255,7 @@ private fun Modifier.commonClickable(
|
|||||||
onClick = onClick,
|
onClick = onClick,
|
||||||
role = Role.Button,
|
role = Role.Button,
|
||||||
interactionSource = remember { MutableInteractionSource() },
|
interactionSource = remember { MutableInteractionSource() },
|
||||||
indication = rememberRipple(
|
indication = ripple(
|
||||||
bounded = false,
|
bounded = false,
|
||||||
radius = IconButtonTokens.StateLayerSize / 2,
|
radius = IconButtonTokens.StateLayerSize / 2,
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ import androidx.compose.material.icons.outlined.Label
|
|||||||
import androidx.compose.material.icons.outlined.MoreVert
|
import androidx.compose.material.icons.outlined.MoreVert
|
||||||
import androidx.compose.material.icons.outlined.RemoveDone
|
import androidx.compose.material.icons.outlined.RemoveDone
|
||||||
import androidx.compose.material.icons.outlined.SwapCalls
|
import androidx.compose.material.icons.outlined.SwapCalls
|
||||||
import androidx.compose.material.ripple.rememberRipple
|
import androidx.compose.material.ripple
|
||||||
import androidx.compose.material3.DropdownMenuItem
|
import androidx.compose.material3.DropdownMenuItem
|
||||||
import androidx.compose.material3.Icon
|
import androidx.compose.material3.Icon
|
||||||
import androidx.compose.material3.MaterialTheme
|
import androidx.compose.material3.MaterialTheme
|
||||||
@@ -200,7 +200,7 @@ private fun RowScope.Button(
|
|||||||
.weight(animatedWeight)
|
.weight(animatedWeight)
|
||||||
.combinedClickable(
|
.combinedClickable(
|
||||||
interactionSource = remember { MutableInteractionSource() },
|
interactionSource = remember { MutableInteractionSource() },
|
||||||
indication = rememberRipple(bounded = false),
|
indication = ripple(bounded = false),
|
||||||
onLongClick = onLongClick,
|
onLongClick = onLongClick,
|
||||||
onClick = onClick,
|
onClick = onClick,
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ import eu.kanade.presentation.more.settings.widget.SwitchPreferenceWidget
|
|||||||
import eu.kanade.presentation.more.settings.widget.TextPreferenceWidget
|
import eu.kanade.presentation.more.settings.widget.TextPreferenceWidget
|
||||||
import eu.kanade.tachiyomi.R
|
import eu.kanade.tachiyomi.R
|
||||||
import eu.kanade.tachiyomi.ui.more.DownloadQueueState
|
import eu.kanade.tachiyomi.ui.more.DownloadQueueState
|
||||||
import tachiyomi.core.Constants
|
import tachiyomi.core.common.Constants
|
||||||
import tachiyomi.i18n.MR
|
import tachiyomi.i18n.MR
|
||||||
import tachiyomi.i18n.sy.SYMR
|
import tachiyomi.i18n.sy.SYMR
|
||||||
import tachiyomi.presentation.core.components.ScrollbarLazyColumn
|
import tachiyomi.presentation.core.components.ScrollbarLazyColumn
|
||||||
@@ -78,7 +78,7 @@ fun MoreScreen(
|
|||||||
textRes = MR.strings.fdroid_warning,
|
textRes = MR.strings.fdroid_warning,
|
||||||
modifier = Modifier.clickable {
|
modifier = Modifier.clickable {
|
||||||
uriHandler.openUri(
|
uriHandler.openUri(
|
||||||
"https://tachiyomi.org/docs/faq/general#how-do-i-update-from-the-f-droid-builds",
|
"https://mihon.app/docs/faq/general#how-do-i-update-from-the-f-droid-builds",
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ internal class GuidesStep(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const val GETTING_STARTED_URL = "https://tachiyomi.org/docs/guides/getting-started"
|
const val GETTING_STARTED_URL = "https://mihon.app/docs/guides/getting-started"
|
||||||
|
|
||||||
@PreviewLightDark
|
@PreviewLightDark
|
||||||
@Composable
|
@Composable
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import kotlinx.collections.immutable.ImmutableList
|
|||||||
import kotlinx.collections.immutable.ImmutableMap
|
import kotlinx.collections.immutable.ImmutableMap
|
||||||
import tachiyomi.i18n.MR
|
import tachiyomi.i18n.MR
|
||||||
import tachiyomi.presentation.core.i18n.stringResource
|
import tachiyomi.presentation.core.i18n.stringResource
|
||||||
import tachiyomi.core.preference.Preference as PreferenceData
|
import tachiyomi.core.common.preference.Preference as PreferenceData
|
||||||
|
|
||||||
sealed class Preference {
|
sealed class Preference {
|
||||||
abstract val title: String
|
abstract val title: String
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ import kotlinx.coroutines.Dispatchers
|
|||||||
import kotlinx.coroutines.NonCancellable
|
import kotlinx.coroutines.NonCancellable
|
||||||
import kotlinx.coroutines.delay
|
import kotlinx.coroutines.delay
|
||||||
import kotlinx.coroutines.withContext
|
import kotlinx.coroutines.withContext
|
||||||
import tachiyomi.core.util.lang.launchUI
|
import tachiyomi.core.common.util.lang.launchUI
|
||||||
import tachiyomi.domain.UnsortedPreferences
|
import tachiyomi.domain.UnsortedPreferences
|
||||||
import tachiyomi.i18n.MR
|
import tachiyomi.i18n.MR
|
||||||
import tachiyomi.i18n.sy.SYMR
|
import tachiyomi.i18n.sy.SYMR
|
||||||
|
|||||||
+5
-5
@@ -79,11 +79,11 @@ import kotlinx.coroutines.Job
|
|||||||
import kotlinx.coroutines.launch
|
import kotlinx.coroutines.launch
|
||||||
import logcat.LogPriority
|
import logcat.LogPriority
|
||||||
import okhttp3.Headers
|
import okhttp3.Headers
|
||||||
import tachiyomi.core.i18n.pluralStringResource
|
import tachiyomi.core.common.i18n.pluralStringResource
|
||||||
import tachiyomi.core.i18n.stringResource
|
import tachiyomi.core.common.i18n.stringResource
|
||||||
import tachiyomi.core.util.lang.launchNonCancellable
|
import tachiyomi.core.common.util.lang.launchNonCancellable
|
||||||
import tachiyomi.core.util.lang.withUIContext
|
import tachiyomi.core.common.util.lang.withUIContext
|
||||||
import tachiyomi.core.util.system.logcat
|
import tachiyomi.core.common.util.system.logcat
|
||||||
import tachiyomi.domain.UnsortedPreferences
|
import tachiyomi.domain.UnsortedPreferences
|
||||||
import tachiyomi.domain.chapter.interactor.GetChaptersByMangaId
|
import tachiyomi.domain.chapter.interactor.GetChaptersByMangaId
|
||||||
import tachiyomi.domain.manga.interactor.GetAllManga
|
import tachiyomi.domain.manga.interactor.GetAllManga
|
||||||
|
|||||||
+10
-1
@@ -4,10 +4,12 @@ import androidx.compose.runtime.Composable
|
|||||||
import androidx.compose.runtime.ReadOnlyComposable
|
import androidx.compose.runtime.ReadOnlyComposable
|
||||||
import androidx.compose.runtime.getValue
|
import androidx.compose.runtime.getValue
|
||||||
import androidx.compose.runtime.remember
|
import androidx.compose.runtime.remember
|
||||||
|
import androidx.compose.runtime.rememberCoroutineScope
|
||||||
import androidx.compose.ui.platform.LocalContext
|
import androidx.compose.ui.platform.LocalContext
|
||||||
import androidx.fragment.app.FragmentActivity
|
import androidx.fragment.app.FragmentActivity
|
||||||
import cafe.adriel.voyager.navigator.LocalNavigator
|
import cafe.adriel.voyager.navigator.LocalNavigator
|
||||||
import cafe.adriel.voyager.navigator.currentOrThrow
|
import cafe.adriel.voyager.navigator.currentOrThrow
|
||||||
|
import eu.kanade.core.preference.asState
|
||||||
import eu.kanade.domain.source.service.SourcePreferences
|
import eu.kanade.domain.source.service.SourcePreferences
|
||||||
import eu.kanade.domain.ui.UiPreferences
|
import eu.kanade.domain.ui.UiPreferences
|
||||||
import eu.kanade.presentation.more.settings.Preference
|
import eu.kanade.presentation.more.settings.Preference
|
||||||
@@ -15,7 +17,7 @@ import eu.kanade.presentation.more.settings.screen.browse.ExtensionReposScreen
|
|||||||
import eu.kanade.tachiyomi.ui.category.sources.SourceCategoryScreen
|
import eu.kanade.tachiyomi.ui.category.sources.SourceCategoryScreen
|
||||||
import eu.kanade.tachiyomi.util.system.AuthenticatorUtil.authenticate
|
import eu.kanade.tachiyomi.util.system.AuthenticatorUtil.authenticate
|
||||||
import kotlinx.collections.immutable.persistentListOf
|
import kotlinx.collections.immutable.persistentListOf
|
||||||
import tachiyomi.core.i18n.stringResource
|
import tachiyomi.core.common.i18n.stringResource
|
||||||
import tachiyomi.domain.UnsortedPreferences
|
import tachiyomi.domain.UnsortedPreferences
|
||||||
import tachiyomi.i18n.MR
|
import tachiyomi.i18n.MR
|
||||||
import tachiyomi.i18n.sy.SYMR
|
import tachiyomi.i18n.sy.SYMR
|
||||||
@@ -40,6 +42,8 @@ object SettingsBrowseScreen : SearchableSettings {
|
|||||||
val reposCount by sourcePreferences.extensionRepos().collectAsState()
|
val reposCount by sourcePreferences.extensionRepos().collectAsState()
|
||||||
|
|
||||||
// SY -->
|
// SY -->
|
||||||
|
val scope = rememberCoroutineScope()
|
||||||
|
val hideFeedTab by remember { Injekt.get<UiPreferences>().hideFeedTab().asState(scope) }
|
||||||
val uiPreferences = remember { Injekt.get<UiPreferences>() }
|
val uiPreferences = remember { Injekt.get<UiPreferences>() }
|
||||||
val unsortedPreferences = remember { Injekt.get<UnsortedPreferences>() }
|
val unsortedPreferences = remember { Injekt.get<UnsortedPreferences>() }
|
||||||
// SY <--
|
// SY <--
|
||||||
@@ -78,10 +82,15 @@ object SettingsBrowseScreen : SearchableSettings {
|
|||||||
Preference.PreferenceGroup(
|
Preference.PreferenceGroup(
|
||||||
title = stringResource(SYMR.strings.feed),
|
title = stringResource(SYMR.strings.feed),
|
||||||
preferenceItems = persistentListOf(
|
preferenceItems = persistentListOf(
|
||||||
|
Preference.PreferenceItem.SwitchPreference(
|
||||||
|
pref = uiPreferences.hideFeedTab(),
|
||||||
|
title = stringResource(SYMR.strings.pref_hide_feed),
|
||||||
|
),
|
||||||
Preference.PreferenceItem.SwitchPreference(
|
Preference.PreferenceItem.SwitchPreference(
|
||||||
pref = uiPreferences.feedTabInFront(),
|
pref = uiPreferences.feedTabInFront(),
|
||||||
title = stringResource(SYMR.strings.pref_feed_position),
|
title = stringResource(SYMR.strings.pref_feed_position),
|
||||||
subtitle = stringResource(SYMR.strings.pref_feed_position_summery),
|
subtitle = stringResource(SYMR.strings.pref_feed_position_summery),
|
||||||
|
enabled = hideFeedTab.not()
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
+14
-8
@@ -7,8 +7,11 @@ import android.net.Uri
|
|||||||
import androidx.activity.compose.ManagedActivityResultLauncher
|
import androidx.activity.compose.ManagedActivityResultLauncher
|
||||||
import androidx.activity.compose.rememberLauncherForActivityResult
|
import androidx.activity.compose.rememberLauncherForActivityResult
|
||||||
import androidx.activity.result.contract.ActivityResultContracts
|
import androidx.activity.result.contract.ActivityResultContracts
|
||||||
|
import androidx.compose.foundation.layout.IntrinsicSize
|
||||||
import androidx.compose.foundation.layout.RowScope
|
import androidx.compose.foundation.layout.RowScope
|
||||||
|
import androidx.compose.foundation.layout.fillMaxHeight
|
||||||
import androidx.compose.foundation.layout.fillMaxWidth
|
import androidx.compose.foundation.layout.fillMaxWidth
|
||||||
|
import androidx.compose.foundation.layout.height
|
||||||
import androidx.compose.foundation.layout.padding
|
import androidx.compose.foundation.layout.padding
|
||||||
import androidx.compose.material.icons.Icons
|
import androidx.compose.material.icons.Icons
|
||||||
import androidx.compose.material.icons.automirrored.outlined.HelpOutline
|
import androidx.compose.material.icons.automirrored.outlined.HelpOutline
|
||||||
@@ -48,11 +51,11 @@ import eu.kanade.tachiyomi.util.system.toast
|
|||||||
import kotlinx.collections.immutable.persistentListOf
|
import kotlinx.collections.immutable.persistentListOf
|
||||||
import kotlinx.collections.immutable.persistentMapOf
|
import kotlinx.collections.immutable.persistentMapOf
|
||||||
import logcat.LogPriority
|
import logcat.LogPriority
|
||||||
import tachiyomi.core.i18n.stringResource
|
import tachiyomi.core.common.i18n.stringResource
|
||||||
import tachiyomi.core.storage.displayablePath
|
import tachiyomi.core.common.storage.displayablePath
|
||||||
import tachiyomi.core.util.lang.launchNonCancellable
|
import tachiyomi.core.common.util.lang.launchNonCancellable
|
||||||
import tachiyomi.core.util.lang.withUIContext
|
import tachiyomi.core.common.util.lang.withUIContext
|
||||||
import tachiyomi.core.util.system.logcat
|
import tachiyomi.core.common.util.system.logcat
|
||||||
import tachiyomi.domain.backup.service.BackupPreferences
|
import tachiyomi.domain.backup.service.BackupPreferences
|
||||||
import tachiyomi.domain.library.service.LibraryPreferences
|
import tachiyomi.domain.library.service.LibraryPreferences
|
||||||
import tachiyomi.domain.storage.service.StoragePreferences
|
import tachiyomi.domain.storage.service.StoragePreferences
|
||||||
@@ -66,7 +69,7 @@ import uy.kohesive.injekt.api.get
|
|||||||
object SettingsDataScreen : SearchableSettings {
|
object SettingsDataScreen : SearchableSettings {
|
||||||
|
|
||||||
val restorePreferenceKeyString = MR.strings.label_backup
|
val restorePreferenceKeyString = MR.strings.label_backup
|
||||||
const val HELP_URL = "https://tachiyomi.org/docs/faq/storage"
|
const val HELP_URL = "https://mihon.app/docs/faq/storage"
|
||||||
|
|
||||||
@ReadOnlyComposable
|
@ReadOnlyComposable
|
||||||
@Composable
|
@Composable
|
||||||
@@ -99,7 +102,7 @@ object SettingsDataScreen : SearchableSettings {
|
|||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
fun storageLocationPicker(
|
fun storageLocationPicker(
|
||||||
storageDirPref: tachiyomi.core.preference.Preference<String>,
|
storageDirPref: tachiyomi.core.common.preference.Preference<String>,
|
||||||
): ManagedActivityResultLauncher<Uri?, Uri?> {
|
): ManagedActivityResultLauncher<Uri?, Uri?> {
|
||||||
val context = LocalContext.current
|
val context = LocalContext.current
|
||||||
|
|
||||||
@@ -121,7 +124,7 @@ object SettingsDataScreen : SearchableSettings {
|
|||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
fun storageLocationText(
|
fun storageLocationText(
|
||||||
storageDirPref: tachiyomi.core.preference.Preference<String>,
|
storageDirPref: tachiyomi.core.common.preference.Preference<String>,
|
||||||
): String {
|
): String {
|
||||||
val context = LocalContext.current
|
val context = LocalContext.current
|
||||||
val storageDir by storageDirPref.collectAsState()
|
val storageDir by storageDirPref.collectAsState()
|
||||||
@@ -191,9 +194,11 @@ object SettingsDataScreen : SearchableSettings {
|
|||||||
MultiChoiceSegmentedButtonRow(
|
MultiChoiceSegmentedButtonRow(
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.fillMaxWidth()
|
.fillMaxWidth()
|
||||||
|
.height(intrinsicSize = IntrinsicSize.Min)
|
||||||
.padding(horizontal = PrefsHorizontalPadding),
|
.padding(horizontal = PrefsHorizontalPadding),
|
||||||
) {
|
) {
|
||||||
SegmentedButton(
|
SegmentedButton(
|
||||||
|
modifier = Modifier.fillMaxHeight(),
|
||||||
checked = false,
|
checked = false,
|
||||||
onCheckedChange = { navigator.push(CreateBackupScreen()) },
|
onCheckedChange = { navigator.push(CreateBackupScreen()) },
|
||||||
shape = SegmentedButtonDefaults.itemShape(0, 2),
|
shape = SegmentedButtonDefaults.itemShape(0, 2),
|
||||||
@@ -201,6 +206,7 @@ object SettingsDataScreen : SearchableSettings {
|
|||||||
Text(stringResource(MR.strings.pref_create_backup))
|
Text(stringResource(MR.strings.pref_create_backup))
|
||||||
}
|
}
|
||||||
SegmentedButton(
|
SegmentedButton(
|
||||||
|
modifier = Modifier.fillMaxHeight(),
|
||||||
checked = false,
|
checked = false,
|
||||||
onCheckedChange = {
|
onCheckedChange = {
|
||||||
if (!BackupRestoreJob.isRunning(context)) {
|
if (!BackupRestoreJob.isRunning(context)) {
|
||||||
|
|||||||
@@ -58,12 +58,12 @@ import kotlinx.collections.immutable.persistentListOf
|
|||||||
import kotlinx.collections.immutable.persistentMapOf
|
import kotlinx.collections.immutable.persistentMapOf
|
||||||
import kotlinx.serialization.json.Json
|
import kotlinx.serialization.json.Json
|
||||||
import logcat.LogPriority
|
import logcat.LogPriority
|
||||||
import tachiyomi.core.i18n.pluralStringResource
|
import tachiyomi.core.common.i18n.pluralStringResource
|
||||||
import tachiyomi.core.i18n.stringResource
|
import tachiyomi.core.common.i18n.stringResource
|
||||||
import tachiyomi.core.util.lang.launchNonCancellable
|
import tachiyomi.core.common.util.lang.launchNonCancellable
|
||||||
import tachiyomi.core.util.lang.withIOContext
|
import tachiyomi.core.common.util.lang.withIOContext
|
||||||
import tachiyomi.core.util.lang.withUIContext
|
import tachiyomi.core.common.util.lang.withUIContext
|
||||||
import tachiyomi.core.util.system.logcat
|
import tachiyomi.core.common.util.system.logcat
|
||||||
import tachiyomi.domain.UnsortedPreferences
|
import tachiyomi.domain.UnsortedPreferences
|
||||||
import tachiyomi.domain.library.service.LibraryPreferences.Companion.DEVICE_CHARGING
|
import tachiyomi.domain.library.service.LibraryPreferences.Companion.DEVICE_CHARGING
|
||||||
import tachiyomi.domain.library.service.LibraryPreferences.Companion.DEVICE_ONLY_ON_WIFI
|
import tachiyomi.domain.library.service.LibraryPreferences.Companion.DEVICE_ONLY_ON_WIFI
|
||||||
|
|||||||
@@ -235,6 +235,11 @@ object SettingsLibraryScreen : SearchableSettings {
|
|||||||
pref = libraryPreferences.newShowUpdatesCount(),
|
pref = libraryPreferences.newShowUpdatesCount(),
|
||||||
title = stringResource(MR.strings.pref_library_update_show_tab_badge),
|
title = stringResource(MR.strings.pref_library_update_show_tab_badge),
|
||||||
),
|
),
|
||||||
|
Preference.PreferenceItem.SwitchPreference(
|
||||||
|
pref = libraryPreferences.libraryReadDuplicateChapters(),
|
||||||
|
title = stringResource(MR.strings.pref_library_mark_duplicate_chapters),
|
||||||
|
subtitle = stringResource(MR.strings.pref_library_mark_duplicate_chapters_summary),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
+3
-3
@@ -41,9 +41,9 @@ import exh.md.utils.MdConstants
|
|||||||
import exh.md.utils.MdUtil
|
import exh.md.utils.MdUtil
|
||||||
import kotlinx.collections.immutable.toImmutableMap
|
import kotlinx.collections.immutable.toImmutableMap
|
||||||
import logcat.LogPriority
|
import logcat.LogPriority
|
||||||
import tachiyomi.core.util.lang.launchIO
|
import tachiyomi.core.common.util.lang.launchIO
|
||||||
import tachiyomi.core.util.lang.withUIContext
|
import tachiyomi.core.common.util.lang.withUIContext
|
||||||
import tachiyomi.core.util.system.logcat
|
import tachiyomi.core.common.util.system.logcat
|
||||||
import tachiyomi.domain.UnsortedPreferences
|
import tachiyomi.domain.UnsortedPreferences
|
||||||
import tachiyomi.i18n.MR
|
import tachiyomi.i18n.MR
|
||||||
import tachiyomi.i18n.sy.SYMR
|
import tachiyomi.i18n.sy.SYMR
|
||||||
|
|||||||
+1
-1
@@ -53,7 +53,7 @@ import eu.kanade.tachiyomi.util.system.AuthenticatorUtil.authenticate
|
|||||||
import eu.kanade.tachiyomi.util.system.AuthenticatorUtil.isAuthenticationSupported
|
import eu.kanade.tachiyomi.util.system.AuthenticatorUtil.isAuthenticationSupported
|
||||||
import kotlinx.collections.immutable.persistentListOf
|
import kotlinx.collections.immutable.persistentListOf
|
||||||
import kotlinx.collections.immutable.toImmutableMap
|
import kotlinx.collections.immutable.toImmutableMap
|
||||||
import tachiyomi.core.i18n.stringResource
|
import tachiyomi.core.common.i18n.stringResource
|
||||||
import tachiyomi.i18n.MR
|
import tachiyomi.i18n.MR
|
||||||
import tachiyomi.i18n.sy.SYMR
|
import tachiyomi.i18n.sy.SYMR
|
||||||
import tachiyomi.presentation.core.i18n.pluralStringResource
|
import tachiyomi.presentation.core.i18n.pluralStringResource
|
||||||
|
|||||||
+3
-3
@@ -53,8 +53,8 @@ import eu.kanade.tachiyomi.util.system.openInBrowser
|
|||||||
import eu.kanade.tachiyomi.util.system.toast
|
import eu.kanade.tachiyomi.util.system.toast
|
||||||
import kotlinx.collections.immutable.persistentListOf
|
import kotlinx.collections.immutable.persistentListOf
|
||||||
import kotlinx.collections.immutable.toImmutableList
|
import kotlinx.collections.immutable.toImmutableList
|
||||||
import tachiyomi.core.util.lang.launchIO
|
import tachiyomi.core.common.util.lang.launchIO
|
||||||
import tachiyomi.core.util.lang.withUIContext
|
import tachiyomi.core.common.util.lang.withUIContext
|
||||||
import tachiyomi.domain.source.service.SourceManager
|
import tachiyomi.domain.source.service.SourceManager
|
||||||
import tachiyomi.i18n.MR
|
import tachiyomi.i18n.MR
|
||||||
import tachiyomi.presentation.core.components.material.padding
|
import tachiyomi.presentation.core.components.material.padding
|
||||||
@@ -71,7 +71,7 @@ object SettingsTrackingScreen : SearchableSettings {
|
|||||||
@Composable
|
@Composable
|
||||||
override fun RowScope.AppBarAction() {
|
override fun RowScope.AppBarAction() {
|
||||||
val uriHandler = LocalUriHandler.current
|
val uriHandler = LocalUriHandler.current
|
||||||
IconButton(onClick = { uriHandler.openUri("https://tachiyomi.org/docs/guides/tracking") }) {
|
IconButton(onClick = { uriHandler.openUri("https://mihon.app/docs/guides/tracking") }) {
|
||||||
Icon(
|
Icon(
|
||||||
imageVector = Icons.AutoMirrored.Outlined.HelpOutline,
|
imageVector = Icons.AutoMirrored.Outlined.HelpOutline,
|
||||||
contentDescription = stringResource(MR.strings.tracking_guide),
|
contentDescription = stringResource(MR.strings.tracking_guide),
|
||||||
|
|||||||
@@ -39,9 +39,9 @@ import eu.kanade.tachiyomi.util.system.toast
|
|||||||
import exh.syDebugVersion
|
import exh.syDebugVersion
|
||||||
import kotlinx.coroutines.launch
|
import kotlinx.coroutines.launch
|
||||||
import logcat.LogPriority
|
import logcat.LogPriority
|
||||||
import tachiyomi.core.util.lang.withIOContext
|
import tachiyomi.core.common.util.lang.withIOContext
|
||||||
import tachiyomi.core.util.lang.withUIContext
|
import tachiyomi.core.common.util.lang.withUIContext
|
||||||
import tachiyomi.core.util.system.logcat
|
import tachiyomi.core.common.util.system.logcat
|
||||||
import tachiyomi.domain.release.interactor.GetApplicationRelease
|
import tachiyomi.domain.release.interactor.GetApplicationRelease
|
||||||
import tachiyomi.i18n.MR
|
import tachiyomi.i18n.MR
|
||||||
import tachiyomi.presentation.core.components.LinkIcon
|
import tachiyomi.presentation.core.components.LinkIcon
|
||||||
@@ -156,7 +156,7 @@ object AboutScreen : Screen() {
|
|||||||
// item {
|
// item {
|
||||||
// TextPreferenceWidget(
|
// TextPreferenceWidget(
|
||||||
// title = stringResource(MR.strings.help_translate),
|
// title = stringResource(MR.strings.help_translate),
|
||||||
// onPreferenceClick = { uriHandler.openUri("https://tachiyomi.org/docs/contribute#translation") },
|
// onPreferenceClick = { uriHandler.openUri("https://mihon.app/docs/contribute#translation") },
|
||||||
// )
|
// )
|
||||||
// }
|
// }
|
||||||
|
|
||||||
@@ -170,7 +170,7 @@ object AboutScreen : Screen() {
|
|||||||
item {
|
item {
|
||||||
TextPreferenceWidget(
|
TextPreferenceWidget(
|
||||||
title = stringResource(MR.strings.privacy_policy),
|
title = stringResource(MR.strings.privacy_policy),
|
||||||
onPreferenceClick = { uriHandler.openUri("https://tachiyomi.org/privacy/") },
|
onPreferenceClick = { uriHandler.openUri("https://mihon.app/privacy/") },
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -184,7 +184,7 @@ object AboutScreen : Screen() {
|
|||||||
LinkIcon(
|
LinkIcon(
|
||||||
label = stringResource(MR.strings.website),
|
label = stringResource(MR.strings.website),
|
||||||
icon = Icons.Outlined.Public,
|
icon = Icons.Outlined.Public,
|
||||||
url = "https://tachiyomi.org",
|
url = "https://mihon.app",
|
||||||
)
|
)
|
||||||
LinkIcon(
|
LinkIcon(
|
||||||
label = "Discord",
|
label = "Discord",
|
||||||
|
|||||||
+1
-1
@@ -29,7 +29,7 @@ import nl.adaptivity.xmlutil.AndroidXmlReader
|
|||||||
import nl.adaptivity.xmlutil.serialization.XML
|
import nl.adaptivity.xmlutil.serialization.XML
|
||||||
import nl.adaptivity.xmlutil.serialization.XmlSerialName
|
import nl.adaptivity.xmlutil.serialization.XmlSerialName
|
||||||
import nl.adaptivity.xmlutil.serialization.XmlValue
|
import nl.adaptivity.xmlutil.serialization.XmlValue
|
||||||
import tachiyomi.core.util.lang.withIOContext
|
import tachiyomi.core.common.util.lang.withIOContext
|
||||||
import tachiyomi.i18n.MR
|
import tachiyomi.i18n.MR
|
||||||
import tachiyomi.i18n.sy.SYMR
|
import tachiyomi.i18n.sy.SYMR
|
||||||
import tachiyomi.presentation.core.components.material.padding
|
import tachiyomi.presentation.core.components.material.padding
|
||||||
|
|||||||
+3
-3
@@ -40,9 +40,9 @@ import eu.kanade.tachiyomi.util.system.toast
|
|||||||
import kotlinx.collections.immutable.persistentListOf
|
import kotlinx.collections.immutable.persistentListOf
|
||||||
import kotlinx.coroutines.flow.collectLatest
|
import kotlinx.coroutines.flow.collectLatest
|
||||||
import kotlinx.coroutines.flow.update
|
import kotlinx.coroutines.flow.update
|
||||||
import tachiyomi.core.util.lang.launchIO
|
import tachiyomi.core.common.util.lang.launchIO
|
||||||
import tachiyomi.core.util.lang.launchUI
|
import tachiyomi.core.common.util.lang.launchUI
|
||||||
import tachiyomi.core.util.lang.withNonCancellableContext
|
import tachiyomi.core.common.util.lang.withNonCancellableContext
|
||||||
import tachiyomi.data.Database
|
import tachiyomi.data.Database
|
||||||
import tachiyomi.domain.source.interactor.GetSourcesWithNonLibraryManga
|
import tachiyomi.domain.source.interactor.GetSourcesWithNonLibraryManga
|
||||||
import tachiyomi.domain.source.model.Source
|
import tachiyomi.domain.source.model.Source
|
||||||
|
|||||||
+1
-1
@@ -30,7 +30,7 @@ import eu.kanade.tachiyomi.util.system.LocaleHelper
|
|||||||
import kotlinx.collections.immutable.ImmutableList
|
import kotlinx.collections.immutable.ImmutableList
|
||||||
import kotlinx.collections.immutable.toImmutableList
|
import kotlinx.collections.immutable.toImmutableList
|
||||||
import org.xmlpull.v1.XmlPullParser
|
import org.xmlpull.v1.XmlPullParser
|
||||||
import tachiyomi.core.i18n.stringResource
|
import tachiyomi.core.common.i18n.stringResource
|
||||||
import tachiyomi.i18n.MR
|
import tachiyomi.i18n.MR
|
||||||
import tachiyomi.presentation.core.components.material.Scaffold
|
import tachiyomi.presentation.core.components.material.Scaffold
|
||||||
import tachiyomi.presentation.core.i18n.stringResource
|
import tachiyomi.presentation.core.i18n.stringResource
|
||||||
|
|||||||
+1
-1
@@ -13,7 +13,7 @@ import kotlinx.coroutines.channels.Channel
|
|||||||
import kotlinx.coroutines.flow.collectLatest
|
import kotlinx.coroutines.flow.collectLatest
|
||||||
import kotlinx.coroutines.flow.receiveAsFlow
|
import kotlinx.coroutines.flow.receiveAsFlow
|
||||||
import kotlinx.coroutines.flow.update
|
import kotlinx.coroutines.flow.update
|
||||||
import tachiyomi.core.util.lang.launchIO
|
import tachiyomi.core.common.util.lang.launchIO
|
||||||
import tachiyomi.i18n.MR
|
import tachiyomi.i18n.MR
|
||||||
import uy.kohesive.injekt.Injekt
|
import uy.kohesive.injekt.Injekt
|
||||||
import uy.kohesive.injekt.api.get
|
import uy.kohesive.injekt.api.get
|
||||||
|
|||||||
+1
-1
@@ -48,7 +48,7 @@ import eu.kanade.presentation.manga.components.MangaCover
|
|||||||
import eu.kanade.presentation.theme.TachiyomiTheme
|
import eu.kanade.presentation.theme.TachiyomiTheme
|
||||||
import eu.kanade.tachiyomi.util.system.DeviceUtil
|
import eu.kanade.tachiyomi.util.system.DeviceUtil
|
||||||
import eu.kanade.tachiyomi.util.system.isDynamicColorAvailable
|
import eu.kanade.tachiyomi.util.system.isDynamicColorAvailable
|
||||||
import tachiyomi.core.preference.InMemoryPreferenceStore
|
import tachiyomi.core.common.preference.InMemoryPreferenceStore
|
||||||
import tachiyomi.i18n.MR
|
import tachiyomi.i18n.MR
|
||||||
import tachiyomi.presentation.core.components.material.padding
|
import tachiyomi.presentation.core.components.material.padding
|
||||||
import tachiyomi.presentation.core.i18n.stringResource
|
import tachiyomi.presentation.core.i18n.stringResource
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ import androidx.compose.runtime.setValue
|
|||||||
import androidx.compose.ui.Modifier
|
import androidx.compose.ui.Modifier
|
||||||
import androidx.compose.ui.graphics.Color
|
import androidx.compose.ui.graphics.Color
|
||||||
import kotlinx.coroutines.delay
|
import kotlinx.coroutines.delay
|
||||||
|
import kotlin.time.Duration.Companion.seconds
|
||||||
|
|
||||||
@Stable
|
@Stable
|
||||||
class DisplayRefreshHost {
|
class DisplayRefreshHost {
|
||||||
@@ -30,15 +31,15 @@ fun DisplayRefreshHost(
|
|||||||
val currentDisplayRefresh = hostState.currentDisplayRefresh
|
val currentDisplayRefresh = hostState.currentDisplayRefresh
|
||||||
LaunchedEffect(currentDisplayRefresh) {
|
LaunchedEffect(currentDisplayRefresh) {
|
||||||
if (currentDisplayRefresh) {
|
if (currentDisplayRefresh) {
|
||||||
delay(1500)
|
delay(1.5.seconds)
|
||||||
hostState.currentDisplayRefresh = false
|
hostState.currentDisplayRefresh = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (currentDisplayRefresh) {
|
Canvas(
|
||||||
Canvas(
|
modifier = modifier.fillMaxSize(),
|
||||||
modifier = modifier.fillMaxSize(),
|
) {
|
||||||
) {
|
if (currentDisplayRefresh) {
|
||||||
drawRect(Color.Black)
|
drawRect(Color.Black)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import androidx.core.graphics.green
|
|||||||
import androidx.core.graphics.red
|
import androidx.core.graphics.red
|
||||||
import eu.kanade.tachiyomi.ui.reader.setting.ReaderPreferences.Companion.ColorFilterMode
|
import eu.kanade.tachiyomi.ui.reader.setting.ReaderPreferences.Companion.ColorFilterMode
|
||||||
import eu.kanade.tachiyomi.ui.reader.setting.ReaderSettingsScreenModel
|
import eu.kanade.tachiyomi.ui.reader.setting.ReaderSettingsScreenModel
|
||||||
import tachiyomi.core.preference.getAndSet
|
import tachiyomi.core.common.preference.getAndSet
|
||||||
import tachiyomi.i18n.MR
|
import tachiyomi.i18n.MR
|
||||||
import tachiyomi.presentation.core.components.CheckboxItem
|
import tachiyomi.presentation.core.components.CheckboxItem
|
||||||
import tachiyomi.presentation.core.components.SettingsChipRow
|
import tachiyomi.presentation.core.components.SettingsChipRow
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ internal fun ColumnScope.GeneralPage(screenModel: ReaderSettingsScreenModel) {
|
|||||||
pref = screenModel.preferences.fullscreen(),
|
pref = screenModel.preferences.fullscreen(),
|
||||||
)
|
)
|
||||||
|
|
||||||
if (screenModel.hasDisplayCutout) {
|
if (screenModel.hasDisplayCutout && screenModel.preferences.fullscreen().get()) {
|
||||||
CheckboxItem(
|
CheckboxItem(
|
||||||
label = stringResource(MR.strings.pref_cutout_short),
|
label = stringResource(MR.strings.pref_cutout_short),
|
||||||
pref = screenModel.preferences.cutoutShort(),
|
pref = screenModel.preferences.cutoutShort(),
|
||||||
|
|||||||
@@ -88,7 +88,7 @@ fun TrackInfoDialogHome(
|
|||||||
TrackInfoItem(
|
TrackInfoItem(
|
||||||
title = item.track.title,
|
title = item.track.title,
|
||||||
tracker = item.tracker,
|
tracker = item.tracker,
|
||||||
status = item.tracker.getStatus(item.track.status.toInt()),
|
status = item.tracker.getStatus(item.track.status),
|
||||||
onStatusClick = { onStatusClick(item) },
|
onStatusClick = { onStatusClick(item) },
|
||||||
chapters = "${item.track.lastChapterRead.toInt()}".let {
|
chapters = "${item.track.lastChapterRead.toInt()}".let {
|
||||||
val totalChapters = item.track.totalChapters
|
val totalChapters = item.track.totalChapters
|
||||||
|
|||||||
@@ -48,9 +48,9 @@ import tachiyomi.presentation.core.util.isScrolledToStart
|
|||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
fun TrackStatusSelector(
|
fun TrackStatusSelector(
|
||||||
selection: Int,
|
selection: Long,
|
||||||
onSelectionChange: (Int) -> Unit,
|
onSelectionChange: (Long) -> Unit,
|
||||||
selections: Map<Int, StringResource?>,
|
selections: Map<Long, StringResource?>,
|
||||||
onConfirm: () -> Unit,
|
onConfirm: () -> Unit,
|
||||||
onDismissRequest: () -> Unit,
|
onDismissRequest: () -> Unit,
|
||||||
) {
|
) {
|
||||||
@@ -236,12 +236,12 @@ private fun TrackStatusSelectorPreviews() {
|
|||||||
onSelectionChange = {},
|
onSelectionChange = {},
|
||||||
selections = persistentMapOf(
|
selections = persistentMapOf(
|
||||||
// Anilist values
|
// Anilist values
|
||||||
1 to MR.strings.reading,
|
1L to MR.strings.reading,
|
||||||
2 to MR.strings.plan_to_read,
|
2L to MR.strings.plan_to_read,
|
||||||
3 to MR.strings.completed,
|
3L to MR.strings.completed,
|
||||||
4 to MR.strings.on_hold,
|
4L to MR.strings.on_hold,
|
||||||
5 to MR.strings.dropped,
|
5L to MR.strings.dropped,
|
||||||
6 to MR.strings.repeating,
|
6L to MR.strings.repeating,
|
||||||
),
|
),
|
||||||
onConfirm = {},
|
onConfirm = {},
|
||||||
onDismissRequest = {},
|
onDismissRequest = {},
|
||||||
|
|||||||
@@ -301,7 +301,7 @@ private fun SearchResultItem(
|
|||||||
text = status,
|
text = status,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
if (trackSearch.score != -1f) {
|
if (trackSearch.score != -1.0) {
|
||||||
SearchResultItemDetails(
|
SearchResultItemDetails(
|
||||||
title = stringResource(MR.strings.score),
|
title = stringResource(MR.strings.score),
|
||||||
text = trackSearch.score.toString(),
|
text = trackSearch.score.toString(),
|
||||||
|
|||||||
@@ -62,14 +62,14 @@ internal class TrackerSearchPreviewProvider : PreviewParameterProvider<@Composab
|
|||||||
private fun randTrackSearch() = TrackSearch().let {
|
private fun randTrackSearch() = TrackSearch().let {
|
||||||
it.id = Random.nextLong()
|
it.id = Random.nextLong()
|
||||||
it.manga_id = Random.nextLong()
|
it.manga_id = Random.nextLong()
|
||||||
it.tracker_id = Random.nextInt()
|
it.tracker_id = Random.nextLong()
|
||||||
it.remote_id = Random.nextLong()
|
it.remote_id = Random.nextLong()
|
||||||
it.library_id = Random.nextLong()
|
it.library_id = Random.nextLong()
|
||||||
it.title = lorem((1..10).random()).joinToString()
|
it.title = lorem((1..10).random()).joinToString()
|
||||||
it.last_chapter_read = (0..100).random().toFloat()
|
it.last_chapter_read = (0..100).random().toDouble()
|
||||||
it.total_chapters = (100..1000).random()
|
it.total_chapters = (100L..1000L).random()
|
||||||
it.score = (0..10).random().toFloat()
|
it.score = (0..10).random().toDouble()
|
||||||
it.status = Random.nextInt()
|
it.status = Random.nextLong()
|
||||||
it.started_reading_date = 0L
|
it.started_reading_date = 0L
|
||||||
it.finished_reading_date = 0L
|
it.finished_reading_date = 0L
|
||||||
it.tracking_url = "https://example.com/tracker-example"
|
it.tracking_url = "https://example.com/tracker-example"
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import android.content.Context
|
|||||||
import eu.kanade.tachiyomi.network.HttpException
|
import eu.kanade.tachiyomi.network.HttpException
|
||||||
import eu.kanade.tachiyomi.source.online.LicensedMangaChaptersException
|
import eu.kanade.tachiyomi.source.online.LicensedMangaChaptersException
|
||||||
import eu.kanade.tachiyomi.util.system.isOnline
|
import eu.kanade.tachiyomi.util.system.isOnline
|
||||||
import tachiyomi.core.i18n.stringResource
|
import tachiyomi.core.common.i18n.stringResource
|
||||||
import tachiyomi.data.source.NoResultsException
|
import tachiyomi.data.source.NoResultsException
|
||||||
import tachiyomi.domain.source.model.SourceNotInstalledException
|
import tachiyomi.domain.source.model.SourceNotInstalledException
|
||||||
import tachiyomi.i18n.MR
|
import tachiyomi.i18n.MR
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import android.content.Context
|
|||||||
import android.text.format.DateUtils
|
import android.text.format.DateUtils
|
||||||
import androidx.compose.runtime.Composable
|
import androidx.compose.runtime.Composable
|
||||||
import androidx.compose.runtime.ReadOnlyComposable
|
import androidx.compose.runtime.ReadOnlyComposable
|
||||||
import tachiyomi.core.i18n.stringResource
|
import tachiyomi.core.common.i18n.stringResource
|
||||||
import tachiyomi.i18n.MR
|
import tachiyomi.i18n.MR
|
||||||
import tachiyomi.presentation.core.i18n.stringResource
|
import tachiyomi.presentation.core.i18n.stringResource
|
||||||
import java.time.Instant
|
import java.time.Instant
|
||||||
|
|||||||
@@ -175,7 +175,7 @@ fun WebViewScreenContent(
|
|||||||
.clip(MaterialTheme.shapes.small)
|
.clip(MaterialTheme.shapes.small)
|
||||||
.clickable {
|
.clickable {
|
||||||
uriHandler.openUri(
|
uriHandler.openUri(
|
||||||
"https://tachiyomi.org/docs/guides/troubleshooting/#cloudflare",
|
"https://mihon.app/docs/guides/troubleshooting/#cloudflare",
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -69,8 +69,8 @@ import kotlinx.coroutines.flow.onEach
|
|||||||
import logcat.LogPriority
|
import logcat.LogPriority
|
||||||
import logcat.LogcatLogger
|
import logcat.LogcatLogger
|
||||||
import org.conscrypt.Conscrypt
|
import org.conscrypt.Conscrypt
|
||||||
import tachiyomi.core.i18n.stringResource
|
import tachiyomi.core.common.i18n.stringResource
|
||||||
import tachiyomi.core.util.system.logcat
|
import tachiyomi.core.common.util.system.logcat
|
||||||
import tachiyomi.domain.storage.service.StorageManager
|
import tachiyomi.domain.storage.service.StorageManager
|
||||||
import tachiyomi.i18n.MR
|
import tachiyomi.i18n.MR
|
||||||
import tachiyomi.presentation.widget.WidgetManager
|
import tachiyomi.presentation.widget.WidgetManager
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user