Compare commits
35 Commits
Author | SHA1 | Date | |
---|---|---|---|
6018aa99e2 | |||
99fd2731f5 | |||
e34043f1fe | |||
3c3a1cd448 | |||
0a2df21c5b | |||
277be02682 | |||
1849715418 | |||
dc6d4f9917 | |||
a9d98e5048 | |||
653940613d | |||
23a2d816e4 | |||
8a3a9146db | |||
a605a4ec75 | |||
c83037eeab | |||
25c76f5612 | |||
0d449a9b1d | |||
62cb12a3f1 | |||
9ec4dc5758 | |||
f594f1994b | |||
96b85962e3 | |||
f77e0e2d00 | |||
ce60ac150b | |||
19afd8c9ca | |||
5067160132 | |||
c9906491fb | |||
e51013d2a4 | |||
1aa75f22d0 | |||
8c910f2a2c | |||
dfb3091e38 | |||
98bdef230a | |||
4b594fc11f | |||
71931cf697 | |||
87e3525f88 | |||
a9c7cbf2c4 | |||
e63a52b8e3 |
1
.github/FUNDING.yml
vendored
@ -1 +0,0 @@
|
|||||||
ko_fi: inorichi
|
|
2
.github/ISSUE_TEMPLATE.md
vendored
@ -5,7 +5,7 @@ I acknowledge that:
|
|||||||
- I have updated:
|
- I have updated:
|
||||||
- To the latest version of the app (stable is v0.15.3)
|
- To the latest version of the app (stable is v0.15.3)
|
||||||
- All extensions
|
- All extensions
|
||||||
- I have gone through the FAQ (https://tachiyomi.org/docs/faq/general) and troubleshooting guide (https://tachiyomi.org/docs/guides/troubleshooting/)
|
- I have gone through the FAQ (https://mihon.app/docs/faq/general) and troubleshooting guide (https://mihon.app/docs/guides/troubleshooting/)
|
||||||
- If this is an issue with an official extension, that I should be opening an issue in https://github.com/tachiyomiorg/extensions
|
- If this is an issue with an official extension, that I should be opening an issue in https://github.com/tachiyomiorg/extensions
|
||||||
- I have searched the existing issues and this is new ticket **NOT** a duplicate or related to another open or closed issue
|
- 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
|
- I will fill out the title and the information in this template
|
||||||
|
8
.github/ISSUE_TEMPLATE/config.yml
vendored
@ -3,9 +3,9 @@ contact_links:
|
|||||||
- name: ⚠️ Extension/source issue
|
- name: ⚠️ Extension/source issue
|
||||||
url: https://github.com/tachiyomiorg/extensions/issues/new/choose
|
url: https://github.com/tachiyomiorg/extensions/issues/new/choose
|
||||||
about: Issues and requests for official extensions and sources should be opened in the extensions repository instead
|
about: Issues and requests for official extensions and sources should be opened in the extensions repository instead
|
||||||
- name: 📦 Tachiyomi extensions
|
- name: 📦 Mihon extensions
|
||||||
url: https://tachiyomi.org/extensions/
|
url: https://mihon.app/extensions/
|
||||||
about: List of all available extensions with download links
|
about: List of all available extensions with download 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
|
||||||
|
14
.github/ISSUE_TEMPLATE/report_issue.yml
vendored
@ -1,5 +1,5 @@
|
|||||||
name: 🐞 Issue report
|
name: 🐞 Issue report
|
||||||
description: Report an issue in Tachiyomi
|
description: Report an issue in Mihon
|
||||||
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: mihon-version
|
||||||
attributes:
|
attributes:
|
||||||
label: Tachiyomi version
|
label: Mihon version
|
||||||
description: You can find your Tachiyomi version in **More → About**.
|
description: You can find your Mihon version in **More → About**.
|
||||||
placeholder: |
|
placeholder: |
|
||||||
Example: "0.15.3"
|
Example: "0.16.1"
|
||||||
validations:
|
validations:
|
||||||
required: true
|
required: true
|
||||||
|
|
||||||
@ -96,9 +96,9 @@ body:
|
|||||||
required: true
|
required: true
|
||||||
- label: If this is an issue with an official extension, I should be opening an issue in the [extensions repository](https://github.com/tachiyomiorg/extensions/issues/new/choose).
|
- label: If this is an issue with an official extension, I should be opening an issue in the [extensions repository](https://github.com/tachiyomiorg/extensions/issues/new/choose).
|
||||||
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 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 updated the app to version **[0.15.3](https://github.com/tachiyomiorg/tachiyomi/releases/latest)**.
|
- label: I have updated the app to version **[0.16.1](https://github.com/mihonapp/mihon/releases/latest)**.
|
||||||
required: true
|
required: true
|
||||||
- label: I have updated all installed extensions.
|
- label: I have updated all installed extensions.
|
||||||
required: true
|
required: true
|
||||||
|
6
.github/ISSUE_TEMPLATE/request_feature.yml
vendored
@ -1,5 +1,5 @@
|
|||||||
name: ⭐ Feature request
|
name: ⭐ Feature request
|
||||||
description: Suggest a feature to improve Tachiyomi
|
description: Suggest a feature to improve Mihon
|
||||||
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 Mihon be improved?
|
||||||
placeholder: |
|
placeholder: |
|
||||||
Example:
|
Example:
|
||||||
"It should work like this..."
|
"It should work like this..."
|
||||||
@ -33,7 +33,7 @@ body:
|
|||||||
required: true
|
required: true
|
||||||
- label: If this is an issue with an official extension, I should be opening an issue in the [extensions repository](https://github.com/tachiyomiorg/extensions/issues/new/choose).
|
- label: If this is an issue with an official extension, I should be opening an issue in the [extensions repository](https://github.com/tachiyomiorg/extensions/issues/new/choose).
|
||||||
required: true
|
required: true
|
||||||
- label: I have updated the app to version **[0.15.3](https://github.com/tachiyomiorg/tachiyomi/releases/latest)**.
|
- label: I have updated the app to version **[0.16.1](https://github.com/mihonapp/mihon/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
|
||||||
|
BIN
.github/readme-images/app-icon.png
vendored
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 736 B |
60
.github/workflows/build_push.yml
vendored
@ -2,7 +2,7 @@ name: CI
|
|||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- main
|
||||||
tags:
|
tags:
|
||||||
- v*
|
- v*
|
||||||
|
|
||||||
@ -22,6 +22,10 @@ jobs:
|
|||||||
- name: Validate Gradle Wrapper
|
- name: Validate Gradle Wrapper
|
||||||
uses: gradle/wrapper-validation-action@v1
|
uses: gradle/wrapper-validation-action@v1
|
||||||
|
|
||||||
|
- name: Setup Android SDK
|
||||||
|
run: |
|
||||||
|
${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager "build-tools;29.0.3"
|
||||||
|
|
||||||
- name: Set up JDK
|
- name: Set up JDK
|
||||||
uses: actions/setup-java@v4
|
uses: actions/setup-java@v4
|
||||||
with:
|
with:
|
||||||
@ -36,13 +40,13 @@ jobs:
|
|||||||
# Sign APK and create release for tags
|
# Sign APK and create release for tags
|
||||||
|
|
||||||
- name: Get tag name
|
- name: Get tag name
|
||||||
if: startsWith(github.ref, 'refs/tags/') && github.repository == 'tachiyomiorg/tachiyomi'
|
if: startsWith(github.ref, 'refs/tags/') && github.repository == 'mihonapp/mihon'
|
||||||
run: |
|
run: |
|
||||||
set -x
|
set -x
|
||||||
echo "VERSION_TAG=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV
|
echo "VERSION_TAG=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Sign APK
|
- name: Sign APK
|
||||||
if: startsWith(github.ref, 'refs/tags/') && github.repository == 'tachiyomiorg/tachiyomi'
|
if: startsWith(github.ref, 'refs/tags/') && github.repository == 'mihonapp/mihon'
|
||||||
uses: r0adkll/sign-android-release@v1
|
uses: r0adkll/sign-android-release@v1
|
||||||
with:
|
with:
|
||||||
releaseDirectory: app/build/outputs/apk/standard/release
|
releaseDirectory: app/build/outputs/apk/standard/release
|
||||||
@ -52,36 +56,36 @@ jobs:
|
|||||||
keyPassword: ${{ secrets.KEY_PASSWORD }}
|
keyPassword: ${{ secrets.KEY_PASSWORD }}
|
||||||
|
|
||||||
- name: Clean up build artifacts
|
- name: Clean up build artifacts
|
||||||
if: startsWith(github.ref, 'refs/tags/') && github.repository == 'tachiyomiorg/tachiyomi'
|
if: startsWith(github.ref, 'refs/tags/') && github.repository == 'mihonapp/mihon'
|
||||||
run: |
|
run: |
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
mv app/build/outputs/apk/standard/release/app-standard-universal-release-unsigned-signed.apk tachiyomi-${{ env.VERSION_TAG }}.apk
|
mv app/build/outputs/apk/standard/release/app-standard-universal-release-unsigned-signed.apk mihon-${{ env.VERSION_TAG }}.apk
|
||||||
sha=`sha256sum tachiyomi-${{ env.VERSION_TAG }}.apk | awk '{ print $1 }'`
|
sha=`sha256sum mihon-${{ env.VERSION_TAG }}.apk | awk '{ print $1 }'`
|
||||||
echo "APK_UNIVERSAL_SHA=$sha" >> $GITHUB_ENV
|
echo "APK_UNIVERSAL_SHA=$sha" >> $GITHUB_ENV
|
||||||
|
|
||||||
cp app/build/outputs/apk/standard/release/app-standard-arm64-v8a-release-unsigned-signed.apk tachiyomi-arm64-v8a-${{ env.VERSION_TAG }}.apk
|
cp app/build/outputs/apk/standard/release/app-standard-arm64-v8a-release-unsigned-signed.apk mihon-arm64-v8a-${{ env.VERSION_TAG }}.apk
|
||||||
sha=`sha256sum tachiyomi-arm64-v8a-${{ env.VERSION_TAG }}.apk | awk '{ print $1 }'`
|
sha=`sha256sum mihon-arm64-v8a-${{ env.VERSION_TAG }}.apk | awk '{ print $1 }'`
|
||||||
echo "APK_ARM64_V8A_SHA=$sha" >> $GITHUB_ENV
|
echo "APK_ARM64_V8A_SHA=$sha" >> $GITHUB_ENV
|
||||||
|
|
||||||
cp app/build/outputs/apk/standard/release/app-standard-armeabi-v7a-release-unsigned-signed.apk tachiyomi-armeabi-v7a-${{ env.VERSION_TAG }}.apk
|
cp app/build/outputs/apk/standard/release/app-standard-armeabi-v7a-release-unsigned-signed.apk mihon-armeabi-v7a-${{ env.VERSION_TAG }}.apk
|
||||||
sha=`sha256sum tachiyomi-armeabi-v7a-${{ env.VERSION_TAG }}.apk | awk '{ print $1 }'`
|
sha=`sha256sum mihon-armeabi-v7a-${{ env.VERSION_TAG }}.apk | awk '{ print $1 }'`
|
||||||
echo "APK_ARMEABI_V7A_SHA=$sha" >> $GITHUB_ENV
|
echo "APK_ARMEABI_V7A_SHA=$sha" >> $GITHUB_ENV
|
||||||
|
|
||||||
cp app/build/outputs/apk/standard/release/app-standard-x86-release-unsigned-signed.apk tachiyomi-x86-${{ env.VERSION_TAG }}.apk
|
cp app/build/outputs/apk/standard/release/app-standard-x86-release-unsigned-signed.apk mihon-x86-${{ env.VERSION_TAG }}.apk
|
||||||
sha=`sha256sum tachiyomi-x86-${{ env.VERSION_TAG }}.apk | awk '{ print $1 }'`
|
sha=`sha256sum mihon-x86-${{ env.VERSION_TAG }}.apk | awk '{ print $1 }'`
|
||||||
echo "APK_X86_SHA=$sha" >> $GITHUB_ENV
|
echo "APK_X86_SHA=$sha" >> $GITHUB_ENV
|
||||||
|
|
||||||
cp app/build/outputs/apk/standard/release/app-standard-x86_64-release-unsigned-signed.apk tachiyomi-x86_64-${{ env.VERSION_TAG }}.apk
|
cp app/build/outputs/apk/standard/release/app-standard-x86_64-release-unsigned-signed.apk mihon-x86_64-${{ env.VERSION_TAG }}.apk
|
||||||
sha=`sha256sum tachiyomi-x86_64-${{ env.VERSION_TAG }}.apk | awk '{ print $1 }'`
|
sha=`sha256sum mihon-x86_64-${{ env.VERSION_TAG }}.apk | awk '{ print $1 }'`
|
||||||
echo "APK_X86_64_SHA=$sha" >> $GITHUB_ENV
|
echo "APK_X86_64_SHA=$sha" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Create Release
|
- name: Create Release
|
||||||
if: startsWith(github.ref, 'refs/tags/') && github.repository == 'tachiyomiorg/tachiyomi'
|
if: startsWith(github.ref, 'refs/tags/') && github.repository == 'mihonapp/mihon'
|
||||||
uses: softprops/action-gh-release@v1
|
uses: softprops/action-gh-release@v1
|
||||||
with:
|
with:
|
||||||
tag_name: ${{ env.VERSION_TAG }}
|
tag_name: ${{ env.VERSION_TAG }}
|
||||||
name: Tachiyomi ${{ env.VERSION_TAG }}
|
name: Mihon ${{ env.VERSION_TAG }}
|
||||||
body: |
|
body: |
|
||||||
---
|
---
|
||||||
|
|
||||||
@ -94,23 +98,15 @@ 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 mihon-${{ env.VERSION_TAG }}.apk
|
||||||
files: |
|
files: |
|
||||||
tachiyomi-${{ env.VERSION_TAG }}.apk
|
mihon-${{ env.VERSION_TAG }}.apk
|
||||||
tachiyomi-arm64-v8a-${{ env.VERSION_TAG }}.apk
|
mihon-arm64-v8a-${{ env.VERSION_TAG }}.apk
|
||||||
tachiyomi-armeabi-v7a-${{ env.VERSION_TAG }}.apk
|
mihon-armeabi-v7a-${{ env.VERSION_TAG }}.apk
|
||||||
tachiyomi-x86-${{ env.VERSION_TAG }}.apk
|
mihon-x86-${{ env.VERSION_TAG }}.apk
|
||||||
tachiyomi-x86_64-${{ env.VERSION_TAG }}.apk
|
mihon-x86_64-${{ env.VERSION_TAG }}.apk
|
||||||
draft: true
|
draft: true
|
||||||
prerelease: false
|
prerelease: false
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.PAT }}
|
||||||
|
|
||||||
update-website:
|
|
||||||
needs: [build]
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
if: startsWith(github.ref, 'refs/tags/') && github.repository == 'tachiyomiorg/tachiyomi'
|
|
||||||
steps:
|
|
||||||
- name: Trigger Netlify build hook
|
|
||||||
run: curl -s -X POST -d {} "https://api.netlify.com/build_hooks/${TOKEN}"
|
|
||||||
env:
|
|
||||||
TOKEN: ${{ secrets.NETLIFY_HOOK_RELEASE }}
|
|
||||||
|
2
.github/workflows/issue_moderator.yml
vendored
@ -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
|
||||||
|
BIN
.idea/icon.png
generated
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 26 KiB |
@ -59,7 +59,8 @@ representative at an online or offline event.
|
|||||||
## Enforcement
|
## Enforcement
|
||||||
|
|
||||||
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
||||||
reported to the community moderators via issues.
|
reported to the community moderators responsible for enforcement at
|
||||||
|
the [Mihon Discord server](https://discord.gg/mihon).
|
||||||
All complaints will be reviewed and investigated promptly and fairly.
|
All complaints will be reviewed and investigated promptly and fairly.
|
||||||
|
|
||||||
All community moderators are obligated to respect the privacy and security of the
|
All community moderators are obligated to respect the privacy and security of the
|
||||||
|
@ -1,15 +1,15 @@
|
|||||||
Looking to report an issue/bug or make a feature request? Please refer to the [README file](https://github.com/tachiyomiorg/tachiyomi#issues-feature-requests-and-contributing).
|
Looking to report an issue/bug or make a feature request? Please refer to the [README file](https://github.com/mihonapp/mihon#issues-feature-requests-and-contributing).
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
Thanks for your interest in contributing to Tachiyomi!
|
Thanks for your interest in contributing to Mihon!
|
||||||
|
|
||||||
|
|
||||||
# Code contributions
|
# Code contributions
|
||||||
|
|
||||||
Pull requests are welcome!
|
Pull requests are welcome!
|
||||||
|
|
||||||
If you're interested in taking on [an open issue](https://github.com/tachiyomiorg/tachiyomi/issues), please comment on it so others are aware.
|
If you're interested in taking on [an open issue](https://github.com/mihonapp/mihon/issues), please comment on it so others are aware.
|
||||||
You do not need to ask for permission nor an assignment.
|
You do not need to ask for permission nor an assignment.
|
||||||
|
|
||||||
## Prerequisites
|
## Prerequisites
|
||||||
@ -30,25 +30,24 @@ To auto-fix some linting errors, run the `ktlintFormat` Gradle task.
|
|||||||
|
|
||||||
## Getting help
|
## Getting help
|
||||||
|
|
||||||
No support is currently provided.
|
- Join [the Discord server](https://discord.gg/mihon) for online help and to ask questions while developing.
|
||||||
|
|
||||||
# Translations
|
# Translations
|
||||||
|
|
||||||
Translations are done externally via Weblate. See [our website](https://tachiyomi.org/docs/contribute#translation) for more details.
|
Translations are done externally via Weblate. See [our website](https://mihon.app/docs/contribute#translation) for more details.
|
||||||
|
|
||||||
|
|
||||||
# Forks
|
# Forks
|
||||||
|
|
||||||
Forks are allowed so long as they abide by [the project's LICENSE](https://github.com/tachiyomiorg/tachiyomi/blob/master/LICENSE).
|
Forks are allowed so long as they abide by [the project's LICENSE](https://github.com/mihonapp/mihon/blob/main/LICENSE).
|
||||||
|
|
||||||
When creating a fork, remember to:
|
When creating a fork, remember to:
|
||||||
|
|
||||||
- To avoid confusion with the main app:
|
- To avoid confusion with the main app:
|
||||||
- Change the app name
|
- Change the app name
|
||||||
- Change the app icon
|
- Change the app icon
|
||||||
- Change or disable the [app update checker](https://github.com/tachiyomiorg/tachiyomi/blob/master/app/src/main/java/eu/kanade/tachiyomi/data/updater/AppUpdateChecker.kt)
|
- Change or disable the [app update checker](https://github.com/mihonapp/mihon/blob/main/app/src/main/java/eu/kanade/tachiyomi/data/updater/AppUpdateChecker.kt)
|
||||||
- To avoid installation conflicts:
|
- To avoid installation conflicts:
|
||||||
- Change the `applicationId` in [`build.gradle.kts`](https://github.com/tachiyomiorg/tachiyomi/blob/master/app/build.gradle.kts)
|
- Change the `applicationId` in [`build.gradle.kts`](https://github.com/mihonapp/mihon/blob/main/app/build.gradle.kts)
|
||||||
- To avoid having your data polluting the main app's analytics and crash report services:
|
- To avoid having your data polluting the main app's analytics and crash report services:
|
||||||
- If you want to use Firebase analytics, replace [`google-services.json`](https://github.com/tachiyomiorg/tachiyomi/blob/master/app/src/standard/google-services.json) with your own
|
- If you want to use Firebase analytics, replace [`google-services.json`](https://github.com/mihonapp/mihon/blob/main/app/src/standard/google-services.json) with your own
|
||||||
- If you want to use ACRA crash reporting, replace the `ACRA_URI` endpoint in [`build.gradle.kts`](https://github.com/tachiyomiorg/tachiyomi/blob/master/app/build.gradle.kts) with your own
|
|
||||||
|
26
README.md
@ -1,9 +1,9 @@
|
|||||||
| Build | Stable | Weekly Preview | Contribute |
|
| Build | Stable | Weekly Beta | Support Server |
|
||||||
|-------|--------|----------------|------------|
|
|-------|--------|-------------|----------------|
|
||||||
| [](https://github.com/tachiyomiorg/tachiyomi/actions/workflows/build_push.yml) | [](https://github.com/tachiyomiorg/tachiyomi/releases) | [](https://github.com/tachiyomiorg/tachiyomi-preview/releases) | [](https://hosted.weblate.org/engage/tachiyomi/?utm_source=widget) |
|
| [](https://github.com/mihonapp/mihon/actions/workflows/build_push.yml) | [](https://github.com/mihonapp/mihon/releases) | [](https://github.com/mihonapp/mihon-preview/releases) | [](https://discord.gg/mihon) |
|
||||||
|
|
||||||
# Tachiyomi
|
# Mihon
|
||||||
Tachiyomi is a free and open source manga reader for Android 6.0 and above.
|
Mihon is a free and open source manga reader for Android 8.0 and above.
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|
||||||
@ -18,9 +18,9 @@ Features include:
|
|||||||
* Create backups locally to read offline or to your desired cloud service
|
* Create backups locally to read offline or to your desired cloud service
|
||||||
|
|
||||||
## Download
|
## Download
|
||||||
Get the app from our [releases page](https://github.com/tachiyomiorg/tachiyomi/releases).
|
Get the app from our [releases page](https://github.com/mihonapp/mihon/releases).
|
||||||
|
|
||||||
If you want to try new features before they get to the stable release, you can download the preview version [here](https://github.com/tachiyomiorg/tachiyomi-preview/releases).
|
If you want to try new features before they get to the stable release, you can download the beta version [here](https://github.com/mihonapp/mihon-preview/releases).
|
||||||
|
|
||||||
## Issues, Feature Requests and Contributing
|
## Issues, Feature Requests and Contributing
|
||||||
|
|
||||||
@ -28,7 +28,8 @@ Please make sure to read the full guidelines. Your issue may be closed without w
|
|||||||
|
|
||||||
<details><summary>Issues</summary>
|
<details><summary>Issues</summary>
|
||||||
|
|
||||||
**Before reporting a new issue, take a look at the [FAQ](https://tachiyomi.org/docs/faq/general), the [changelog](https://tachiyomi.org/changelogs/) and the already opened [issues](https://github.com/tachiyomiorg/tachiyomi/issues).**
|
1. **Before reporting a new issue, take a look at the [FAQ](https://mihon.app/docs/faq/general), the [changelog](https://mihon.app/changelogs/) and the already opened [issues](https://github.com/mihonapp/mihon/issues).**
|
||||||
|
2. If you are unsure, ask here: [](https://discord.gg/mihon)
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
@ -36,16 +37,12 @@ Please make sure to read the full guidelines. Your issue may be closed without w
|
|||||||
|
|
||||||
* Include version (More → About → Version)
|
* Include version (More → About → Version)
|
||||||
* If not latest, try updating, it may have already been solved
|
* If not latest, try updating, it may have already been solved
|
||||||
* Preview version is equal to the number of commits as seen on the main page
|
* Beta version is equal to the number of commits as seen on the main page
|
||||||
* Include steps to reproduce (if not obvious from description)
|
* Include steps to reproduce (if not obvious from description)
|
||||||
* Include screenshot (if needed)
|
* Include screenshot (if needed)
|
||||||
* If it could be device-dependent, try reproducing on another device (if possible)
|
* If it could be device-dependent, try reproducing on another device (if possible)
|
||||||
* Don't group unrelated requests into one issue
|
* Don't group unrelated requests into one issue
|
||||||
|
|
||||||
DO: https://github.com/tachiyomiorg/tachiyomi/issues/24 https://github.com/tachiyomiorg/tachiyomi/issues/71
|
|
||||||
|
|
||||||
DON'T: https://github.com/tachiyomiorg/tachiyomi/issues/75
|
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
<details><summary>Feature Requests</summary>
|
<details><summary>Feature Requests</summary>
|
||||||
@ -68,7 +65,8 @@ 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).
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
|
@ -8,6 +8,10 @@ plugins {
|
|||||||
id("com.github.zellius.shortcut-helper")
|
id("com.github.zellius.shortcut-helper")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (gradle.startParameter.taskRequests.toString().contains("Standard")) {
|
||||||
|
apply<com.google.gms.googleservices.GoogleServicesPlugin>()
|
||||||
|
}
|
||||||
|
|
||||||
shortcutHelper.setFilePath("./shortcuts.xml")
|
shortcutHelper.setFilePath("./shortcuts.xml")
|
||||||
|
|
||||||
val SUPPORTED_ABIS = setOf("armeabi-v7a", "arm64-v8a", "x86", "x86_64")
|
val SUPPORTED_ABIS = setOf("armeabi-v7a", "arm64-v8a", "x86", "x86_64")
|
||||||
@ -16,10 +20,10 @@ android {
|
|||||||
namespace = "eu.kanade.tachiyomi"
|
namespace = "eu.kanade.tachiyomi"
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId = "eu.kanade.tachiyomi"
|
applicationId = "app.mihon"
|
||||||
|
|
||||||
versionCode = 119
|
versionCode = 2
|
||||||
versionName = "0.15.3"
|
versionName = "0.16.1"
|
||||||
|
|
||||||
buildConfigField("String", "COMMIT_COUNT", "\"${getCommitCount()}\"")
|
buildConfigField("String", "COMMIT_COUNT", "\"${getCommitCount()}\"")
|
||||||
buildConfigField("String", "COMMIT_SHA", "\"${getGitSha()}\"")
|
buildConfigField("String", "COMMIT_SHA", "\"${getGitSha()}\"")
|
||||||
@ -238,6 +242,9 @@ dependencies {
|
|||||||
// Logging
|
// Logging
|
||||||
implementation(libs.logcat)
|
implementation(libs.logcat)
|
||||||
|
|
||||||
|
// Crash reports/analytics
|
||||||
|
"standardImplementation"(libs.firebase.analytics)
|
||||||
|
|
||||||
// Shizuku
|
// Shizuku
|
||||||
implementation(libs.bundles.shizuku)
|
implementation(libs.bundles.shizuku)
|
||||||
|
|
||||||
|
4
app/proguard-rules.pro
vendored
@ -71,3 +71,7 @@
|
|||||||
|
|
||||||
# XmlUtil
|
# XmlUtil
|
||||||
-keep public enum nl.adaptivity.xmlutil.EventType { *; }
|
-keep public enum nl.adaptivity.xmlutil.EventType { *; }
|
||||||
|
|
||||||
|
# Firebase
|
||||||
|
-keep class com.google.firebase.installations.** { *; }
|
||||||
|
-keep interface com.google.firebase.installations.** { *; }
|
||||||
|
16
app/src/debug/res/drawable/ic_launcher_background.xml
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="108dp"
|
||||||
|
android:height="108dp"
|
||||||
|
android:viewportWidth="432"
|
||||||
|
android:viewportHeight="432">
|
||||||
|
<group>
|
||||||
|
<clip-path
|
||||||
|
android:pathData="M0,0h432v432h-432z"/>
|
||||||
|
<path
|
||||||
|
android:pathData="M0,0h432v432h-432z"
|
||||||
|
android:fillColor="#FAFAFA"/>
|
||||||
|
<path
|
||||||
|
android:pathData="M0,0h432v432h-432z"
|
||||||
|
android:fillColor="#2E3943"/>
|
||||||
|
</group>
|
||||||
|
</vector>
|
@ -1,27 +1,16 @@
|
|||||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:width="108dp"
|
android:width="108dp"
|
||||||
android:height="108dp"
|
android:height="108dp"
|
||||||
android:viewportWidth="108.0"
|
android:viewportWidth="432"
|
||||||
android:viewportHeight="108.0">
|
android:viewportHeight="432">
|
||||||
<path
|
<path
|
||||||
android:pathData="M14.5,7L86.5,7A7,7 0,0 1,93.5 14L93.5,95A7,7 0,0 1,86.5 102L14.5,102A7,7 0,0 1,7.5 95L7.5,14A7,7 0,0 1,14.5 7z"
|
android:pathData="M337,216C337,282.83 282.83,337 216,337C149.17,337 95,282.83 95,216C95,149.17 149.17,95 216,95C282.83,95 337,149.17 337,216Z"
|
||||||
android:fillColor="#000"/>
|
android:fillColor="#F2FAFF"/>
|
||||||
<path
|
<path
|
||||||
android:pathData="M14.5,7L86.5,7A7,7 0,0 1,93.5 14L93.5,95A7,7 0,0 1,86.5 102L14.5,102A7,7 0,0 1,7.5 95L7.5,14A7,7 0,0 1,14.5 7z"
|
android:pathData="M216,314.31C270.3,314.31 314.31,270.3 314.31,216C314.31,161.7 270.3,117.69 216,117.69C161.7,117.69 117.69,161.7 117.69,216C117.69,270.3 161.7,314.31 216,314.31ZM216,337C282.83,337 337,282.83 337,216C337,149.17 282.83,95 216,95C149.17,95 95,149.17 95,216C95,282.83 149.17,337 216,337Z"
|
||||||
android:fillColor="#455A64"/>
|
android:fillColor="#7EBBED"
|
||||||
<path
|
android:fillType="evenOdd"/>
|
||||||
android:pathData="M7.5,12.01C7.5,9.24 9.74,7 12.5,7L17.5,7L17.5,102L12.5,102C9.74,102 7.5,99.77 7.5,96.99L7.5,12.01Z"
|
<path
|
||||||
android:fillColor="#607D8B"/>
|
android:pathData="M163.71,174.79L162.66,150.56C165.82,151.16 169.58,151.31 178.16,151.31C188.55,151.31 202.24,150.71 209.32,149.81C212.32,149.51 213.53,149.05 215.49,148L231.74,161.85C230.23,163.95 229.78,164.86 228.13,169.07C226.77,172.38 220.6,191.49 218.2,199.62C229.33,201.88 235.5,203.53 243.93,206.99C244.98,199.62 245.13,195.71 245.13,182.31C245.13,178.85 244.98,176.9 244.53,173.74L270.72,174.64C269.96,178.25 269.82,179.76 269.66,185.62C269.06,199.77 268.46,206.54 266.95,216.78C277.34,222.04 277.34,222.04 282.61,224.9C285.32,226.41 285.92,226.71 287.72,227.31L278.99,255.45C274.78,251.69 268.91,247.63 260.33,242.81C252.81,260.72 240.32,273.82 221.35,284.2C215.03,275.77 210.22,270.65 202.54,264.63C213.68,259.37 218.8,256.06 224.67,250.49C230.38,244.92 234.15,239.5 237.76,231.38C228.13,227.01 221.96,225.05 211.27,222.8C205.1,241.16 200.13,252.9 195.77,259.97C189.9,269.45 181.93,274.42 172.74,274.42C165.67,274.42 158.45,271.26 153.18,265.84C147.16,259.67 144,251.09 144,241.16C144,226.41 151.07,213.62 163.41,205.64C171.39,200.52 179.82,198.27 193.21,197.51C195.92,188.63 198.18,180.96 200.29,172.38C193.66,172.98 185.39,173.43 175.3,173.88C169.88,174.04 168.08,174.19 163.71,174.79ZM186.59,220.54C179.52,221.74 175.3,224 171.54,228.82C168.68,232.13 167.33,236.04 167.33,240.25C167.33,244.92 169.58,248.38 172.44,248.38C175.9,248.38 179.82,240.55 186.59,220.54Z"
|
||||||
<path
|
android:fillColor="#031019"/>
|
||||||
android:pathData="M54,54.5m-25.5,0a25.5,25.5 0,1 1,51 0a25.5,25.5 0,1 1,-51 0"
|
|
||||||
android:fillColor="#000"/>
|
|
||||||
<path
|
|
||||||
android:pathData="M54,54.5m-25.5,0a25.5,25.5 0,1 1,51 0a25.5,25.5 0,1 1,-51 0"
|
|
||||||
android:fillColor="#CE2828"/>
|
|
||||||
<path
|
|
||||||
android:pathData="M54,54.5m-19.94,0a19.94,19.94 0,1 1,39.87 0a19.94,19.94 0,1 1,-39.87 0"
|
|
||||||
android:fillColor="#FFF"/>
|
|
||||||
<path
|
|
||||||
android:pathData="M52.04,46.3L47.42,46.3C46.14,46.3 44.93,46.23 44.2,46.14L44.2,49.76C45,49.65 46.16,49.6 47.42,49.6L60.58,49.6C61.86,49.6 63.02,49.65 63.82,49.76L63.82,46.14C63.09,46.23 61.86,46.3 60.58,46.3L55.69,46.3L55.69,45.07C55.69,44.43 55.73,43.95 55.82,43.45L51.9,43.45C51.99,44 52.04,44.43 52.04,45.07L52.04,46.3ZM46.78,60.68C45.46,60.68 44.29,60.63 43.45,60.52L43.45,64.14C44.34,64.03 45.46,63.98 46.78,63.98L61.29,63.98C62.57,63.98 63.71,64.03 64.57,64.14L64.57,60.52C63.73,60.63 62.57,60.68 61.29,60.68L58.24,60.68C59.33,58.06 59.99,56.23 60.7,53.91C61.34,51.81 61.34,51.81 61.56,51.13L57.58,50.06C57.51,50.93 57.37,51.52 56.89,53.41C56.19,56.14 55.32,58.74 54.5,60.68L46.78,60.68ZM46.48,51.36C47.55,54.02 48.28,56.53 49.03,60.15L52.66,58.9C51.65,54.98 50.92,52.66 49.94,50.11L46.48,51.36Z"
|
|
||||||
android:fillColor="#000"/>
|
|
||||||
</vector>
|
</vector>
|
||||||
|
@ -1,6 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
|
||||||
<background android:drawable="@android:color/transparent"/>
|
|
||||||
<foreground android:drawable="@drawable/ic_launcher_foreground"/>
|
|
||||||
<monochrome android:drawable="@drawable/ic_tachi_monochrome_launcher" />
|
|
||||||
</adaptive-icon>
|
|
Before Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 4.1 KiB |
Before Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 2.9 KiB |
Before Width: | Height: | Size: 5.3 KiB |
Before Width: | Height: | Size: 5.5 KiB |
Before Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 6.4 KiB |
Before Width: | Height: | Size: 13 KiB |
@ -33,6 +33,11 @@
|
|||||||
|
|
||||||
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_DATA_SYNC" />
|
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_DATA_SYNC" />
|
||||||
|
|
||||||
|
<!-- Remove permission from Firebase dependency -->
|
||||||
|
<uses-permission
|
||||||
|
android:name="com.google.android.gms.permission.AD_ID"
|
||||||
|
tools:node="remove" />
|
||||||
|
|
||||||
<application
|
<application
|
||||||
android:name=".App"
|
android:name=".App"
|
||||||
android:allowBackup="false"
|
android:allowBackup="false"
|
||||||
@ -45,7 +50,7 @@
|
|||||||
android:networkSecurityConfig="@xml/network_security_config"
|
android:networkSecurityConfig="@xml/network_security_config"
|
||||||
android:preserveLegacyExternalStorage="true"
|
android:preserveLegacyExternalStorage="true"
|
||||||
android:requestLegacyExternalStorage="true"
|
android:requestLegacyExternalStorage="true"
|
||||||
android:roundIcon="@mipmap/ic_launcher_round"
|
android:roundIcon="@mipmap/ic_launcher"
|
||||||
android:supportsRtl="true"
|
android:supportsRtl="true"
|
||||||
android:theme="@style/Theme.Tachiyomi">
|
android:theme="@style/Theme.Tachiyomi">
|
||||||
|
|
||||||
@ -174,7 +179,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" />
|
||||||
@ -231,6 +236,11 @@
|
|||||||
android:name="android.webkit.WebView.MetricsOptOut"
|
android:name="android.webkit.WebView.MetricsOptOut"
|
||||||
android:value="true" />
|
android:value="true" />
|
||||||
|
|
||||||
|
<!-- Disable advertising ID collection for Firebase -->
|
||||||
|
<meta-data
|
||||||
|
android:name="google_analytics_adid_collection_enabled"
|
||||||
|
android:value="false" />
|
||||||
|
|
||||||
</application>
|
</application>
|
||||||
|
|
||||||
</manifest>
|
</manifest>
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
package eu.kanade.domain.ui
|
package eu.kanade.domain.ui
|
||||||
|
|
||||||
import android.os.Build
|
|
||||||
import eu.kanade.domain.ui.model.AppTheme
|
import eu.kanade.domain.ui.model.AppTheme
|
||||||
import eu.kanade.domain.ui.model.TabletUiMode
|
import eu.kanade.domain.ui.model.TabletUiMode
|
||||||
import eu.kanade.domain.ui.model.ThemeMode
|
import eu.kanade.domain.ui.model.ThemeMode
|
||||||
@ -16,10 +15,7 @@ class UiPreferences(
|
|||||||
private val preferenceStore: PreferenceStore,
|
private val preferenceStore: PreferenceStore,
|
||||||
) {
|
) {
|
||||||
|
|
||||||
fun themeMode() = preferenceStore.getEnum(
|
fun themeMode() = preferenceStore.getEnum("pref_theme_mode_key", ThemeMode.SYSTEM)
|
||||||
"pref_theme_mode_key",
|
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { ThemeMode.SYSTEM } else { ThemeMode.LIGHT },
|
|
||||||
)
|
|
||||||
|
|
||||||
fun appTheme() = preferenceStore.getEnum(
|
fun appTheme() = preferenceStore.getEnum(
|
||||||
"pref_app_theme",
|
"pref_app_theme",
|
||||||
|
@ -2,7 +2,6 @@ package eu.kanade.presentation.manga.components
|
|||||||
|
|
||||||
import android.graphics.Bitmap
|
import android.graphics.Bitmap
|
||||||
import android.graphics.drawable.BitmapDrawable
|
import android.graphics.drawable.BitmapDrawable
|
||||||
import android.os.Build
|
|
||||||
import androidx.compose.foundation.background
|
import androidx.compose.foundation.background
|
||||||
import androidx.compose.foundation.layout.Box
|
import androidx.compose.foundation.layout.Box
|
||||||
import androidx.compose.foundation.layout.Row
|
import androidx.compose.foundation.layout.Row
|
||||||
@ -173,14 +172,9 @@ fun MangaCoverDialog(
|
|||||||
// Copy bitmap in case it came from memory cache
|
// Copy bitmap in case it came from memory cache
|
||||||
// Because SSIV needs to thoroughly read the image
|
// Because SSIV needs to thoroughly read the image
|
||||||
val copy = (drawable as? BitmapDrawable)?.let {
|
val copy = (drawable as? BitmapDrawable)?.let {
|
||||||
val config = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
|
||||||
Bitmap.Config.HARDWARE
|
|
||||||
} else {
|
|
||||||
Bitmap.Config.ARGB_8888
|
|
||||||
}
|
|
||||||
BitmapDrawable(
|
BitmapDrawable(
|
||||||
view.context.resources,
|
view.context.resources,
|
||||||
it.bitmap.copy(config, false),
|
it.bitmap.copy(Bitmap.Config.HARDWARE, false),
|
||||||
)
|
)
|
||||||
} ?: drawable
|
} ?: drawable
|
||||||
view.setImage(copy, ReaderPageImageView.Config(zoomDuration = 500))
|
view.setImage(copy, ReaderPageImageView.Config(zoomDuration = 500))
|
||||||
|
@ -21,7 +21,7 @@ fun LogoHeader() {
|
|||||||
horizontalAlignment = Alignment.CenterHorizontally,
|
horizontalAlignment = Alignment.CenterHorizontally,
|
||||||
) {
|
) {
|
||||||
Icon(
|
Icon(
|
||||||
painter = painterResource(R.drawable.ic_tachi),
|
painter = painterResource(R.drawable.ic_mihon),
|
||||||
contentDescription = null,
|
contentDescription = null,
|
||||||
tint = MaterialTheme.colorScheme.onSurface,
|
tint = MaterialTheme.colorScheme.onSurface,
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
|
@ -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
|
||||||
|
@ -3,7 +3,6 @@ package eu.kanade.presentation.more.settings.screen
|
|||||||
import android.annotation.SuppressLint
|
import android.annotation.SuppressLint
|
||||||
import android.content.ActivityNotFoundException
|
import android.content.ActivityNotFoundException
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
import android.os.Build
|
|
||||||
import android.provider.Settings
|
import android.provider.Settings
|
||||||
import android.webkit.WebStorage
|
import android.webkit.WebStorage
|
||||||
import android.webkit.WebView
|
import android.webkit.WebView
|
||||||
@ -84,60 +83,48 @@ object SettingsAdvancedScreen : SearchableSettings {
|
|||||||
val basePreferences = remember { Injekt.get<BasePreferences>() }
|
val basePreferences = remember { Injekt.get<BasePreferences>() }
|
||||||
val networkPreferences = remember { Injekt.get<NetworkPreferences>() }
|
val networkPreferences = remember { Injekt.get<NetworkPreferences>() }
|
||||||
|
|
||||||
return buildList {
|
return listOf(
|
||||||
addAll(
|
Preference.PreferenceItem.TextPreference(
|
||||||
listOf(
|
title = stringResource(MR.strings.pref_dump_crash_logs),
|
||||||
Preference.PreferenceItem.TextPreference(
|
subtitle = stringResource(MR.strings.pref_dump_crash_logs_summary),
|
||||||
title = stringResource(MR.strings.pref_dump_crash_logs),
|
onClick = {
|
||||||
subtitle = stringResource(MR.strings.pref_dump_crash_logs_summary),
|
scope.launch {
|
||||||
onClick = {
|
CrashLogUtil(context).dumpLogs()
|
||||||
scope.launch {
|
}
|
||||||
CrashLogUtil(context).dumpLogs()
|
},
|
||||||
}
|
),
|
||||||
},
|
Preference.PreferenceItem.SwitchPreference(
|
||||||
),
|
pref = networkPreferences.verboseLogging(),
|
||||||
Preference.PreferenceItem.SwitchPreference(
|
title = stringResource(MR.strings.pref_verbose_logging),
|
||||||
pref = networkPreferences.verboseLogging(),
|
subtitle = stringResource(MR.strings.pref_verbose_logging_summary),
|
||||||
title = stringResource(MR.strings.pref_verbose_logging),
|
onValueChanged = {
|
||||||
subtitle = stringResource(MR.strings.pref_verbose_logging_summary),
|
context.toast(MR.strings.requires_app_restart)
|
||||||
onValueChanged = {
|
true
|
||||||
context.toast(MR.strings.requires_app_restart)
|
},
|
||||||
true
|
),
|
||||||
},
|
Preference.PreferenceItem.TextPreference(
|
||||||
),
|
title = stringResource(MR.strings.pref_debug_info),
|
||||||
Preference.PreferenceItem.TextPreference(
|
onClick = { navigator.push(DebugInfoScreen()) },
|
||||||
title = stringResource(MR.strings.pref_debug_info),
|
),
|
||||||
onClick = { navigator.push(DebugInfoScreen()) },
|
Preference.PreferenceItem.TextPreference(
|
||||||
),
|
title = stringResource(MR.strings.pref_onboarding_guide),
|
||||||
Preference.PreferenceItem.TextPreference(
|
onClick = { navigator.push(OnboardingScreen()) },
|
||||||
title = stringResource(MR.strings.pref_onboarding_guide),
|
),
|
||||||
onClick = { navigator.push(OnboardingScreen()) },
|
Preference.PreferenceItem.TextPreference(
|
||||||
),
|
title = stringResource(MR.strings.pref_manage_notifications),
|
||||||
),
|
onClick = {
|
||||||
)
|
val intent = Intent(Settings.ACTION_APP_NOTIFICATION_SETTINGS).apply {
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
putExtra(Settings.EXTRA_APP_PACKAGE, context.packageName)
|
||||||
add(
|
}
|
||||||
Preference.PreferenceItem.TextPreference(
|
context.startActivity(intent)
|
||||||
title = stringResource(MR.strings.pref_manage_notifications),
|
},
|
||||||
onClick = {
|
),
|
||||||
val intent = Intent(Settings.ACTION_APP_NOTIFICATION_SETTINGS).apply {
|
getBackgroundActivityGroup(),
|
||||||
putExtra(Settings.EXTRA_APP_PACKAGE, context.packageName)
|
getDataGroup(),
|
||||||
}
|
getNetworkGroup(networkPreferences = networkPreferences),
|
||||||
context.startActivity(intent)
|
getLibraryGroup(),
|
||||||
},
|
getExtensionsGroup(basePreferences = basePreferences),
|
||||||
),
|
)
|
||||||
)
|
|
||||||
}
|
|
||||||
addAll(
|
|
||||||
listOf(
|
|
||||||
getBackgroundActivityGroup(),
|
|
||||||
getDataGroup(),
|
|
||||||
getNetworkGroup(networkPreferences = networkPreferences),
|
|
||||||
getLibraryGroup(),
|
|
||||||
getExtensionsGroup(basePreferences = basePreferences),
|
|
||||||
),
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
|
@ -64,7 +64,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
|
||||||
|
@ -60,7 +60,6 @@ object SettingsReaderScreen : SearchableSettings {
|
|||||||
pref = readerPref.trueColor(),
|
pref = readerPref.trueColor(),
|
||||||
title = stringResource(MR.strings.pref_true_color),
|
title = stringResource(MR.strings.pref_true_color),
|
||||||
subtitle = stringResource(MR.strings.pref_true_color_summary),
|
subtitle = stringResource(MR.strings.pref_true_color_summary),
|
||||||
enabled = Build.VERSION.SDK_INT >= Build.VERSION_CODES.O,
|
|
||||||
),
|
),
|
||||||
Preference.PreferenceItem.SwitchPreference(
|
Preference.PreferenceItem.SwitchPreference(
|
||||||
pref = readerPref.pageTransitions(),
|
pref = readerPref.pageTransitions(),
|
||||||
|
@ -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),
|
||||||
|
@ -1,12 +1,15 @@
|
|||||||
package eu.kanade.presentation.more.settings.screen.about
|
package eu.kanade.presentation.more.settings.screen.about
|
||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
|
import androidx.compose.animation.AnimatedVisibility
|
||||||
import androidx.compose.foundation.layout.Arrangement
|
import androidx.compose.foundation.layout.Arrangement
|
||||||
import androidx.compose.foundation.layout.Row
|
import androidx.compose.foundation.layout.Row
|
||||||
import androidx.compose.foundation.layout.fillMaxWidth
|
import androidx.compose.foundation.layout.fillMaxWidth
|
||||||
import androidx.compose.foundation.layout.padding
|
import androidx.compose.foundation.layout.padding
|
||||||
|
import androidx.compose.foundation.layout.size
|
||||||
import androidx.compose.material.icons.Icons
|
import androidx.compose.material.icons.Icons
|
||||||
import androidx.compose.material.icons.outlined.Public
|
import androidx.compose.material.icons.outlined.Public
|
||||||
|
import androidx.compose.material3.CircularProgressIndicator
|
||||||
import androidx.compose.runtime.Composable
|
import androidx.compose.runtime.Composable
|
||||||
import androidx.compose.runtime.getValue
|
import androidx.compose.runtime.getValue
|
||||||
import androidx.compose.runtime.mutableStateOf
|
import androidx.compose.runtime.mutableStateOf
|
||||||
@ -27,10 +30,13 @@ import eu.kanade.presentation.util.LocalBackPress
|
|||||||
import eu.kanade.presentation.util.Screen
|
import eu.kanade.presentation.util.Screen
|
||||||
import eu.kanade.tachiyomi.BuildConfig
|
import eu.kanade.tachiyomi.BuildConfig
|
||||||
import eu.kanade.tachiyomi.data.updater.AppUpdateChecker
|
import eu.kanade.tachiyomi.data.updater.AppUpdateChecker
|
||||||
|
import eu.kanade.tachiyomi.data.updater.RELEASE_URL
|
||||||
|
import eu.kanade.tachiyomi.ui.more.NewUpdateScreen
|
||||||
import eu.kanade.tachiyomi.util.CrashLogUtil
|
import eu.kanade.tachiyomi.util.CrashLogUtil
|
||||||
import eu.kanade.tachiyomi.util.lang.toDateTimestampString
|
import eu.kanade.tachiyomi.util.lang.toDateTimestampString
|
||||||
import eu.kanade.tachiyomi.util.system.copyToClipboard
|
import eu.kanade.tachiyomi.util.system.copyToClipboard
|
||||||
import eu.kanade.tachiyomi.util.system.toast
|
import eu.kanade.tachiyomi.util.system.toast
|
||||||
|
import kotlinx.coroutines.launch
|
||||||
import logcat.LogPriority
|
import logcat.LogPriority
|
||||||
import tachiyomi.core.util.lang.withIOContext
|
import tachiyomi.core.util.lang.withIOContext
|
||||||
import tachiyomi.core.util.lang.withUIContext
|
import tachiyomi.core.util.lang.withUIContext
|
||||||
@ -42,6 +48,7 @@ import tachiyomi.presentation.core.components.ScrollbarLazyColumn
|
|||||||
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
|
||||||
import tachiyomi.presentation.core.icons.CustomIcons
|
import tachiyomi.presentation.core.icons.CustomIcons
|
||||||
|
import tachiyomi.presentation.core.icons.Discord
|
||||||
import tachiyomi.presentation.core.icons.Facebook
|
import tachiyomi.presentation.core.icons.Facebook
|
||||||
import tachiyomi.presentation.core.icons.Github
|
import tachiyomi.presentation.core.icons.Github
|
||||||
import tachiyomi.presentation.core.icons.Reddit
|
import tachiyomi.presentation.core.icons.Reddit
|
||||||
@ -91,6 +98,54 @@ object AboutScreen : Screen() {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (BuildConfig.INCLUDE_UPDATER) {
|
||||||
|
item {
|
||||||
|
TextPreferenceWidget(
|
||||||
|
title = stringResource(MR.strings.check_for_updates),
|
||||||
|
widget = {
|
||||||
|
AnimatedVisibility(visible = isCheckingUpdates) {
|
||||||
|
CircularProgressIndicator(
|
||||||
|
modifier = Modifier.size(28.dp),
|
||||||
|
strokeWidth = 3.dp,
|
||||||
|
)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onPreferenceClick = {
|
||||||
|
if (!isCheckingUpdates) {
|
||||||
|
scope.launch {
|
||||||
|
isCheckingUpdates = true
|
||||||
|
|
||||||
|
checkVersion(
|
||||||
|
context = context,
|
||||||
|
onAvailableUpdate = { result ->
|
||||||
|
val updateScreen = NewUpdateScreen(
|
||||||
|
versionName = result.release.version,
|
||||||
|
changelogInfo = result.release.info,
|
||||||
|
releaseLink = result.release.releaseLink,
|
||||||
|
downloadLink = result.release.getDownloadLink(),
|
||||||
|
)
|
||||||
|
navigator.push(updateScreen)
|
||||||
|
},
|
||||||
|
onFinish = {
|
||||||
|
isCheckingUpdates = false
|
||||||
|
},
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!BuildConfig.DEBUG) {
|
||||||
|
item {
|
||||||
|
TextPreferenceWidget(
|
||||||
|
title = stringResource(MR.strings.whats_new),
|
||||||
|
onPreferenceClick = { uriHandler.openUri(RELEASE_URL) },
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
item {
|
item {
|
||||||
TextPreferenceWidget(
|
TextPreferenceWidget(
|
||||||
title = stringResource(MR.strings.licenses),
|
title = stringResource(MR.strings.licenses),
|
||||||
@ -101,7 +156,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/") },
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -115,27 +170,32 @@ 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(
|
||||||
|
label = "Discord",
|
||||||
|
icon = CustomIcons.Discord,
|
||||||
|
url = "https://discord.gg/mihon",
|
||||||
)
|
)
|
||||||
LinkIcon(
|
LinkIcon(
|
||||||
label = "X",
|
label = "X",
|
||||||
icon = CustomIcons.X,
|
icon = CustomIcons.X,
|
||||||
url = "https://x.com/tachiyomiorg",
|
url = "https://x.com/mihonapp",
|
||||||
)
|
)
|
||||||
LinkIcon(
|
LinkIcon(
|
||||||
label = "Facebook",
|
label = "Facebook",
|
||||||
icon = CustomIcons.Facebook,
|
icon = CustomIcons.Facebook,
|
||||||
url = "https://facebook.com/tachiyomiorg",
|
url = "https://facebook.com/mihonapp",
|
||||||
)
|
)
|
||||||
LinkIcon(
|
LinkIcon(
|
||||||
label = "Reddit",
|
label = "Reddit",
|
||||||
icon = CustomIcons.Reddit,
|
icon = CustomIcons.Reddit,
|
||||||
url = "https://www.reddit.com/r/Tachiyomi",
|
url = "https://www.reddit.com/r/mihonapp",
|
||||||
)
|
)
|
||||||
LinkIcon(
|
LinkIcon(
|
||||||
label = "GitHub",
|
label = "GitHub",
|
||||||
icon = CustomIcons.Github,
|
icon = CustomIcons.Github,
|
||||||
url = "https://github.com/tachiyomiorg",
|
url = "https://github.com/mihonapp",
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -187,7 +247,7 @@ object AboutScreen : Screen() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
BuildConfig.PREVIEW -> {
|
BuildConfig.PREVIEW -> {
|
||||||
"Preview r${BuildConfig.COMMIT_COUNT}".let {
|
"Beta r${BuildConfig.COMMIT_COUNT}".let {
|
||||||
if (withBuildDate) {
|
if (withBuildDate) {
|
||||||
"$it (${BuildConfig.COMMIT_SHA}, ${getFormattedBuildTime()})"
|
"$it (${BuildConfig.COMMIT_SHA}, ${getFormattedBuildTime()})"
|
||||||
} else {
|
} else {
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
package eu.kanade.presentation.more.settings.widget
|
package eu.kanade.presentation.more.settings.widget
|
||||||
|
|
||||||
import android.os.Build
|
|
||||||
import androidx.compose.foundation.layout.fillMaxWidth
|
import androidx.compose.foundation.layout.fillMaxWidth
|
||||||
import androidx.compose.foundation.layout.padding
|
import androidx.compose.foundation.layout.padding
|
||||||
import androidx.compose.material3.MultiChoiceSegmentedButtonRow
|
import androidx.compose.material3.MultiChoiceSegmentedButtonRow
|
||||||
@ -13,18 +12,11 @@ import eu.kanade.domain.ui.model.ThemeMode
|
|||||||
import tachiyomi.i18n.MR
|
import tachiyomi.i18n.MR
|
||||||
import tachiyomi.presentation.core.i18n.stringResource
|
import tachiyomi.presentation.core.i18n.stringResource
|
||||||
|
|
||||||
private val options = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
private val options = mapOf(
|
||||||
mapOf(
|
ThemeMode.SYSTEM to MR.strings.theme_system,
|
||||||
ThemeMode.SYSTEM to MR.strings.theme_system,
|
ThemeMode.LIGHT to MR.strings.theme_light,
|
||||||
ThemeMode.LIGHT to MR.strings.theme_light,
|
ThemeMode.DARK to MR.strings.theme_dark,
|
||||||
ThemeMode.DARK to MR.strings.theme_dark,
|
)
|
||||||
)
|
|
||||||
} else {
|
|
||||||
mapOf(
|
|
||||||
ThemeMode.LIGHT to MR.strings.theme_light,
|
|
||||||
ThemeMode.DARK to MR.strings.theme_dark,
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
internal fun AppThemeModePreferenceWidget(
|
internal fun AppThemeModePreferenceWidget(
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
package eu.kanade.presentation.util
|
package eu.kanade.presentation.util
|
||||||
|
|
||||||
import android.os.Build
|
|
||||||
import android.provider.Settings
|
|
||||||
import androidx.compose.runtime.Composable
|
import androidx.compose.runtime.Composable
|
||||||
import androidx.compose.runtime.DisposableEffect
|
import androidx.compose.runtime.DisposableEffect
|
||||||
import androidx.compose.runtime.getValue
|
import androidx.compose.runtime.getValue
|
||||||
@ -23,12 +21,7 @@ fun rememberRequestPackageInstallsPermissionState(initialValue: Boolean = false)
|
|||||||
DisposableEffect(lifecycleOwner.lifecycle) {
|
DisposableEffect(lifecycleOwner.lifecycle) {
|
||||||
val observer = object : DefaultLifecycleObserver {
|
val observer = object : DefaultLifecycleObserver {
|
||||||
override fun onResume(owner: LifecycleOwner) {
|
override fun onResume(owner: LifecycleOwner) {
|
||||||
installGranted = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
installGranted = context.packageManager.canRequestPackageInstalls()
|
||||||
context.packageManager.canRequestPackageInstalls()
|
|
||||||
} else {
|
|
||||||
@Suppress("DEPRECATION")
|
|
||||||
Settings.Secure.getInt(context.contentResolver, Settings.Secure.INSTALL_NON_MARKET_APPS) != 0
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
lifecycleOwner.lifecycle.addObserver(observer)
|
lifecycleOwner.lifecycle.addObserver(observer)
|
||||||
|
@ -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",
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
@ -169,22 +169,19 @@ class App : Application(), DefaultLifecycleObserver, ImageLoaderFactory {
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun getPackageName(): String {
|
override fun getPackageName(): String {
|
||||||
// This causes freezes in Android 6/7 for some reason
|
try {
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
// Override the value passed as X-Requested-With in WebView requests
|
||||||
try {
|
val stackTrace = Looper.getMainLooper().thread.stackTrace
|
||||||
// Override the value passed as X-Requested-With in WebView requests
|
val chromiumElement = stackTrace.find {
|
||||||
val stackTrace = Looper.getMainLooper().thread.stackTrace
|
it.className.equals(
|
||||||
val chromiumElement = stackTrace.find {
|
"org.chromium.base.BuildInfo",
|
||||||
it.className.equals(
|
ignoreCase = true,
|
||||||
"org.chromium.base.BuildInfo",
|
)
|
||||||
ignoreCase = true,
|
|
||||||
)
|
|
||||||
}
|
|
||||||
if (chromiumElement?.methodName.equals("getAll", ignoreCase = true)) {
|
|
||||||
return WebViewUtil.SPOOF_PACKAGE_NAME
|
|
||||||
}
|
|
||||||
} catch (_: Exception) {
|
|
||||||
}
|
}
|
||||||
|
if (chromiumElement?.methodName.equals("getAll", ignoreCase = true)) {
|
||||||
|
return WebViewUtil.SPOOF_PACKAGE_NAME
|
||||||
|
}
|
||||||
|
} catch (_: Exception) {
|
||||||
}
|
}
|
||||||
return super.getPackageName()
|
return super.getPackageName()
|
||||||
}
|
}
|
||||||
|
@ -1,34 +1,10 @@
|
|||||||
package eu.kanade.tachiyomi
|
package eu.kanade.tachiyomi
|
||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import androidx.core.content.edit
|
|
||||||
import androidx.preference.PreferenceManager
|
|
||||||
import eu.kanade.domain.base.BasePreferences
|
|
||||||
import eu.kanade.domain.source.service.SourcePreferences
|
|
||||||
import eu.kanade.domain.ui.UiPreferences
|
|
||||||
import eu.kanade.tachiyomi.core.security.SecurityPreferences
|
|
||||||
import eu.kanade.tachiyomi.data.backup.create.BackupCreateJob
|
import eu.kanade.tachiyomi.data.backup.create.BackupCreateJob
|
||||||
import eu.kanade.tachiyomi.data.library.LibraryUpdateJob
|
import eu.kanade.tachiyomi.data.library.LibraryUpdateJob
|
||||||
import eu.kanade.tachiyomi.data.track.TrackerManager
|
|
||||||
import eu.kanade.tachiyomi.network.NetworkPreferences
|
|
||||||
import eu.kanade.tachiyomi.network.PREF_DOH_CLOUDFLARE
|
|
||||||
import eu.kanade.tachiyomi.ui.reader.setting.ReaderOrientation
|
|
||||||
import eu.kanade.tachiyomi.ui.reader.setting.ReaderPreferences
|
|
||||||
import eu.kanade.tachiyomi.util.system.DeviceUtil
|
|
||||||
import eu.kanade.tachiyomi.util.system.toast
|
|
||||||
import eu.kanade.tachiyomi.util.system.workManager
|
|
||||||
import tachiyomi.core.preference.Preference
|
import tachiyomi.core.preference.Preference
|
||||||
import tachiyomi.core.preference.PreferenceStore
|
import tachiyomi.core.preference.PreferenceStore
|
||||||
import tachiyomi.core.preference.TriState
|
|
||||||
import tachiyomi.core.preference.getAndSet
|
|
||||||
import tachiyomi.core.preference.getEnum
|
|
||||||
import tachiyomi.core.preference.minusAssign
|
|
||||||
import tachiyomi.core.preference.plusAssign
|
|
||||||
import tachiyomi.domain.backup.service.BackupPreferences
|
|
||||||
import tachiyomi.domain.library.service.LibraryPreferences
|
|
||||||
import tachiyomi.domain.library.service.LibraryPreferences.Companion.MANGA_NON_COMPLETED
|
|
||||||
import tachiyomi.i18n.MR
|
|
||||||
import java.io.File
|
|
||||||
|
|
||||||
object Migrations {
|
object Migrations {
|
||||||
|
|
||||||
@ -37,18 +13,10 @@ object Migrations {
|
|||||||
*
|
*
|
||||||
* @return true if a migration is performed, false otherwise.
|
* @return true if a migration is performed, false otherwise.
|
||||||
*/
|
*/
|
||||||
|
@Suppress("SameReturnValue")
|
||||||
fun upgrade(
|
fun upgrade(
|
||||||
context: Context,
|
context: Context,
|
||||||
preferenceStore: PreferenceStore,
|
preferenceStore: PreferenceStore,
|
||||||
basePreferences: BasePreferences,
|
|
||||||
uiPreferences: UiPreferences,
|
|
||||||
networkPreferences: NetworkPreferences,
|
|
||||||
sourcePreferences: SourcePreferences,
|
|
||||||
securityPreferences: SecurityPreferences,
|
|
||||||
libraryPreferences: LibraryPreferences,
|
|
||||||
readerPreferences: ReaderPreferences,
|
|
||||||
backupPreferences: BackupPreferences,
|
|
||||||
trackerManager: TrackerManager,
|
|
||||||
): Boolean {
|
): Boolean {
|
||||||
val lastVersionCode = preferenceStore.getInt(Preference.appStateKey("last_version_code"), 0)
|
val lastVersionCode = preferenceStore.getInt(Preference.appStateKey("last_version_code"), 0)
|
||||||
val oldVersion = lastVersionCode.get()
|
val oldVersion = lastVersionCode.get()
|
||||||
@ -63,399 +31,8 @@ object Migrations {
|
|||||||
if (oldVersion == 0) {
|
if (oldVersion == 0) {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
val prefs = PreferenceManager.getDefaultSharedPreferences(context)
|
|
||||||
|
|
||||||
if (oldVersion < 15) {
|
|
||||||
// Delete internal chapter cache dir.
|
|
||||||
File(context.cacheDir, "chapter_disk_cache").deleteRecursively()
|
|
||||||
}
|
|
||||||
if (oldVersion < 19) {
|
|
||||||
// Move covers to external files dir.
|
|
||||||
val oldDir = File(context.externalCacheDir, "cover_disk_cache")
|
|
||||||
if (oldDir.exists()) {
|
|
||||||
val destDir = context.getExternalFilesDir("covers")
|
|
||||||
if (destDir != null) {
|
|
||||||
oldDir.listFiles()?.forEach {
|
|
||||||
it.renameTo(File(destDir, it.name))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (oldVersion < 26) {
|
|
||||||
// Delete external chapter cache dir.
|
|
||||||
val extCache = context.externalCacheDir
|
|
||||||
if (extCache != null) {
|
|
||||||
val chapterCache = File(extCache, "chapter_disk_cache")
|
|
||||||
if (chapterCache.exists()) {
|
|
||||||
chapterCache.deleteRecursively()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (oldVersion < 44) {
|
|
||||||
// Reset sorting preference if using removed sort by source
|
|
||||||
val oldSortingMode = prefs.getInt(libraryPreferences.sortingMode().key(), 0)
|
|
||||||
|
|
||||||
if (oldSortingMode == 5) { // SOURCE = 5
|
|
||||||
prefs.edit {
|
|
||||||
putInt(libraryPreferences.sortingMode().key(), 0) // ALPHABETICAL = 0
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (oldVersion < 52) {
|
|
||||||
// Migrate library filters to tri-state versions
|
|
||||||
fun convertBooleanPrefToTriState(key: String): Int {
|
|
||||||
val oldPrefValue = prefs.getBoolean(key, false)
|
|
||||||
return if (oldPrefValue) {
|
|
||||||
1
|
|
||||||
} else {
|
|
||||||
0
|
|
||||||
}
|
|
||||||
}
|
|
||||||
prefs.edit {
|
|
||||||
putInt(
|
|
||||||
libraryPreferences.filterDownloaded().key(),
|
|
||||||
convertBooleanPrefToTriState("pref_filter_downloaded_key"),
|
|
||||||
)
|
|
||||||
remove("pref_filter_downloaded_key")
|
|
||||||
|
|
||||||
putInt(
|
|
||||||
libraryPreferences.filterUnread().key(),
|
|
||||||
convertBooleanPrefToTriState("pref_filter_unread_key"),
|
|
||||||
)
|
|
||||||
remove("pref_filter_unread_key")
|
|
||||||
|
|
||||||
putInt(
|
|
||||||
libraryPreferences.filterCompleted().key(),
|
|
||||||
convertBooleanPrefToTriState("pref_filter_completed_key"),
|
|
||||||
)
|
|
||||||
remove("pref_filter_completed_key")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (oldVersion < 54) {
|
|
||||||
// Force MAL log out due to login flow change
|
|
||||||
// v52: switched from scraping to WebView
|
|
||||||
// v53: switched from WebView to OAuth
|
|
||||||
if (trackerManager.myAnimeList.isLoggedIn) {
|
|
||||||
trackerManager.myAnimeList.logout()
|
|
||||||
context.toast(MR.strings.myanimelist_relogin)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (oldVersion < 57) {
|
|
||||||
// Migrate DNS over HTTPS setting
|
|
||||||
val wasDohEnabled = prefs.getBoolean("enable_doh", false)
|
|
||||||
if (wasDohEnabled) {
|
|
||||||
prefs.edit {
|
|
||||||
putInt(networkPreferences.dohProvider().key(), PREF_DOH_CLOUDFLARE)
|
|
||||||
remove("enable_doh")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (oldVersion < 59) {
|
|
||||||
// Reset rotation to Free after replacing Lock
|
|
||||||
if (prefs.contains("pref_rotation_type_key")) {
|
|
||||||
prefs.edit {
|
|
||||||
putInt("pref_rotation_type_key", 1)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (oldVersion < 60) {
|
|
||||||
// Migrate Rotation and Viewer values to default values for viewer_flags
|
|
||||||
val newOrientation = when (prefs.getInt("pref_rotation_type_key", 1)) {
|
|
||||||
1 -> ReaderOrientation.FREE.flagValue
|
|
||||||
2 -> ReaderOrientation.PORTRAIT.flagValue
|
|
||||||
3 -> ReaderOrientation.LANDSCAPE.flagValue
|
|
||||||
4 -> ReaderOrientation.LOCKED_PORTRAIT.flagValue
|
|
||||||
5 -> ReaderOrientation.LOCKED_LANDSCAPE.flagValue
|
|
||||||
else -> ReaderOrientation.FREE.flagValue
|
|
||||||
}
|
|
||||||
|
|
||||||
// Reading mode flag and prefValue is the same value
|
|
||||||
val newReadingMode = prefs.getInt("pref_default_viewer_key", 1)
|
|
||||||
|
|
||||||
prefs.edit {
|
|
||||||
putInt("pref_default_orientation_type_key", newOrientation)
|
|
||||||
remove("pref_rotation_type_key")
|
|
||||||
putInt("pref_default_reading_mode_key", newReadingMode)
|
|
||||||
remove("pref_default_viewer_key")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (oldVersion < 61) {
|
|
||||||
// Handle removed every 1 or 2 hour library updates
|
|
||||||
val updateInterval = libraryPreferences.autoUpdateInterval().get()
|
|
||||||
if (updateInterval == 1 || updateInterval == 2) {
|
|
||||||
libraryPreferences.autoUpdateInterval().set(3)
|
|
||||||
LibraryUpdateJob.setupTask(context, 3)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (oldVersion < 64) {
|
|
||||||
val oldSortingMode = prefs.getInt(libraryPreferences.sortingMode().key(), 0)
|
|
||||||
val oldSortingDirection = prefs.getBoolean("library_sorting_ascending", true)
|
|
||||||
|
|
||||||
val newSortingMode = when (oldSortingMode) {
|
|
||||||
0 -> "ALPHABETICAL"
|
|
||||||
1 -> "LAST_READ"
|
|
||||||
2 -> "LAST_CHECKED"
|
|
||||||
3 -> "UNREAD"
|
|
||||||
4 -> "TOTAL_CHAPTERS"
|
|
||||||
6 -> "LATEST_CHAPTER"
|
|
||||||
8 -> "DATE_FETCHED"
|
|
||||||
7 -> "DATE_ADDED"
|
|
||||||
else -> "ALPHABETICAL"
|
|
||||||
}
|
|
||||||
|
|
||||||
val newSortingDirection = when (oldSortingDirection) {
|
|
||||||
true -> "ASCENDING"
|
|
||||||
else -> "DESCENDING"
|
|
||||||
}
|
|
||||||
|
|
||||||
prefs.edit(commit = true) {
|
|
||||||
remove(libraryPreferences.sortingMode().key())
|
|
||||||
remove("library_sorting_ascending")
|
|
||||||
}
|
|
||||||
|
|
||||||
prefs.edit {
|
|
||||||
putString(libraryPreferences.sortingMode().key(), newSortingMode)
|
|
||||||
putString("library_sorting_ascending", newSortingDirection)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (oldVersion < 70) {
|
|
||||||
if (sourcePreferences.enabledLanguages().isSet()) {
|
|
||||||
sourcePreferences.enabledLanguages() += "all"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (oldVersion < 71) {
|
|
||||||
// Handle removed every 3, 4, 6, and 8 hour library updates
|
|
||||||
val updateInterval = libraryPreferences.autoUpdateInterval().get()
|
|
||||||
if (updateInterval in listOf(3, 4, 6, 8)) {
|
|
||||||
libraryPreferences.autoUpdateInterval().set(12)
|
|
||||||
LibraryUpdateJob.setupTask(context, 12)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (oldVersion < 72) {
|
|
||||||
val oldUpdateOngoingOnly = prefs.getBoolean("pref_update_only_non_completed_key", true)
|
|
||||||
if (!oldUpdateOngoingOnly) {
|
|
||||||
libraryPreferences.autoUpdateMangaRestrictions() -= MANGA_NON_COMPLETED
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (oldVersion < 75) {
|
|
||||||
val oldSecureScreen = prefs.getBoolean("secure_screen", false)
|
|
||||||
if (oldSecureScreen) {
|
|
||||||
securityPreferences.secureScreen().set(SecurityPreferences.SecureScreenMode.ALWAYS)
|
|
||||||
}
|
|
||||||
if (
|
|
||||||
DeviceUtil.isMiui &&
|
|
||||||
basePreferences.extensionInstaller().get() == BasePreferences.ExtensionInstaller.PACKAGEINSTALLER
|
|
||||||
) {
|
|
||||||
basePreferences.extensionInstaller().set(BasePreferences.ExtensionInstaller.LEGACY)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (oldVersion < 77) {
|
|
||||||
val oldReaderTap = prefs.getBoolean("reader_tap", false)
|
|
||||||
if (!oldReaderTap) {
|
|
||||||
readerPreferences.navigationModePager().set(5)
|
|
||||||
readerPreferences.navigationModeWebtoon().set(5)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (oldVersion < 81) {
|
|
||||||
// Handle renamed enum values
|
|
||||||
prefs.edit {
|
|
||||||
val newSortingMode = when (
|
|
||||||
val oldSortingMode = prefs.getString(
|
|
||||||
libraryPreferences.sortingMode().key(),
|
|
||||||
"ALPHABETICAL",
|
|
||||||
)
|
|
||||||
) {
|
|
||||||
"LAST_CHECKED" -> "LAST_MANGA_UPDATE"
|
|
||||||
"UNREAD" -> "UNREAD_COUNT"
|
|
||||||
"DATE_FETCHED" -> "CHAPTER_FETCH_DATE"
|
|
||||||
else -> oldSortingMode
|
|
||||||
}
|
|
||||||
putString(libraryPreferences.sortingMode().key(), newSortingMode)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (oldVersion < 82) {
|
|
||||||
prefs.edit {
|
|
||||||
val sort = prefs.getString(libraryPreferences.sortingMode().key(), null) ?: return@edit
|
|
||||||
val direction = prefs.getString("library_sorting_ascending", "ASCENDING")!!
|
|
||||||
putString(libraryPreferences.sortingMode().key(), "$sort,$direction")
|
|
||||||
remove("library_sorting_ascending")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (oldVersion < 84) {
|
|
||||||
if (backupPreferences.backupInterval().get() == 0) {
|
|
||||||
backupPreferences.backupInterval().set(12)
|
|
||||||
BackupCreateJob.setupTask(context)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (oldVersion < 85) {
|
|
||||||
val preferences = listOf(
|
|
||||||
libraryPreferences.filterChapterByRead(),
|
|
||||||
libraryPreferences.filterChapterByDownloaded(),
|
|
||||||
libraryPreferences.filterChapterByBookmarked(),
|
|
||||||
libraryPreferences.sortChapterBySourceOrNumber(),
|
|
||||||
libraryPreferences.displayChapterByNameOrNumber(),
|
|
||||||
libraryPreferences.sortChapterByAscendingOrDescending(),
|
|
||||||
)
|
|
||||||
|
|
||||||
prefs.edit {
|
|
||||||
preferences.forEach { preference ->
|
|
||||||
val key = preference.key()
|
|
||||||
val value = prefs.getInt(key, Int.MIN_VALUE)
|
|
||||||
if (value == Int.MIN_VALUE) return@forEach
|
|
||||||
remove(key)
|
|
||||||
putLong(key, value.toLong())
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (oldVersion < 86) {
|
|
||||||
if (uiPreferences.themeMode().isSet()) {
|
|
||||||
prefs.edit {
|
|
||||||
val themeMode = prefs.getString(uiPreferences.themeMode().key(), null) ?: return@edit
|
|
||||||
putString(uiPreferences.themeMode().key(), themeMode.uppercase())
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (oldVersion < 92) {
|
|
||||||
val trackingQueuePref = context.getSharedPreferences("tracking_queue", Context.MODE_PRIVATE)
|
|
||||||
trackingQueuePref.all.forEach {
|
|
||||||
val (_, lastChapterRead) = it.value.toString().split(":")
|
|
||||||
trackingQueuePref.edit {
|
|
||||||
remove(it.key)
|
|
||||||
putFloat(it.key, lastChapterRead.toFloat())
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (oldVersion < 96) {
|
|
||||||
LibraryUpdateJob.cancelAllWorks(context)
|
|
||||||
LibraryUpdateJob.setupTask(context)
|
|
||||||
}
|
|
||||||
if (oldVersion < 97) {
|
|
||||||
// Removed background jobs
|
|
||||||
context.workManager.cancelAllWorkByTag("UpdateChecker")
|
|
||||||
context.workManager.cancelAllWorkByTag("ExtensionUpdate")
|
|
||||||
prefs.edit {
|
|
||||||
remove("automatic_ext_updates")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (oldVersion < 99) {
|
|
||||||
val prefKeys = listOf(
|
|
||||||
"pref_filter_library_downloaded",
|
|
||||||
"pref_filter_library_unread",
|
|
||||||
"pref_filter_library_started",
|
|
||||||
"pref_filter_library_bookmarked",
|
|
||||||
"pref_filter_library_completed",
|
|
||||||
) + trackerManager.trackers.map { "pref_filter_library_tracked_${it.id}" }
|
|
||||||
|
|
||||||
prefKeys.forEach { key ->
|
|
||||||
val pref = preferenceStore.getInt(key, 0)
|
|
||||||
prefs.edit {
|
|
||||||
remove(key)
|
|
||||||
|
|
||||||
val newValue = when (pref.get()) {
|
|
||||||
1 -> TriState.ENABLED_IS
|
|
||||||
2 -> TriState.ENABLED_NOT
|
|
||||||
else -> TriState.DISABLED
|
|
||||||
}
|
|
||||||
|
|
||||||
preferenceStore.getEnum("${key}_v2", TriState.DISABLED).set(newValue)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (oldVersion < 105) {
|
|
||||||
val pref = libraryPreferences.autoUpdateDeviceRestrictions()
|
|
||||||
if (pref.isSet() && "battery_not_low" in pref.get()) {
|
|
||||||
pref.getAndSet { it - "battery_not_low" }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (oldVersion < 106) {
|
|
||||||
val pref = preferenceStore.getInt("relative_time", 7)
|
|
||||||
if (pref.get() == 0) {
|
|
||||||
uiPreferences.relativeTime().set(false)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (oldVersion < 113) {
|
|
||||||
val prefsToReplace = listOf(
|
|
||||||
"pref_download_only",
|
|
||||||
"incognito_mode",
|
|
||||||
"last_catalogue_source",
|
|
||||||
"trusted_signatures",
|
|
||||||
"last_app_closed",
|
|
||||||
"library_update_last_timestamp",
|
|
||||||
"library_unseen_updates_count",
|
|
||||||
"last_used_category",
|
|
||||||
"last_app_check",
|
|
||||||
"last_ext_check",
|
|
||||||
"last_version_code",
|
|
||||||
"storage_dir",
|
|
||||||
)
|
|
||||||
replacePreferences(
|
|
||||||
preferenceStore = preferenceStore,
|
|
||||||
filterPredicate = { it.key in prefsToReplace },
|
|
||||||
newKey = { Preference.appStateKey(it) },
|
|
||||||
)
|
|
||||||
|
|
||||||
// Deleting old download cache index files, but might as well clear it all out
|
|
||||||
context.cacheDir.deleteRecursively()
|
|
||||||
}
|
|
||||||
if (oldVersion < 114) {
|
|
||||||
sourcePreferences.extensionRepos().getAndSet {
|
|
||||||
it.map { repo -> "https://raw.githubusercontent.com/$repo/repo" }.toSet()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (oldVersion < 116) {
|
|
||||||
replacePreferences(
|
|
||||||
preferenceStore = preferenceStore,
|
|
||||||
filterPredicate = { it.key.startsWith("pref_mangasync_") || it.key.startsWith("track_token_") },
|
|
||||||
newKey = { Preference.privateKey(it) },
|
|
||||||
)
|
|
||||||
}
|
|
||||||
if (oldVersion < 117) {
|
|
||||||
prefs.edit {
|
|
||||||
remove(Preference.appStateKey("trusted_signatures"))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return true
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Suppress("UNCHECKED_CAST")
|
|
||||||
private fun replacePreferences(
|
|
||||||
preferenceStore: PreferenceStore,
|
|
||||||
filterPredicate: (Map.Entry<String, Any?>) -> Boolean,
|
|
||||||
newKey: (String) -> String,
|
|
||||||
) {
|
|
||||||
preferenceStore.getAll()
|
|
||||||
.filter(filterPredicate)
|
|
||||||
.forEach { (key, value) ->
|
|
||||||
when (value) {
|
|
||||||
is Int -> {
|
|
||||||
preferenceStore.getInt(newKey(key)).set(value)
|
|
||||||
preferenceStore.getInt(key).delete()
|
|
||||||
}
|
|
||||||
is Long -> {
|
|
||||||
preferenceStore.getLong(newKey(key)).set(value)
|
|
||||||
preferenceStore.getLong(key).delete()
|
|
||||||
}
|
|
||||||
is Float -> {
|
|
||||||
preferenceStore.getFloat(newKey(key)).set(value)
|
|
||||||
preferenceStore.getFloat(key).delete()
|
|
||||||
}
|
|
||||||
is String -> {
|
|
||||||
preferenceStore.getString(newKey(key)).set(value)
|
|
||||||
preferenceStore.getString(key).delete()
|
|
||||||
}
|
|
||||||
is Boolean -> {
|
|
||||||
preferenceStore.getBoolean(newKey(key)).set(value)
|
|
||||||
preferenceStore.getBoolean(key).delete()
|
|
||||||
}
|
|
||||||
is Set<*> -> (value as? Set<String>)?.let {
|
|
||||||
preferenceStore.getStringSet(newKey(key)).set(value)
|
|
||||||
preferenceStore.getStringSet(key).delete()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
@ -28,7 +28,7 @@ class BackupNotifier(private val context: Context) {
|
|||||||
Notifications.CHANNEL_BACKUP_RESTORE_PROGRESS,
|
Notifications.CHANNEL_BACKUP_RESTORE_PROGRESS,
|
||||||
) {
|
) {
|
||||||
setLargeIcon(BitmapFactory.decodeResource(context.resources, R.mipmap.ic_launcher))
|
setLargeIcon(BitmapFactory.decodeResource(context.resources, R.mipmap.ic_launcher))
|
||||||
setSmallIcon(R.drawable.ic_tachi)
|
setSmallIcon(R.drawable.ic_mihon)
|
||||||
setAutoCancel(false)
|
setAutoCancel(false)
|
||||||
setOngoing(true)
|
setOngoing(true)
|
||||||
setOnlyAlertOnce(true)
|
setOnlyAlertOnce(true)
|
||||||
@ -38,7 +38,7 @@ class BackupNotifier(private val context: Context) {
|
|||||||
Notifications.CHANNEL_BACKUP_RESTORE_COMPLETE,
|
Notifications.CHANNEL_BACKUP_RESTORE_COMPLETE,
|
||||||
) {
|
) {
|
||||||
setLargeIcon(BitmapFactory.decodeResource(context.resources, R.mipmap.ic_launcher))
|
setLargeIcon(BitmapFactory.decodeResource(context.resources, R.mipmap.ic_launcher))
|
||||||
setSmallIcon(R.drawable.ic_tachi)
|
setSmallIcon(R.drawable.ic_mihon)
|
||||||
setAutoCancel(false)
|
setAutoCancel(false)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
package eu.kanade.tachiyomi.data.coil
|
package eu.kanade.tachiyomi.data.coil
|
||||||
|
|
||||||
import android.os.Build
|
|
||||||
import androidx.core.graphics.drawable.toDrawable
|
import androidx.core.graphics.drawable.toDrawable
|
||||||
import coil.ImageLoader
|
import coil.ImageLoader
|
||||||
import coil.decode.DecodeResult
|
import coil.decode.DecodeResult
|
||||||
@ -48,8 +47,7 @@ class TachiyomiImageDecoder(private val resources: ImageSource, private val opti
|
|||||||
ImageUtil.findImageType(it)
|
ImageUtil.findImageType(it)
|
||||||
}
|
}
|
||||||
return when (type) {
|
return when (type) {
|
||||||
ImageUtil.ImageType.AVIF, ImageUtil.ImageType.JXL -> true
|
ImageUtil.ImageType.AVIF, ImageUtil.ImageType.JXL, ImageUtil.ImageType.HEIF -> true
|
||||||
ImageUtil.ImageType.HEIF -> Build.VERSION.SDK_INT < Build.VERSION_CODES.O
|
|
||||||
else -> false
|
else -> false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -413,7 +413,7 @@ class LibraryUpdateJob(private val context: Context, workerParams: WorkerParamet
|
|||||||
private const val WORK_NAME_AUTO = "LibraryUpdate-auto"
|
private const val WORK_NAME_AUTO = "LibraryUpdate-auto"
|
||||||
private const val WORK_NAME_MANUAL = "LibraryUpdate-manual"
|
private const val WORK_NAME_MANUAL = "LibraryUpdate-manual"
|
||||||
|
|
||||||
private const val ERROR_LOG_HELP_URL = "https://tachiyomi.org/docs/guides/troubleshooting/"
|
private const val ERROR_LOG_HELP_URL = "https://mihon.app/docs/guides/troubleshooting/"
|
||||||
|
|
||||||
private const val MANGA_PER_SOURCE_QUEUE_WARNING_THRESHOLD = 60
|
private const val MANGA_PER_SOURCE_QUEUE_WARNING_THRESHOLD = 60
|
||||||
|
|
||||||
|
@ -153,7 +153,7 @@ class LibraryUpdateNotifier(
|
|||||||
) {
|
) {
|
||||||
setContentTitle(context.stringResource(MR.strings.notification_update_error, failed))
|
setContentTitle(context.stringResource(MR.strings.notification_update_error, failed))
|
||||||
setContentText(context.stringResource(MR.strings.action_show_errors))
|
setContentText(context.stringResource(MR.strings.action_show_errors))
|
||||||
setSmallIcon(R.drawable.ic_tachi)
|
setSmallIcon(R.drawable.ic_mihon)
|
||||||
|
|
||||||
setContentIntent(NotificationReceiver.openErrorLogPendingActivity(context, uri))
|
setContentIntent(NotificationReceiver.openErrorLogPendingActivity(context, uri))
|
||||||
}
|
}
|
||||||
@ -193,7 +193,7 @@ class LibraryUpdateNotifier(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
setSmallIcon(R.drawable.ic_tachi)
|
setSmallIcon(R.drawable.ic_mihon)
|
||||||
setLargeIcon(notificationBitmap)
|
setLargeIcon(notificationBitmap)
|
||||||
|
|
||||||
setGroup(Notifications.GROUP_NEW_CHAPTERS)
|
setGroup(Notifications.GROUP_NEW_CHAPTERS)
|
||||||
@ -229,7 +229,7 @@ class LibraryUpdateNotifier(
|
|||||||
setContentText(description)
|
setContentText(description)
|
||||||
setStyle(NotificationCompat.BigTextStyle().bigText(description))
|
setStyle(NotificationCompat.BigTextStyle().bigText(description))
|
||||||
|
|
||||||
setSmallIcon(R.drawable.ic_tachi)
|
setSmallIcon(R.drawable.ic_mihon)
|
||||||
|
|
||||||
if (icon != null) {
|
if (icon != null) {
|
||||||
setLargeIcon(icon)
|
setLargeIcon(icon)
|
||||||
@ -377,7 +377,7 @@ class LibraryUpdateNotifier(
|
|||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
const val HELP_WARNING_URL =
|
const val HELP_WARNING_URL =
|
||||||
"https://tachiyomi.org/docs/faq/library#why-am-i-warned-about-large-bulk-updates-and-downloads"
|
"https://mihon.app/docs/faq/library#why-am-i-warned-about-large-bulk-updates-and-downloads"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5,7 +5,6 @@ import android.content.BroadcastReceiver
|
|||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
import android.net.Uri
|
import android.net.Uri
|
||||||
import android.os.Build
|
|
||||||
import androidx.core.net.toUri
|
import androidx.core.net.toUri
|
||||||
import eu.kanade.tachiyomi.data.backup.restore.BackupRestoreJob
|
import eu.kanade.tachiyomi.data.backup.restore.BackupRestoreJob
|
||||||
import eu.kanade.tachiyomi.data.download.DownloadManager
|
import eu.kanade.tachiyomi.data.download.DownloadManager
|
||||||
@ -354,20 +353,18 @@ class NotificationReceiver : BroadcastReceiver() {
|
|||||||
|
|
||||||
When programmatically dismissing this notification, the group notification is not automatically dismissed.
|
When programmatically dismissing this notification, the group notification is not automatically dismissed.
|
||||||
*/
|
*/
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
|
val groupKey = context.notificationManager.activeNotifications.find {
|
||||||
val groupKey = context.notificationManager.activeNotifications.find {
|
it.id == notificationId
|
||||||
it.id == notificationId
|
}?.groupKey
|
||||||
}?.groupKey
|
|
||||||
|
|
||||||
if (groupId != null && groupId != 0 && !groupKey.isNullOrEmpty()) {
|
if (groupId != null && groupId != 0 && !groupKey.isNullOrEmpty()) {
|
||||||
val notifications = context.notificationManager.activeNotifications.filter {
|
val notifications = context.notificationManager.activeNotifications.filter {
|
||||||
it.groupKey == groupKey
|
it.groupKey == groupKey
|
||||||
}
|
}
|
||||||
|
|
||||||
if (notifications.size == 2) {
|
if (notifications.size == 2) {
|
||||||
context.cancelNotification(groupId)
|
context.cancelNotification(groupId)
|
||||||
return
|
return
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -363,7 +363,7 @@ class AnilistApi(val client: OkHttpClient, interceptor: AnilistInterceptor) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
private const val clientId = "385"
|
private const val clientId = "16329"
|
||||||
private const val apiUrl = "https://graphql.anilist.co/"
|
private const val apiUrl = "https://graphql.anilist.co/"
|
||||||
private const val baseUrl = "https://anilist.co/api/v2/"
|
private const val baseUrl = "https://anilist.co/api/v2/"
|
||||||
private const val baseMangaUrl = "https://anilist.co/manga/"
|
private const val baseMangaUrl = "https://anilist.co/manga/"
|
||||||
|
@ -189,7 +189,7 @@ class BangumiApi(
|
|||||||
private const val oauthUrl = "https://bgm.tv/oauth/access_token"
|
private const val oauthUrl = "https://bgm.tv/oauth/access_token"
|
||||||
private const val loginUrl = "https://bgm.tv/oauth/authorize"
|
private const val loginUrl = "https://bgm.tv/oauth/authorize"
|
||||||
|
|
||||||
private const val redirectUrl = "tachiyomi://bangumi-auth"
|
private const val redirectUrl = "mihon://bangumi-auth"
|
||||||
|
|
||||||
fun authUrl(): Uri =
|
fun authUrl(): Uri =
|
||||||
loginUrl.toUri().buildUpon()
|
loginUrl.toUri().buildUpon()
|
||||||
|
@ -6,6 +6,8 @@ import eu.kanade.tachiyomi.R
|
|||||||
import eu.kanade.tachiyomi.data.database.models.Track
|
import eu.kanade.tachiyomi.data.database.models.Track
|
||||||
import eu.kanade.tachiyomi.data.track.BaseTracker
|
import eu.kanade.tachiyomi.data.track.BaseTracker
|
||||||
import eu.kanade.tachiyomi.data.track.DeletableTracker
|
import eu.kanade.tachiyomi.data.track.DeletableTracker
|
||||||
|
import eu.kanade.tachiyomi.data.track.mangaupdates.dto.ListItem
|
||||||
|
import eu.kanade.tachiyomi.data.track.mangaupdates.dto.Rating
|
||||||
import eu.kanade.tachiyomi.data.track.mangaupdates.dto.copyTo
|
import eu.kanade.tachiyomi.data.track.mangaupdates.dto.copyTo
|
||||||
import eu.kanade.tachiyomi.data.track.mangaupdates.dto.toTrackSearch
|
import eu.kanade.tachiyomi.data.track.mangaupdates.dto.toTrackSearch
|
||||||
import eu.kanade.tachiyomi.data.track.model.TrackSearch
|
import eu.kanade.tachiyomi.data.track.model.TrackSearch
|
||||||
@ -23,10 +25,16 @@ class MangaUpdates(id: Long) : BaseTracker(id, "MangaUpdates"), DeletableTracker
|
|||||||
const val UNFINISHED_LIST = 3
|
const val UNFINISHED_LIST = 3
|
||||||
const val ON_HOLD_LIST = 4
|
const val ON_HOLD_LIST = 4
|
||||||
|
|
||||||
private val SCORE_LIST = (
|
private val SCORE_LIST = (0..10)
|
||||||
(0..9)
|
.flatMap { decimal ->
|
||||||
.flatMap { i -> (0..9).map { j -> "$i.$j" } } + listOf("10.0")
|
when (decimal) {
|
||||||
)
|
0 -> listOf("-")
|
||||||
|
10 -> listOf("10.0")
|
||||||
|
else -> (0..9).map { fraction ->
|
||||||
|
"$decimal.$fraction"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
.toImmutableList()
|
.toImmutableList()
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -59,7 +67,7 @@ class MangaUpdates(id: Long) : BaseTracker(id, "MangaUpdates"), DeletableTracker
|
|||||||
|
|
||||||
override fun getScoreList(): ImmutableList<String> = SCORE_LIST
|
override fun getScoreList(): ImmutableList<String> = SCORE_LIST
|
||||||
|
|
||||||
override fun indexToScore(index: Int): Float = SCORE_LIST[index].toFloat()
|
override fun indexToScore(index: Int): Float = if (index == 0) 0f else SCORE_LIST[index].toFloat()
|
||||||
|
|
||||||
override fun displayScore(track: DomainTrack): String = track.score.toString()
|
override fun displayScore(track: DomainTrack): String = track.score.toString()
|
||||||
|
|
||||||
@ -78,9 +86,9 @@ class MangaUpdates(id: Long) : BaseTracker(id, "MangaUpdates"), DeletableTracker
|
|||||||
override suspend fun bind(track: Track, hasReadChapters: Boolean): Track {
|
override suspend fun bind(track: Track, hasReadChapters: Boolean): Track {
|
||||||
return try {
|
return try {
|
||||||
val (series, rating) = api.getSeriesListItem(track)
|
val (series, rating) = api.getSeriesListItem(track)
|
||||||
series.copyTo(track)
|
track.copyFrom(series, rating)
|
||||||
rating?.copyTo(track) ?: track
|
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
|
track.score = 0f
|
||||||
api.addSeriesToList(track, hasReadChapters)
|
api.addSeriesToList(track, hasReadChapters)
|
||||||
track
|
track
|
||||||
}
|
}
|
||||||
@ -95,8 +103,12 @@ class MangaUpdates(id: Long) : BaseTracker(id, "MangaUpdates"), DeletableTracker
|
|||||||
|
|
||||||
override suspend fun refresh(track: Track): Track {
|
override suspend fun refresh(track: Track): Track {
|
||||||
val (series, rating) = api.getSeriesListItem(track)
|
val (series, rating) = api.getSeriesListItem(track)
|
||||||
series.copyTo(track)
|
return track.copyFrom(series, rating)
|
||||||
return rating?.copyTo(track) ?: track
|
}
|
||||||
|
|
||||||
|
private fun Track.copyFrom(item: ListItem, rating: Rating?): Track = apply {
|
||||||
|
item.copyTo(this)
|
||||||
|
score = rating?.rating ?: 0f
|
||||||
}
|
}
|
||||||
|
|
||||||
override suspend fun login(username: String, password: String) {
|
override suspend fun login(username: String, password: String) {
|
||||||
@ -106,6 +118,6 @@ class MangaUpdates(id: Long) : BaseTracker(id, "MangaUpdates"), DeletableTracker
|
|||||||
}
|
}
|
||||||
|
|
||||||
fun restoreSession(): String? {
|
fun restoreSession(): String? {
|
||||||
return trackPreferences.trackPassword(this).get()
|
return trackPreferences.trackPassword(this).get().ifBlank { null }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package eu.kanade.tachiyomi.data.track.mangaupdates
|
package eu.kanade.tachiyomi.data.track.mangaupdates
|
||||||
|
|
||||||
|
import eu.kanade.tachiyomi.BuildConfig
|
||||||
import okhttp3.Interceptor
|
import okhttp3.Interceptor
|
||||||
import okhttp3.Response
|
import okhttp3.Response
|
||||||
import java.io.IOException
|
import java.io.IOException
|
||||||
@ -18,6 +19,7 @@ class MangaUpdatesInterceptor(
|
|||||||
// Add the authorization header to the original request.
|
// Add the authorization header to the original request.
|
||||||
val authRequest = originalRequest.newBuilder()
|
val authRequest = originalRequest.newBuilder()
|
||||||
.addHeader("Authorization", "Bearer $token")
|
.addHeader("Authorization", "Bearer $token")
|
||||||
|
.header("User-Agent", "Mihon v${BuildConfig.VERSION_NAME} (${BuildConfig.APPLICATION_ID})")
|
||||||
.build()
|
.build()
|
||||||
|
|
||||||
return chain.proceed(authRequest)
|
return chain.proceed(authRequest)
|
||||||
|
@ -278,7 +278,7 @@ class MyAnimeListApi(
|
|||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
// Registered under arkon's MAL account
|
// Registered under arkon's MAL account
|
||||||
private const val clientId = "8fd3313bc138e8b890551aa1de1a2589"
|
private const val clientId = "f46004a9c16483b6d87b5bf10de56d97"
|
||||||
|
|
||||||
private const val baseOAuthUrl = "https://myanimelist.net/v1/oauth2"
|
private const val baseOAuthUrl = "https://myanimelist.net/v1/oauth2"
|
||||||
private const val baseApiUrl = "https://api.myanimelist.net/v2"
|
private const val baseApiUrl = "https://api.myanimelist.net/v2"
|
||||||
|
@ -200,7 +200,7 @@ class ShikimoriApi(
|
|||||||
private const val oauthUrl = "$baseUrl/oauth/token"
|
private const val oauthUrl = "$baseUrl/oauth/token"
|
||||||
private const val loginUrl = "$baseUrl/oauth/authorize"
|
private const val loginUrl = "$baseUrl/oauth/authorize"
|
||||||
|
|
||||||
private const val redirectUrl = "tachiyomi://shikimori-auth"
|
private const val redirectUrl = "mihon://shikimori-auth"
|
||||||
|
|
||||||
fun authUrl(): Uri = loginUrl.toUri().buildUpon()
|
fun authUrl(): Uri = loginUrl.toUri().buildUpon()
|
||||||
.appendQueryParameter("client_id", clientId)
|
.appendQueryParameter("client_id", clientId)
|
||||||
|
@ -44,9 +44,9 @@ class AppUpdateChecker {
|
|||||||
|
|
||||||
val GITHUB_REPO: String by lazy {
|
val GITHUB_REPO: String by lazy {
|
||||||
if (BuildConfig.PREVIEW) {
|
if (BuildConfig.PREVIEW) {
|
||||||
"tachiyomiorg/tachiyomi-preview"
|
"mihonapp/mihon-preview"
|
||||||
} else {
|
} else {
|
||||||
"tachiyomiorg/tachiyomi"
|
"mihonapp/mihon"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -149,11 +149,11 @@ internal class AppUpdateNotifier(private val context: Context) {
|
|||||||
with(notificationBuilder) {
|
with(notificationBuilder) {
|
||||||
setContentTitle(context.stringResource(MR.strings.update_check_notification_update_available))
|
setContentTitle(context.stringResource(MR.strings.update_check_notification_update_available))
|
||||||
setContentText(context.stringResource(MR.strings.update_check_fdroid_migration_info))
|
setContentText(context.stringResource(MR.strings.update_check_fdroid_migration_info))
|
||||||
setSmallIcon(R.drawable.ic_tachi)
|
setSmallIcon(R.drawable.ic_mihon)
|
||||||
setContentIntent(
|
setContentIntent(
|
||||||
NotificationHandler.openUrl(
|
NotificationHandler.openUrl(
|
||||||
context,
|
context,
|
||||||
"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",
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -2,7 +2,6 @@ package eu.kanade.tachiyomi.extension.installer
|
|||||||
|
|
||||||
import android.app.Service
|
import android.app.Service
|
||||||
import android.content.pm.PackageManager
|
import android.content.pm.PackageManager
|
||||||
import android.os.Build
|
|
||||||
import eu.kanade.tachiyomi.extension.model.InstallStep
|
import eu.kanade.tachiyomi.extension.model.InstallStep
|
||||||
import eu.kanade.tachiyomi.util.system.getUriSize
|
import eu.kanade.tachiyomi.util.system.getUriSize
|
||||||
import eu.kanade.tachiyomi.util.system.toast
|
import eu.kanade.tachiyomi.util.system.toast
|
||||||
@ -50,11 +49,7 @@ class ShizukuInstaller(private val service: Service) : Installer(service) {
|
|||||||
try {
|
try {
|
||||||
val size = service.getUriSize(entry.uri) ?: throw IllegalStateException()
|
val size = service.getUriSize(entry.uri) ?: throw IllegalStateException()
|
||||||
service.contentResolver.openInputStream(entry.uri)!!.use {
|
service.contentResolver.openInputStream(entry.uri)!!.use {
|
||||||
val createCommand = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
|
val createCommand = "pm install-create --user current -r -i ${service.packageName} -S $size"
|
||||||
"pm install-create --user current -r -i ${service.packageName} -S $size"
|
|
||||||
} else {
|
|
||||||
"pm install-create -r -i ${service.packageName} -S $size"
|
|
||||||
}
|
|
||||||
val createResult = exec(createCommand)
|
val createResult = exec(createCommand)
|
||||||
sessionId = SESSION_ID_REGEX.find(createResult.out)?.value
|
sessionId = SESSION_ID_REGEX.find(createResult.out)?.value
|
||||||
?: throw RuntimeException("Failed to create install session")
|
?: throw RuntimeException("Failed to create install session")
|
||||||
|
@ -25,7 +25,7 @@ class ExtensionInstallService : Service() {
|
|||||||
|
|
||||||
override fun onCreate() {
|
override fun onCreate() {
|
||||||
val notification = notificationBuilder(Notifications.CHANNEL_EXTENSIONS_UPDATE) {
|
val notification = notificationBuilder(Notifications.CHANNEL_EXTENSIONS_UPDATE) {
|
||||||
setSmallIcon(R.drawable.ic_tachi)
|
setSmallIcon(R.drawable.ic_mihon)
|
||||||
setAutoCancel(false)
|
setAutoCancel(false)
|
||||||
setOngoing(true)
|
setOngoing(true)
|
||||||
setShowWhen(false)
|
setShowWhen(false)
|
||||||
|
@ -32,7 +32,7 @@ fun Screen.migrateSourceTab(): TabContent {
|
|||||||
title = stringResource(MR.strings.migration_help_guide),
|
title = stringResource(MR.strings.migration_help_guide),
|
||||||
icon = Icons.AutoMirrored.Outlined.HelpOutline,
|
icon = Icons.AutoMirrored.Outlined.HelpOutline,
|
||||||
onClick = {
|
onClick = {
|
||||||
uriHandler.openUri("https://tachiyomi.org/docs/guides/source-migration")
|
uriHandler.openUri("https://mihon.app/docs/guides/source-migration")
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -65,6 +65,7 @@ import eu.kanade.tachiyomi.Migrations
|
|||||||
import eu.kanade.tachiyomi.data.cache.ChapterCache
|
import eu.kanade.tachiyomi.data.cache.ChapterCache
|
||||||
import eu.kanade.tachiyomi.data.download.DownloadCache
|
import eu.kanade.tachiyomi.data.download.DownloadCache
|
||||||
import eu.kanade.tachiyomi.data.notification.NotificationReceiver
|
import eu.kanade.tachiyomi.data.notification.NotificationReceiver
|
||||||
|
import eu.kanade.tachiyomi.data.updater.AppUpdateChecker
|
||||||
import eu.kanade.tachiyomi.data.updater.RELEASE_URL
|
import eu.kanade.tachiyomi.data.updater.RELEASE_URL
|
||||||
import eu.kanade.tachiyomi.extension.api.ExtensionApi
|
import eu.kanade.tachiyomi.extension.api.ExtensionApi
|
||||||
import eu.kanade.tachiyomi.ui.base.activity.BaseActivity
|
import eu.kanade.tachiyomi.ui.base.activity.BaseActivity
|
||||||
@ -73,6 +74,7 @@ import eu.kanade.tachiyomi.ui.browse.source.globalsearch.GlobalSearchScreen
|
|||||||
import eu.kanade.tachiyomi.ui.deeplink.DeepLinkScreen
|
import eu.kanade.tachiyomi.ui.deeplink.DeepLinkScreen
|
||||||
import eu.kanade.tachiyomi.ui.home.HomeScreen
|
import eu.kanade.tachiyomi.ui.home.HomeScreen
|
||||||
import eu.kanade.tachiyomi.ui.manga.MangaScreen
|
import eu.kanade.tachiyomi.ui.manga.MangaScreen
|
||||||
|
import eu.kanade.tachiyomi.ui.more.NewUpdateScreen
|
||||||
import eu.kanade.tachiyomi.ui.more.OnboardingScreen
|
import eu.kanade.tachiyomi.ui.more.OnboardingScreen
|
||||||
import eu.kanade.tachiyomi.util.system.dpToPx
|
import eu.kanade.tachiyomi.util.system.dpToPx
|
||||||
import eu.kanade.tachiyomi.util.system.isNavigationBarNeedsScrim
|
import eu.kanade.tachiyomi.util.system.isNavigationBarNeedsScrim
|
||||||
@ -91,6 +93,7 @@ import tachiyomi.core.Constants
|
|||||||
import tachiyomi.core.util.lang.launchIO
|
import tachiyomi.core.util.lang.launchIO
|
||||||
import tachiyomi.core.util.system.logcat
|
import tachiyomi.core.util.system.logcat
|
||||||
import tachiyomi.domain.library.service.LibraryPreferences
|
import tachiyomi.domain.library.service.LibraryPreferences
|
||||||
|
import tachiyomi.domain.release.interactor.GetApplicationRelease
|
||||||
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
|
||||||
@ -130,16 +133,7 @@ class MainActivity : BaseActivity() {
|
|||||||
val didMigration = if (isLaunch) {
|
val didMigration = if (isLaunch) {
|
||||||
Migrations.upgrade(
|
Migrations.upgrade(
|
||||||
context = applicationContext,
|
context = applicationContext,
|
||||||
basePreferences = preferences,
|
|
||||||
uiPreferences = uiPreferences,
|
|
||||||
preferenceStore = Injekt.get(),
|
preferenceStore = Injekt.get(),
|
||||||
networkPreferences = Injekt.get(),
|
|
||||||
sourcePreferences = sourcePreferences,
|
|
||||||
securityPreferences = Injekt.get(),
|
|
||||||
libraryPreferences = libraryPreferences,
|
|
||||||
readerPreferences = Injekt.get(),
|
|
||||||
backupPreferences = Injekt.get(),
|
|
||||||
trackerManager = Injekt.get(),
|
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
false
|
false
|
||||||
@ -311,6 +305,27 @@ class MainActivity : BaseActivity() {
|
|||||||
@Composable
|
@Composable
|
||||||
private fun CheckForUpdates() {
|
private fun CheckForUpdates() {
|
||||||
val context = LocalContext.current
|
val context = LocalContext.current
|
||||||
|
val navigator = LocalNavigator.currentOrThrow
|
||||||
|
|
||||||
|
// App updates
|
||||||
|
LaunchedEffect(Unit) {
|
||||||
|
if (BuildConfig.INCLUDE_UPDATER) {
|
||||||
|
try {
|
||||||
|
val result = AppUpdateChecker().checkForUpdate(context)
|
||||||
|
if (result is GetApplicationRelease.Result.NewUpdate) {
|
||||||
|
val updateScreen = NewUpdateScreen(
|
||||||
|
versionName = result.release.version,
|
||||||
|
changelogInfo = result.release.info,
|
||||||
|
releaseLink = result.release.releaseLink,
|
||||||
|
downloadLink = result.release.getDownloadLink(),
|
||||||
|
)
|
||||||
|
navigator.push(updateScreen)
|
||||||
|
}
|
||||||
|
} catch (e: Exception) {
|
||||||
|
logcat(LogPriority.ERROR, e)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Extensions updates
|
// Extensions updates
|
||||||
LaunchedEffect(Unit) {
|
LaunchedEffect(Unit) {
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
package eu.kanade.tachiyomi.ui.reader.loader
|
package eu.kanade.tachiyomi.ui.reader.loader
|
||||||
|
|
||||||
import android.os.Build
|
|
||||||
import eu.kanade.tachiyomi.source.model.Page
|
import eu.kanade.tachiyomi.source.model.Page
|
||||||
import eu.kanade.tachiyomi.ui.reader.model.ReaderPage
|
import eu.kanade.tachiyomi.ui.reader.model.ReaderPage
|
||||||
import eu.kanade.tachiyomi.util.lang.compareToCaseInsensitiveNaturalOrder
|
import eu.kanade.tachiyomi.util.lang.compareToCaseInsensitiveNaturalOrder
|
||||||
@ -14,11 +13,7 @@ import java.util.zip.ZipFile
|
|||||||
*/
|
*/
|
||||||
internal class ZipPageLoader(file: File) : PageLoader() {
|
internal class ZipPageLoader(file: File) : PageLoader() {
|
||||||
|
|
||||||
private val zip = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
|
private val zip = ZipFile(file, StandardCharsets.ISO_8859_1)
|
||||||
ZipFile(file, StandardCharsets.ISO_8859_1)
|
|
||||||
} else {
|
|
||||||
ZipFile(file)
|
|
||||||
}
|
|
||||||
|
|
||||||
override var isLocal: Boolean = true
|
override var isLocal: Boolean = true
|
||||||
|
|
||||||
|
@ -2,9 +2,7 @@ package eu.kanade.tachiyomi.util.storage
|
|||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.net.Uri
|
import android.net.Uri
|
||||||
import android.os.Build
|
|
||||||
import androidx.core.content.FileProvider
|
import androidx.core.content.FileProvider
|
||||||
import androidx.core.net.toUri
|
|
||||||
import eu.kanade.tachiyomi.BuildConfig
|
import eu.kanade.tachiyomi.BuildConfig
|
||||||
import java.io.File
|
import java.io.File
|
||||||
|
|
||||||
@ -17,11 +15,7 @@ val Context.cacheImageDir: File
|
|||||||
* @param context context of application
|
* @param context context of application
|
||||||
*/
|
*/
|
||||||
fun File.getUriCompat(context: Context): Uri {
|
fun File.getUriCompat(context: Context): Uri {
|
||||||
return if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
|
return FileProvider.getUriForFile(context, BuildConfig.APPLICATION_ID + ".provider", this)
|
||||||
FileProvider.getUriForFile(context, BuildConfig.APPLICATION_ID + ".provider", this)
|
|
||||||
} else {
|
|
||||||
this.toUri()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -170,12 +170,8 @@ fun Context.isInstalledFromFDroid(): Boolean {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fun Context.launchRequestPackageInstallsPermission() {
|
fun Context.launchRequestPackageInstallsPermission() {
|
||||||
val intent = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
Intent(Settings.ACTION_MANAGE_UNKNOWN_APP_SOURCES).apply {
|
||||||
Intent(Settings.ACTION_MANAGE_UNKNOWN_APP_SOURCES).apply {
|
data = Uri.parse("package:$packageName")
|
||||||
data = Uri.parse("package:$packageName")
|
startActivity(this)
|
||||||
}
|
|
||||||
} else {
|
|
||||||
Intent(Settings.ACTION_SECURITY_SETTINGS)
|
|
||||||
}
|
}
|
||||||
startActivity(intent)
|
|
||||||
}
|
}
|
||||||
|
@ -18,8 +18,7 @@ fun Context.isOnline(): Boolean {
|
|||||||
val networkCapabilities = connectivityManager.getNetworkCapabilities(activeNetwork) ?: return false
|
val networkCapabilities = connectivityManager.getNetworkCapabilities(activeNetwork) ?: return false
|
||||||
val maxTransport = when {
|
val maxTransport = when {
|
||||||
Build.VERSION.SDK_INT >= Build.VERSION_CODES.O_MR1 -> NetworkCapabilities.TRANSPORT_LOWPAN
|
Build.VERSION.SDK_INT >= Build.VERSION_CODES.O_MR1 -> NetworkCapabilities.TRANSPORT_LOWPAN
|
||||||
Build.VERSION.SDK_INT >= Build.VERSION_CODES.O -> NetworkCapabilities.TRANSPORT_WIFI_AWARE
|
else -> NetworkCapabilities.TRANSPORT_WIFI_AWARE
|
||||||
else -> NetworkCapabilities.TRANSPORT_VPN
|
|
||||||
}
|
}
|
||||||
return (NetworkCapabilities.TRANSPORT_CELLULAR..maxTransport).any(networkCapabilities::hasTransport)
|
return (NetworkCapabilities.TRANSPORT_CELLULAR..maxTransport).any(networkCapabilities::hasTransport)
|
||||||
}
|
}
|
||||||
|
@ -1,14 +1,9 @@
|
|||||||
package eu.kanade.tachiyomi.util.system
|
package eu.kanade.tachiyomi.util.system
|
||||||
|
|
||||||
import android.content.BroadcastReceiver
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.content.Intent
|
|
||||||
import android.content.IntentFilter
|
|
||||||
import android.net.ConnectivityManager
|
|
||||||
import android.net.ConnectivityManager.NetworkCallback
|
import android.net.ConnectivityManager.NetworkCallback
|
||||||
import android.net.Network
|
import android.net.Network
|
||||||
import android.net.NetworkCapabilities
|
import android.net.NetworkCapabilities
|
||||||
import android.os.Build
|
|
||||||
import kotlinx.coroutines.channels.awaitClose
|
import kotlinx.coroutines.channels.awaitClose
|
||||||
import kotlinx.coroutines.flow.callbackFlow
|
import kotlinx.coroutines.flow.callbackFlow
|
||||||
|
|
||||||
@ -17,11 +12,7 @@ data class NetworkState(
|
|||||||
val isValidated: Boolean,
|
val isValidated: Boolean,
|
||||||
val isWifi: Boolean,
|
val isWifi: Boolean,
|
||||||
) {
|
) {
|
||||||
val isOnline = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
val isOnline = isConnected && isValidated
|
||||||
isConnected && isValidated
|
|
||||||
} else {
|
|
||||||
isConnected
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Suppress("DEPRECATION")
|
@Suppress("DEPRECATION")
|
||||||
@ -34,34 +25,18 @@ fun Context.activeNetworkState(): NetworkState {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
@Suppress("DEPRECATION")
|
|
||||||
fun Context.networkStateFlow() = callbackFlow {
|
fun Context.networkStateFlow() = callbackFlow {
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
|
val networkCallback = object : NetworkCallback() {
|
||||||
val networkCallback = object : NetworkCallback() {
|
override fun onCapabilitiesChanged(network: Network, networkCapabilities: NetworkCapabilities) {
|
||||||
override fun onCapabilitiesChanged(network: Network, networkCapabilities: NetworkCapabilities) {
|
trySend(activeNetworkState())
|
||||||
trySend(activeNetworkState())
|
|
||||||
}
|
|
||||||
override fun onLost(network: Network) {
|
|
||||||
trySend(activeNetworkState())
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
override fun onLost(network: Network) {
|
||||||
connectivityManager.registerDefaultNetworkCallback(networkCallback)
|
trySend(activeNetworkState())
|
||||||
awaitClose {
|
|
||||||
connectivityManager.unregisterNetworkCallback(networkCallback)
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
val receiver = object : BroadcastReceiver() {
|
|
||||||
override fun onReceive(context: Context, intent: Intent) {
|
|
||||||
if (intent.action == ConnectivityManager.CONNECTIVITY_ACTION) {
|
|
||||||
trySend(activeNetworkState())
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
registerReceiver(receiver, IntentFilter(ConnectivityManager.CONNECTIVITY_ACTION))
|
|
||||||
awaitClose {
|
|
||||||
unregisterReceiver(receiver)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
connectivityManager.registerDefaultNetworkCallback(networkCallback)
|
||||||
|
awaitClose {
|
||||||
|
connectivityManager.unregisterNetworkCallback(networkCallback)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,24 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
|
||||||
tools:keep="@drawable/sc_collections_bookmark_48dp">
|
|
||||||
<background android:drawable="@color/accent_blue"/>
|
|
||||||
<foreground>
|
|
||||||
<vector
|
|
||||||
android:width="120dp"
|
|
||||||
android:height="120dp"
|
|
||||||
android:viewportWidth="56.0"
|
|
||||||
android:viewportHeight="56.0">
|
|
||||||
<group
|
|
||||||
android:translateX="16"
|
|
||||||
android:translateY="16">
|
|
||||||
<path
|
|
||||||
android:fillColor="#FFF"
|
|
||||||
android:pathData="M4,6H2v14c0,1.1 0.9,2 2,2h14v-2H4V6z"/>
|
|
||||||
<path
|
|
||||||
android:fillColor="#FFF"
|
|
||||||
android:pathData="M20,2L8,2c-1.1,0 -2,0.9 -2,2v12c0,1.1 0.9,2 2,2h12c1.1,0 2,-0.9 2,-2L22,4c0,-1.1 -0.9,-2 -2,-2zM20,12l-2.5,-1.5L15,12L15,4h5v8z"/>
|
|
||||||
</group>
|
|
||||||
</vector>
|
|
||||||
</foreground>
|
|
||||||
</adaptive-icon>
|
|
@ -1,21 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
|
||||||
tools:keep="@drawable/sc_explore_48dp">
|
|
||||||
<background android:drawable="@color/accent_blue"/>
|
|
||||||
<foreground>
|
|
||||||
<vector
|
|
||||||
android:width="120dp"
|
|
||||||
android:height="120dp"
|
|
||||||
android:viewportWidth="56.0"
|
|
||||||
android:viewportHeight="56.0">
|
|
||||||
<group
|
|
||||||
android:translateX="16"
|
|
||||||
android:translateY="16">
|
|
||||||
<path
|
|
||||||
android:fillColor="#FFF"
|
|
||||||
android:pathData="M12,10.9c-0.61,0 -1.1,0.49 -1.1,1.1s0.49,1.1 1.1,1.1c0.61,0 1.1,-0.49 1.1,-1.1s-0.49,-1.1 -1.1,-1.1zM12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM14.19,14.19L6,18l3.81,-8.19L18,6l-3.81,8.19z" />
|
|
||||||
</group>
|
|
||||||
</vector>
|
|
||||||
</foreground>
|
|
||||||
</adaptive-icon>
|
|
@ -1,21 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
|
||||||
tools:keep="@drawable/sc_history_48dp">
|
|
||||||
<background android:drawable="@color/accent_blue"/>
|
|
||||||
<foreground>
|
|
||||||
<vector
|
|
||||||
android:width="120dp"
|
|
||||||
android:height="120dp"
|
|
||||||
android:viewportWidth="56.0"
|
|
||||||
android:viewportHeight="56.0">
|
|
||||||
<group
|
|
||||||
android:translateX="16"
|
|
||||||
android:translateY="16">
|
|
||||||
<path
|
|
||||||
android:fillColor="#FFF"
|
|
||||||
android:pathData="M13,3c-4.97,0 -9,4.03 -9,9L1,12l3.89,3.89 0.07,0.14L9,12L6,12c0,-3.87 3.13,-7 7,-7s7,3.13 7,7 -3.13,7 -7,7c-1.93,0 -3.68,-0.79 -4.94,-2.06l-1.42,1.42C8.27,19.99 10.51,21 13,21c4.97,0 9,-4.03 9,-9s-4.03,-9 -9,-9zM12,8v5l4.28,2.54 0.72,-1.21 -3.5,-2.08L13.5,8L12,8z" />
|
|
||||||
</group>
|
|
||||||
</vector>
|
|
||||||
</foreground>
|
|
||||||
</adaptive-icon>
|
|
@ -1,21 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
|
||||||
tools:keep="@drawable/sc_new_releases_48dp">
|
|
||||||
<background android:drawable="@color/accent_blue"/>
|
|
||||||
<foreground>
|
|
||||||
<vector
|
|
||||||
android:width="120dp"
|
|
||||||
android:height="120dp"
|
|
||||||
android:viewportWidth="56.0"
|
|
||||||
android:viewportHeight="56.0">
|
|
||||||
<group
|
|
||||||
android:translateX="16"
|
|
||||||
android:translateY="16">
|
|
||||||
<path
|
|
||||||
android:fillColor="#FFF"
|
|
||||||
android:pathData="M23,12l-2.44,-2.78 0.34,-3.68 -3.61,-0.82 -1.89,-3.18L12,3 8.6,1.54 6.71,4.72l-3.61,0.81 0.34,3.68L1,12l2.44,2.78 -0.34,3.69 3.61,0.82 1.89,3.18L12,21l3.4,1.46 1.89,-3.18 3.61,-0.82 -0.34,-3.68L23,12zM13,17h-2v-2h2v2zM13,13h-2L11,7h2v6z" />
|
|
||||||
</group>
|
|
||||||
</vector>
|
|
||||||
</foreground>
|
|
||||||
</adaptive-icon>
|
|
13
app/src/main/res/drawable/ic_launcher_background.xml
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="108dp"
|
||||||
|
android:height="108dp"
|
||||||
|
android:viewportWidth="432"
|
||||||
|
android:viewportHeight="432">
|
||||||
|
<group>
|
||||||
|
<clip-path
|
||||||
|
android:pathData="M0,0h432v432h-432z"/>
|
||||||
|
<path
|
||||||
|
android:pathData="M0,0h432v432h-432z"
|
||||||
|
android:fillColor="#FAFAFA"/>
|
||||||
|
</group>
|
||||||
|
</vector>
|
@ -1,27 +1,16 @@
|
|||||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:width="108dp"
|
android:width="108dp"
|
||||||
android:height="108dp"
|
android:height="108dp"
|
||||||
android:viewportWidth="108.0"
|
android:viewportWidth="432"
|
||||||
android:viewportHeight="108.0">
|
android:viewportHeight="432">
|
||||||
<path
|
<path
|
||||||
android:fillColor="#000"
|
android:pathData="M337,216C337,282.83 282.83,337 216,337C149.17,337 95,282.83 95,216C95,149.17 149.17,95 216,95C282.83,95 337,149.17 337,216Z"
|
||||||
android:pathData="M14.5,7L86.5,7A7,7 0,0 1,93.5 14L93.5,95A7,7 0,0 1,86.5 102L14.5,102A7,7 0,0 1,7.5 95L7.5,14A7,7 0,0 1,14.5 7z" />
|
android:fillColor="#F2FAFF"/>
|
||||||
<path
|
<path
|
||||||
android:fillColor="#2E84BF"
|
android:pathData="M216,314.31C270.3,314.31 314.31,270.3 314.31,216C314.31,161.7 270.3,117.69 216,117.69C161.7,117.69 117.69,161.7 117.69,216C117.69,270.3 161.7,314.31 216,314.31ZM216,337C282.83,337 337,282.83 337,216C337,149.17 282.83,95 216,95C149.17,95 95,149.17 95,216C95,282.83 149.17,337 216,337Z"
|
||||||
android:pathData="M14.5,7L86.5,7A7,7 0,0 1,93.5 14L93.5,95A7,7 0,0 1,86.5 102L14.5,102A7,7 0,0 1,7.5 95L7.5,14A7,7 0,0 1,14.5 7z" />
|
android:fillColor="#0058A0"
|
||||||
<path
|
android:fillType="evenOdd"/>
|
||||||
android:fillColor="#69A3CB"
|
<path
|
||||||
android:pathData="M7.5,12.01C7.5,9.24 9.74,7 12.5,7L17.5,7L17.5,102L12.5,102C9.74,102 7.5,99.77 7.5,96.99L7.5,12.01Z" />
|
android:pathData="M163.71,174.79L162.66,150.56C165.82,151.16 169.58,151.31 178.16,151.31C188.55,151.31 202.24,150.71 209.32,149.81C212.32,149.51 213.53,149.05 215.49,148L231.74,161.85C230.23,163.95 229.78,164.86 228.13,169.07C226.77,172.38 220.6,191.49 218.2,199.62C229.33,201.88 235.5,203.53 243.93,206.99C244.98,199.62 245.13,195.71 245.13,182.31C245.13,178.85 244.98,176.9 244.53,173.74L270.72,174.64C269.96,178.25 269.82,179.76 269.66,185.62C269.06,199.77 268.46,206.54 266.95,216.78C277.34,222.04 277.34,222.04 282.61,224.9C285.32,226.41 285.92,226.71 287.72,227.31L278.99,255.45C274.78,251.69 268.91,247.63 260.33,242.81C252.81,260.72 240.32,273.82 221.35,284.2C215.03,275.77 210.22,270.65 202.54,264.63C213.68,259.37 218.8,256.06 224.67,250.49C230.38,244.92 234.15,239.5 237.76,231.38C228.13,227.01 221.96,225.05 211.27,222.8C205.1,241.16 200.13,252.9 195.77,259.97C189.9,269.45 181.93,274.42 172.74,274.42C165.67,274.42 158.45,271.26 153.18,265.84C147.16,259.67 144,251.09 144,241.16C144,226.41 151.07,213.62 163.41,205.64C171.39,200.52 179.82,198.27 193.21,197.51C195.92,188.63 198.18,180.96 200.29,172.38C193.66,172.98 185.39,173.43 175.3,173.88C169.88,174.04 168.08,174.19 163.71,174.79ZM186.59,220.54C179.52,221.74 175.3,224 171.54,228.82C168.68,232.13 167.33,236.04 167.33,240.25C167.33,244.92 169.58,248.38 172.44,248.38C175.9,248.38 179.82,240.55 186.59,220.54Z"
|
||||||
<path
|
android:fillColor="#031019"/>
|
||||||
android:fillColor="#000"
|
|
||||||
android:pathData="M54,54.5m-25.5,0a25.5,25.5 0,1 1,51 0a25.5,25.5 0,1 1,-51 0" />
|
|
||||||
<path
|
|
||||||
android:fillColor="#CE2828"
|
|
||||||
android:pathData="M54,54.5m-25.5,0a25.5,25.5 0,1 1,51 0a25.5,25.5 0,1 1,-51 0" />
|
|
||||||
<path
|
|
||||||
android:fillColor="#FFF"
|
|
||||||
android:pathData="M54,54.5m-19.94,0a19.94,19.94 0,1 1,39.87 0a19.94,19.94 0,1 1,-39.87 0" />
|
|
||||||
<path
|
|
||||||
android:fillColor="#000"
|
|
||||||
android:pathData="M52.04,46.3L47.42,46.3C46.14,46.3 44.93,46.23 44.2,46.14L44.2,49.76C45,49.65 46.16,49.6 47.42,49.6L60.58,49.6C61.86,49.6 63.02,49.65 63.82,49.76L63.82,46.14C63.09,46.23 61.86,46.3 60.58,46.3L55.69,46.3L55.69,45.07C55.69,44.43 55.73,43.95 55.82,43.45L51.9,43.45C51.99,44 52.04,44.43 52.04,45.07L52.04,46.3ZM46.78,60.68C45.46,60.68 44.29,60.63 43.45,60.52L43.45,64.14C44.34,64.03 45.46,63.98 46.78,63.98L61.29,63.98C62.57,63.98 63.71,64.03 64.57,64.14L64.57,60.52C63.73,60.63 62.57,60.68 61.29,60.68L58.24,60.68C59.33,58.06 59.99,56.23 60.7,53.91C61.34,51.81 61.34,51.81 61.56,51.13L57.58,50.06C57.51,50.93 57.37,51.52 56.89,53.41C56.19,56.14 55.32,58.74 54.5,60.68L46.78,60.68ZM46.48,51.36C47.55,54.02 48.28,56.53 49.03,60.15L52.66,58.9C51.65,54.98 50.92,52.66 49.94,50.11L46.48,51.36Z" />
|
|
||||||
</vector>
|
</vector>
|
||||||
|
9
app/src/main/res/drawable/ic_launcher_monochrome.xml
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="108dp"
|
||||||
|
android:height="108dp"
|
||||||
|
android:viewportWidth="432"
|
||||||
|
android:viewportHeight="432">
|
||||||
|
<path
|
||||||
|
android:fillColor="#FFFFFFFF"
|
||||||
|
android:pathData="M162.3,173.59L161.22,148.63C164.47,149.25 168.35,149.41 177.18,149.41C187.87,149.41 201.98,148.79 209.26,147.86C212.36,147.55 213.6,147.09 215.61,146L232.35,160.26C230.8,162.43 230.34,163.36 228.63,167.7C227.24,171.11 220.88,190.79 218.4,199.16C229.87,201.48 236.22,203.18 244.9,206.75C245.99,199.16 246.14,195.13 246.14,181.33C246.14,177.77 245.99,175.76 245.52,172.5L272.49,173.43C271.71,177.15 271.56,178.7 271.4,184.74C270.78,199.31 270.16,206.29 268.61,216.82C279.31,222.25 279.31,222.25 284.73,225.19C287.52,226.74 288.14,227.05 290,227.67L281.01,256.65C276.67,252.78 270.63,248.59 261.8,243.63C254.05,262.08 241.18,275.56 221.66,286.25C215.15,277.57 210.19,272.3 202.29,266.11C213.75,260.68 219.02,257.27 225.07,251.54C230.96,245.8 234.83,240.22 238.55,231.85C228.63,227.36 222.28,225.35 211.27,223.02C204.92,241.93 199.8,254.02 195.31,261.3C189.27,271.06 181.05,276.18 171.6,276.18C164.32,276.18 156.88,272.92 151.45,267.35C145.25,260.99 142,252.16 142,241.93C142,226.74 149.28,213.57 161.99,205.35C170.21,200.09 178.88,197.76 192.68,196.99C195.47,187.84 197.79,179.94 199.96,171.11C193.14,171.73 184.62,172.19 174.24,172.65C168.66,172.81 166.8,172.96 162.3,173.59ZM185.86,220.7C178.57,221.94 174.24,224.26 170.36,229.22C167.42,232.63 166.02,236.66 166.02,241C166.02,245.8 168.35,249.37 171.29,249.37C174.85,249.37 178.88,241.31 185.86,220.7Z"/>
|
||||||
|
</vector>
|
9
app/src/main/res/drawable/ic_mihon.xml
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="256dp"
|
||||||
|
android:height="243.89189dp"
|
||||||
|
android:viewportWidth="148"
|
||||||
|
android:viewportHeight="141">
|
||||||
|
<path
|
||||||
|
android:fillColor="#FFFFFFFF"
|
||||||
|
android:pathData="M20.3,27.59L19.22,2.63C22.47,3.25 26.35,3.41 35.18,3.41C45.87,3.41 59.97,2.79 67.26,1.86C70.36,1.55 71.6,1.08 73.61,0L90.35,14.26C88.8,16.43 88.34,17.36 86.63,21.7C85.24,25.11 78.88,44.79 76.4,53.16C87.87,55.48 94.22,57.19 102.9,60.75C103.99,53.16 104.14,49.13 104.14,35.33C104.14,31.77 103.99,29.75 103.52,26.5L130.49,27.43C129.71,31.15 129.56,32.7 129.4,38.74C128.78,53.31 128.16,60.28 126.61,70.82C137.31,76.25 137.31,76.25 142.73,79.19C145.52,80.74 146.14,81.05 148,81.67L139.01,110.65C134.67,106.78 128.63,102.59 119.79,97.63C112.05,116.07 99.18,129.56 79.66,140.25C73.15,131.57 68.19,126.3 60.28,120.11C71.75,114.68 77.02,111.27 83.07,105.54C88.96,99.8 92.83,94.22 96.55,85.86C86.63,81.36 80.28,79.35 69.27,77.02C62.92,95.93 57.81,108.02 53.31,115.3C47.27,125.06 39.05,130.18 29.6,130.18C22.32,130.18 14.88,126.92 9.45,121.35C3.25,114.99 0,106.16 0,95.93C0,80.74 7.28,67.57 19.99,59.35C28.21,54.09 36.88,51.76 50.68,50.99C53.47,41.84 55.79,33.94 57.96,25.11C51.14,25.73 42.62,26.19 32.23,26.66C26.66,26.81 24.8,26.97 20.3,27.59ZM43.86,74.7C36.57,75.94 32.23,78.26 28.36,83.22C25.42,86.63 24.02,90.66 24.02,95C24.02,99.8 26.35,103.37 29.29,103.37C32.85,103.37 36.88,95.31 43.86,74.7Z"/>
|
||||||
|
</vector>
|
@ -3,6 +3,6 @@
|
|||||||
<item
|
<item
|
||||||
android:width="72dp"
|
android:width="72dp"
|
||||||
android:height="72dp"
|
android:height="72dp"
|
||||||
android:drawable="@drawable/ic_tachi"
|
android:drawable="@drawable/ic_mihon"
|
||||||
android:gravity="center" />
|
android:gravity="center" />
|
||||||
</layer-list>
|
</layer-list>
|
@ -1,12 +0,0 @@
|
|||||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:width="48dp"
|
|
||||||
android:height="48dp"
|
|
||||||
android:viewportWidth="256"
|
|
||||||
android:viewportHeight="256">
|
|
||||||
<path
|
|
||||||
android:fillColor="#FFF"
|
|
||||||
android:pathData="M102.6,19.2c0.3,5.7 0.6,13.1 0.8,16.6l0.4,6.3 -42.7,-0.3c-23.4,-0.2 -43.4,-0.7 -44.3,-1.2 -1.7,-0.8 -1.8,0.6 -1.8,20.4v21.2l2.3,-0.6C23.9,79.7 50.6,79 126,79s102.1,0.7 108.8,2.6l2.2,0.6V61c0,-19.8 -0.1,-21.2 -1.7,-20.4 -1,0.5 -21,1 -44.4,1.2l-42.7,0.3 0.4,-6.3c0.2,-3.5 0.5,-10.9 0.8,-16.6l0.4,-10.2h-47.6l0.4,10.2zM58.8,93.2c-10.4,3.9 -18.8,7.7 -18.8,8.3 0,0.7 1.4,4.3 3.1,8.1 8,17.7 20.6,61.5 24.1,83.6 0.6,4.3 1.6,7.8 2.2,7.8 0.6,0 10.4,-3.2 21.9,-7.1 14.9,-5.2 20.7,-7.6 20.7,-8.7 0,-3.2 -17.8,-61 -26.2,-85C82,89.6 80.4,86 79.1,86.1c-0.9,0 -10,3.2 -20.3,7.1z" />
|
|
||||||
<path
|
|
||||||
android:fillColor="#FFF"
|
|
||||||
android:pathData="M167.2,93.7c-3.3,21 -15.6,61.6 -28.8,95l-6.9,17.3H6v40h243v-40h-37.1c-29.3,0 -37,-0.3 -36.6,-1.3 0.3,-0.6 2.7,-5.9 5.3,-11.7 2.5,-5.8 7.5,-18.3 11,-27.9 6.7,-18.4 21.4,-64.3 21.4,-67 0,-1.3 -4.6,-2.8 -21.2,-6.9 -11.7,-2.9 -21.8,-5.2 -22.4,-5.2 -0.6,0 -1.6,3.5 -2.2,7.7z" />
|
|
||||||
</vector>
|
|
@ -1,12 +0,0 @@
|
|||||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:width="108dp"
|
|
||||||
android:height="108dp"
|
|
||||||
android:viewportWidth="108"
|
|
||||||
android:viewportHeight="108">
|
|
||||||
<path
|
|
||||||
android:pathData="M50.61,39.254C50.65,40.029 50.691,41.036 50.719,41.513L50.773,42.371L44.96,42.331C41.772,42.303 39.049,42.235 38.926,42.166C38.695,42.058 38.682,42.248 38.682,44.944L38.682,47.831L38.995,47.75C39.893,47.491 43.53,47.395 53.796,47.395C64.064,47.395 67.698,47.491 68.611,47.75L68.911,47.831L68.911,44.944C68.911,42.248 68.897,42.058 68.678,42.166C68.542,42.235 65.819,42.303 62.634,42.331L56.819,42.371L56.873,41.513C56.9,41.036 56.941,40.029 56.981,39.254L57.037,37.864L50.555,37.864L50.61,39.254ZM44.645,49.329C43.23,49.861 42.086,50.377 42.086,50.459C42.086,50.555 42.276,51.044 42.509,51.563C43.597,53.973 45.312,59.937 45.79,62.945C45.87,63.53 46.008,64.008 46.089,64.008C46.171,64.008 47.505,63.572 49.072,63.041C51.1,62.333 51.889,62.006 51.889,61.856C51.889,61.42 49.467,53.551 48.322,50.282C47.805,48.839 47.586,48.349 47.41,48.362C47.287,48.362 46.049,48.798 44.645,49.329Z"
|
|
||||||
android:fillColor="#000000"/>
|
|
||||||
<path
|
|
||||||
android:pathData="M59.406,49.397C58.957,52.257 57.282,57.785 55.484,62.333L54.545,64.688L37.456,64.688L37.456,70.136L70.544,70.136L70.544,64.688L65.493,64.688C61.503,64.688 60.454,64.648 60.509,64.511C60.55,64.43 60.876,63.708 61.23,62.918C61.571,62.128 62.252,60.426 62.728,59.12C63.641,56.614 65.643,50.364 65.643,49.997C65.643,49.819 65.016,49.614 62.756,49.057C61.163,48.662 59.788,48.349 59.706,48.349C59.624,48.349 59.488,48.825 59.406,49.397Z"
|
|
||||||
android:fillColor="#000000"/>
|
|
||||||
</vector>
|
|
@ -1,24 +1,24 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
tools:keep="@drawable/sc_collections_bookmark_48dp"
|
tools:keep="@drawable/sc_collections_bookmark_48dp">
|
||||||
android:width="48dp"
|
<background android:drawable="@color/accent_blue"/>
|
||||||
android:height="48dp"
|
<foreground>
|
||||||
android:viewportWidth="48"
|
<vector
|
||||||
android:viewportHeight="48">
|
android:width="120dp"
|
||||||
|
android:height="120dp"
|
||||||
<path
|
android:viewportWidth="56.0"
|
||||||
android:fillColor="@color/accent_blue"
|
android:viewportHeight="56.0">
|
||||||
android:pathData="M24,24m-22,0a22,22 0,1 1,44 0a22,22 0,1 1,-44 0" />
|
<group
|
||||||
|
android:translateX="16"
|
||||||
<group
|
android:translateY="16">
|
||||||
android:translateX="12"
|
<path
|
||||||
android:translateY="12">
|
android:fillColor="#FFF"
|
||||||
<path
|
android:pathData="M4,6H2v14c0,1.1 0.9,2 2,2h14v-2H4V6z"/>
|
||||||
android:fillColor="#FFF"
|
<path
|
||||||
android:pathData="M4,6H2v14c0,1.1 0.9,2 2,2h14v-2H4V6z" />
|
android:fillColor="#FFF"
|
||||||
<path
|
android:pathData="M20,2L8,2c-1.1,0 -2,0.9 -2,2v12c0,1.1 0.9,2 2,2h12c1.1,0 2,-0.9 2,-2L22,4c0,-1.1 -0.9,-2 -2,-2zM20,12l-2.5,-1.5L15,12L15,4h5v8z"/>
|
||||||
android:fillColor="#FFF"
|
</group>
|
||||||
android:pathData="M20,2L8,2c-1.1,0 -2,0.9 -2,2v12c0,1.1 0.9,2 2,2h12c1.1,0 2,-0.9 2,-2L22,4c0,-1.1 -0.9,-2 -2,-2zM20,12l-2.5,-1.5L15,12L15,4h5v8z" />
|
</vector>
|
||||||
</group>
|
</foreground>
|
||||||
</vector>
|
</adaptive-icon>
|
||||||
|
@ -1,21 +1,21 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
tools:keep="@drawable/sc_explore_48dp"
|
tools:keep="@drawable/sc_explore_48dp">
|
||||||
android:width="48dp"
|
<background android:drawable="@color/accent_blue"/>
|
||||||
android:height="48dp"
|
<foreground>
|
||||||
android:viewportWidth="48"
|
<vector
|
||||||
android:viewportHeight="48">
|
android:width="120dp"
|
||||||
|
android:height="120dp"
|
||||||
<path
|
android:viewportWidth="56.0"
|
||||||
android:fillColor="@color/accent_blue"
|
android:viewportHeight="56.0">
|
||||||
android:pathData="M24,24m-22,0a22,22 0,1 1,44 0a22,22 0,1 1,-44 0" />
|
<group
|
||||||
|
android:translateX="16"
|
||||||
<group
|
android:translateY="16">
|
||||||
android:translateX="12"
|
<path
|
||||||
android:translateY="12">
|
android:fillColor="#FFF"
|
||||||
<path
|
android:pathData="M12,10.9c-0.61,0 -1.1,0.49 -1.1,1.1s0.49,1.1 1.1,1.1c0.61,0 1.1,-0.49 1.1,-1.1s-0.49,-1.1 -1.1,-1.1zM12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM14.19,14.19L6,18l3.81,-8.19L18,6l-3.81,8.19z" />
|
||||||
android:fillColor="#FFF"
|
</group>
|
||||||
android:pathData="M12,10.9c-0.61,0 -1.1,0.49 -1.1,1.1s0.49,1.1 1.1,1.1c0.61,0 1.1,-0.49 1.1,-1.1s-0.49,-1.1 -1.1,-1.1zM12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM14.19,14.19L6,18l3.81,-8.19L18,6l-3.81,8.19z" />
|
</vector>
|
||||||
</group>
|
</foreground>
|
||||||
</vector>
|
</adaptive-icon>
|
||||||
|
@ -1,21 +1,21 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
tools:keep="@drawable/sc_history_48dp"
|
tools:keep="@drawable/sc_history_48dp">
|
||||||
android:width="48dp"
|
<background android:drawable="@color/accent_blue"/>
|
||||||
android:height="48dp"
|
<foreground>
|
||||||
android:viewportWidth="48"
|
<vector
|
||||||
android:viewportHeight="48">
|
android:width="120dp"
|
||||||
|
android:height="120dp"
|
||||||
<path
|
android:viewportWidth="56.0"
|
||||||
android:fillColor="@color/accent_blue"
|
android:viewportHeight="56.0">
|
||||||
android:pathData="M24,24m-22,0a22,22 0,1 1,44 0a22,22 0,1 1,-44 0" />
|
<group
|
||||||
|
android:translateX="16"
|
||||||
<group
|
android:translateY="16">
|
||||||
android:translateX="12"
|
<path
|
||||||
android:translateY="12">
|
android:fillColor="#FFF"
|
||||||
<path
|
android:pathData="M13,3c-4.97,0 -9,4.03 -9,9L1,12l3.89,3.89 0.07,0.14L9,12L6,12c0,-3.87 3.13,-7 7,-7s7,3.13 7,7 -3.13,7 -7,7c-1.93,0 -3.68,-0.79 -4.94,-2.06l-1.42,1.42C8.27,19.99 10.51,21 13,21c4.97,0 9,-4.03 9,-9s-4.03,-9 -9,-9zM12,8v5l4.28,2.54 0.72,-1.21 -3.5,-2.08L13.5,8L12,8z" />
|
||||||
android:fillColor="#FFF"
|
</group>
|
||||||
android:pathData="M13,3c-4.97,0 -9,4.03 -9,9L1,12l3.89,3.89 0.07,0.14L9,12L6,12c0,-3.87 3.13,-7 7,-7s7,3.13 7,7 -3.13,7 -7,7c-1.93,0 -3.68,-0.79 -4.94,-2.06l-1.42,1.42C8.27,19.99 10.51,21 13,21c4.97,0 9,-4.03 9,-9s-4.03,-9 -9,-9zM12,8v5l4.28,2.54 0.72,-1.21 -3.5,-2.08L13.5,8L12,8z" />
|
</vector>
|
||||||
</group>
|
</foreground>
|
||||||
</vector>
|
</adaptive-icon>
|
||||||
|
@ -1,21 +1,21 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
tools:keep="@drawable/sc_new_releases_48dp"
|
tools:keep="@drawable/sc_new_releases_48dp">
|
||||||
android:width="48dp"
|
<background android:drawable="@color/accent_blue"/>
|
||||||
android:height="48dp"
|
<foreground>
|
||||||
android:viewportWidth="48"
|
<vector
|
||||||
android:viewportHeight="48">
|
android:width="120dp"
|
||||||
|
android:height="120dp"
|
||||||
<path
|
android:viewportWidth="56.0"
|
||||||
android:fillColor="@color/accent_blue"
|
android:viewportHeight="56.0">
|
||||||
android:pathData="M24,24m-22,0a22,22 0,1 1,44 0a22,22 0,1 1,-44 0" />
|
<group
|
||||||
|
android:translateX="16"
|
||||||
<group
|
android:translateY="16">
|
||||||
android:translateX="12"
|
<path
|
||||||
android:translateY="12">
|
android:fillColor="#FFF"
|
||||||
<path
|
android:pathData="M23,12l-2.44,-2.78 0.34,-3.68 -3.61,-0.82 -1.89,-3.18L12,3 8.6,1.54 6.71,4.72l-3.61,0.81 0.34,3.68L1,12l2.44,2.78 -0.34,3.69 3.61,0.82 1.89,3.18L12,21l3.4,1.46 1.89,-3.18 3.61,-0.82 -0.34,-3.68L23,12zM13,17h-2v-2h2v2zM13,13h-2L11,7h2v6z" />
|
||||||
android:fillColor="#FFF"
|
</group>
|
||||||
android:pathData="M23,12l-2.44,-2.78 0.34,-3.68 -3.61,-0.82 -1.89,-3.18L12,3 8.6,1.54 6.71,4.72l-3.61,0.81 0.34,3.68L1,12l2.44,2.78 -0.34,3.69 3.61,0.82 1.89,3.18L12,21l3.4,1.46 1.89,-3.18 3.61,-0.82 -0.34,-3.68L23,12zM13,17h-2v-2h2v2zM13,13h-2L11,7h2v6z" />
|
</vector>
|
||||||
</group>
|
</foreground>
|
||||||
</vector>
|
</adaptive-icon>
|
||||||
|
@ -1,6 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
|
||||||
<background android:drawable="@android:color/transparent"/>
|
|
||||||
<foreground android:drawable="@drawable/ic_launcher_foreground"/>
|
|
||||||
<monochrome android:drawable="@drawable/ic_tachi_monochrome_launcher" />
|
|
||||||
</adaptive-icon>
|
|
@ -1,6 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
|
||||||
<background android:drawable="@android:color/transparent"/>
|
|
||||||
<foreground android:drawable="@drawable/ic_launcher_foreground"/>
|
|
||||||
<monochrome android:drawable="@drawable/ic_tachi_monochrome_launcher" />
|
|
||||||
</adaptive-icon>
|
|
Before Width: | Height: | Size: 2.5 KiB |
Before Width: | Height: | Size: 4.3 KiB |
Before Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 2.9 KiB |
Before Width: | Height: | Size: 5.4 KiB |
Before Width: | Height: | Size: 5.8 KiB |
Before Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 6.9 KiB |
Before Width: | Height: | Size: 14 KiB |
@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
<background android:drawable="@android:color/transparent"/>
|
<background android:drawable="@drawable/ic_launcher_background"/>
|
||||||
<foreground android:drawable="@drawable/ic_launcher_foreground"/>
|
<foreground android:drawable="@drawable/ic_launcher_foreground"/>
|
||||||
<monochrome android:drawable="@drawable/ic_tachi_monochrome_launcher" />
|
<monochrome android:drawable="@drawable/ic_launcher_monochrome"/>
|
||||||
</adaptive-icon>
|
</adaptive-icon>
|
@ -373,7 +373,7 @@
|
|||||||
|
|
||||||
<!--== Splash Theme ==-->
|
<!--== Splash Theme ==-->
|
||||||
<style name="Theme.Tachiyomi.SplashScreen" parent="Theme.SplashScreen">
|
<style name="Theme.Tachiyomi.SplashScreen" parent="Theme.SplashScreen">
|
||||||
<item name="windowSplashScreenAnimatedIcon">@drawable/ic_tachi_splash</item>
|
<item name="windowSplashScreenAnimatedIcon">@drawable/ic_mihon_splash</item>
|
||||||
<item name="windowSplashScreenBackground">@color/splash</item>
|
<item name="windowSplashScreenBackground">@color/splash</item>
|
||||||
<item name="postSplashScreenTheme">@style/Theme.Tachiyomi</item>
|
<item name="postSplashScreenTheme">@style/Theme.Tachiyomi</item>
|
||||||
<item name="android:statusBarColor">@android:color/transparent</item>
|
<item name="android:statusBarColor">@android:color/transparent</item>
|
||||||
|
48
app/src/standard/google-services.json
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
{
|
||||||
|
"project_info": {
|
||||||
|
"project_number": "82031285239",
|
||||||
|
"project_id": "mihonapp",
|
||||||
|
"storage_bucket": "mihonapp.appspot.com"
|
||||||
|
},
|
||||||
|
"client": [
|
||||||
|
{
|
||||||
|
"client_info": {
|
||||||
|
"mobilesdk_app_id": "1:82031285239:android:336ed6dceef55c357594f2",
|
||||||
|
"android_client_info": {
|
||||||
|
"package_name": "app.mihon"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"oauth_client": [],
|
||||||
|
"api_key": [
|
||||||
|
{
|
||||||
|
"current_key": "AIzaSyDTvOxBQnuXADx5isKxoynPG0nlAO8bQbk"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"services": {
|
||||||
|
"appinvite_service": {
|
||||||
|
"other_platform_oauth_client": []
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"client_info": {
|
||||||
|
"mobilesdk_app_id": "1:82031285239:android:b7440cbdd0d33c9d7594f2",
|
||||||
|
"android_client_info": {
|
||||||
|
"package_name": "app.mihon.debug"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"oauth_client": [],
|
||||||
|
"api_key": [
|
||||||
|
{
|
||||||
|
"current_key": "AIzaSyDTvOxBQnuXADx5isKxoynPG0nlAO8bQbk"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"services": {
|
||||||
|
"appinvite_service": {
|
||||||
|
"other_platform_oauth_client": []
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"configuration_version": "1"
|
||||||
|
}
|
@ -6,6 +6,7 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinJvmCompile
|
|||||||
buildscript {
|
buildscript {
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath(libs.android.shortcut.gradle)
|
classpath(libs.android.shortcut.gradle)
|
||||||
|
classpath(libs.google.services.gradle)
|
||||||
classpath(libs.aboutLibraries.gradle)
|
classpath(libs.aboutLibraries.gradle)
|
||||||
classpath(libs.sqldelight.gradle)
|
classpath(libs.sqldelight.gradle)
|
||||||
classpath(libs.moko.gradle)
|
classpath(libs.moko.gradle)
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
object AndroidConfig {
|
object AndroidConfig {
|
||||||
const val compileSdk = 34
|
const val compileSdk = 34
|
||||||
const val minSdk = 23
|
const val minSdk = 26
|
||||||
const val targetSdk = 34
|
const val targetSdk = 34
|
||||||
const val ndk = "26.1.10909125"
|
const val ndk = "26.1.10909125"
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
package eu.kanade.tachiyomi.util.system
|
package eu.kanade.tachiyomi.util.system
|
||||||
|
|
||||||
import android.annotation.TargetApi
|
|
||||||
import android.os.Build
|
|
||||||
import android.webkit.WebResourceError
|
import android.webkit.WebResourceError
|
||||||
import android.webkit.WebResourceRequest
|
import android.webkit.WebResourceRequest
|
||||||
import android.webkit.WebResourceResponse
|
import android.webkit.WebResourceResponse
|
||||||
@ -28,7 +26,6 @@ abstract class WebViewClientCompat : WebViewClient() {
|
|||||||
) {
|
) {
|
||||||
}
|
}
|
||||||
|
|
||||||
@TargetApi(Build.VERSION_CODES.N)
|
|
||||||
final override fun shouldOverrideUrlLoading(
|
final override fun shouldOverrideUrlLoading(
|
||||||
view: WebView,
|
view: WebView,
|
||||||
request: WebResourceRequest,
|
request: WebResourceRequest,
|
||||||
|
@ -3,7 +3,6 @@ package eu.kanade.tachiyomi.util.system
|
|||||||
import android.annotation.SuppressLint
|
import android.annotation.SuppressLint
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.content.pm.PackageManager
|
import android.content.pm.PackageManager
|
||||||
import android.os.Build
|
|
||||||
import android.webkit.CookieManager
|
import android.webkit.CookieManager
|
||||||
import android.webkit.WebSettings
|
import android.webkit.WebSettings
|
||||||
import android.webkit.WebView
|
import android.webkit.WebView
|
||||||
@ -35,15 +34,11 @@ object WebViewUtil {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fun getVersion(context: Context): String {
|
fun getVersion(context: Context): String {
|
||||||
return if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
val webView = WebView.getCurrentWebViewPackage() ?: return "how did you get here?"
|
||||||
val webView = WebView.getCurrentWebViewPackage() ?: return "how did you get here?"
|
val pm = context.packageManager
|
||||||
val pm = context.packageManager
|
val label = webView.applicationInfo.loadLabel(pm)
|
||||||
val label = webView.applicationInfo.loadLabel(pm)
|
val version = webView.versionName
|
||||||
val version = webView.versionName
|
return "$label $version"
|
||||||
"$label $version"
|
|
||||||
} else {
|
|
||||||
"Unknown"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fun supportsWebView(context: Context): Boolean {
|
fun supportsWebView(context: Context): Boolean {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package tachiyomi.core
|
package tachiyomi.core
|
||||||
|
|
||||||
object Constants {
|
object Constants {
|
||||||
const val URL_HELP = "https://tachiyomi.org/docs/guides/troubleshooting/"
|
const val URL_HELP = "https://mihon.app/docs/guides/troubleshooting/"
|
||||||
|
|
||||||
const val MANGA_EXTRA = "manga"
|
const val MANGA_EXTRA = "manga"
|
||||||
|
|
||||||
|
@ -1,6 +0,0 @@
|
|||||||
ALTER TABLE chapters
|
|
||||||
ADD COLUMN source_order INTEGER DEFAULT 0;
|
|
||||||
|
|
||||||
UPDATE mangas
|
|
||||||
SET thumbnail_url = replace(thumbnail_url, '93.174.95.110', 'kissmanga.com')
|
|
||||||
WHERE source = 4;
|
|