# Conflicts: # app/build.gradle.kts
This commit is contained in:
commit
019b961461
46 files changed
+312
-544
No files matched your search
@@ -6,10 +6,10 @@ body:
|
|||||||
- type: markdown
|
- type: markdown
|
||||||
attributes:
|
attributes:
|
||||||
value: |
|
value: |
|
||||||
感谢您愿意为 Ehviewer-Overhauled 做出贡献!
|
感谢您愿意为 EhViewer 做出贡献!
|
||||||
提交问题报告前,还请首先完成文末的自查步骤
|
提交问题报告前,还请首先完成文末的自查步骤
|
||||||
|
|
||||||
Thanks for your contribution on Ehviewer-Overhauled Project!
|
Thanks for your contribution on EhViewer Project!
|
||||||
Please finish verify steps which list in the end first before create bug report
|
Please finish verify steps which list in the end first before create bug report
|
||||||
|
|
||||||
- type: textarea
|
- type: textarea
|
||||||
@@ -141,5 +141,5 @@ body:
|
|||||||
- label: 您确保这个 Issue 只提及一个问题。如果您有多个问题报告,烦请发起多个 Issue / Ensure there is only one bug report in this issue. Please make mutiply issue for mutiply bugs
|
- label: 您确保这个 Issue 只提及一个问题。如果您有多个问题报告,烦请发起多个 Issue / Ensure there is only one bug report in this issue. Please make mutiply issue for mutiply bugs
|
||||||
required: true
|
required: true
|
||||||
|
|
||||||
- label: 您确保已使用最新 CI 版本测试,并且该问题在最新 CI 版本中并未解决 / This bug have not solved in latest CI version
|
- label: 您确保已使用最新 [CI 版本](https://github.com/FooIbar/EhViewer/actions)测试,并且该问题在最新 CI 版本中并未解决 / This bug have not solved in latest [CI version](https://github.com/FooIbar/EhViewer/actions)
|
||||||
required: true
|
required: true
|
||||||
+25
-12
@@ -4,8 +4,9 @@ on:
|
|||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- '*'
|
- '*'
|
||||||
tags-ignore:
|
- 'renovate/**'
|
||||||
- "*"
|
pull_request:
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
linux:
|
linux:
|
||||||
@@ -13,7 +14,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4
|
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4
|
||||||
with:
|
with:
|
||||||
submodules: 'recursive'
|
submodules: 'recursive'
|
||||||
|
|
||||||
@@ -23,13 +24,14 @@ jobs:
|
|||||||
distribution: temurin
|
distribution: temurin
|
||||||
java-version: 17
|
java-version: 17
|
||||||
|
|
||||||
- name: Install NDK
|
|
||||||
run: |
|
|
||||||
echo "y" | sudo ${ANDROID_HOME}/tools/bin/sdkmanager --install "ndk;26.0.10636728" --channel=1 --sdk_root=${ANDROID_SDK_ROOT} &> /dev/null
|
|
||||||
|
|
||||||
- name: Install Rust Toolchain
|
- name: Install Rust Toolchain
|
||||||
run: rustup update && rustup target add armv7-linux-androideabi aarch64-linux-android i686-linux-android x86_64-linux-android && rustup component add rustfmt clippy
|
run: rustup update && rustup target add armv7-linux-androideabi aarch64-linux-android i686-linux-android x86_64-linux-android && rustup component add rustfmt clippy
|
||||||
|
|
||||||
|
- name: Rust Cache
|
||||||
|
uses: Swatinem/rust-cache@v2
|
||||||
|
with:
|
||||||
|
workspaces: "./app/src/main/rust"
|
||||||
|
|
||||||
- name: Rustfmt Check
|
- name: Rustfmt Check
|
||||||
working-directory: ./app/src/main/rust
|
working-directory: ./app/src/main/rust
|
||||||
run: cargo fmt --all -- --check
|
run: cargo fmt --all -- --check
|
||||||
@@ -38,14 +40,25 @@ jobs:
|
|||||||
working-directory: ./app/src/main/rust
|
working-directory: ./app/src/main/rust
|
||||||
run: cargo clippy --all-targets --all-features -- -D warnings
|
run: cargo clippy --all-targets --all-features -- -D warnings
|
||||||
|
|
||||||
- name: Ktlint Check
|
- name: Setup Gradle
|
||||||
run: ./gradlew ktlintCheck
|
|
||||||
|
|
||||||
- name: Gradle Build
|
|
||||||
uses: gradle/gradle-build-action@v2
|
uses: gradle/gradle-build-action@v2
|
||||||
with:
|
with:
|
||||||
gradle-home-cache-cleanup: true
|
gradle-home-cache-cleanup: true
|
||||||
arguments: assembleRelease
|
|
||||||
|
- name: Spotless Check
|
||||||
|
run: ./gradlew spotlessCheck
|
||||||
|
|
||||||
|
- name: CMake Cache
|
||||||
|
uses: actions/cache@v3
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
app/.cxx
|
||||||
|
app/src/main/cpp/nettle/nettle
|
||||||
|
key: ${{ runner.os }}-cmake-${{ github.run_id }}
|
||||||
|
restore-keys: ${{ runner.os }}-cmake-
|
||||||
|
|
||||||
|
- name: Gradle Build
|
||||||
|
run: ./gradlew assembleRelease
|
||||||
|
|
||||||
- name: Update ARM64
|
- name: Update ARM64
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
|
|||||||
@@ -1,66 +0,0 @@
|
|||||||
name: Pull Request Check
|
|
||||||
|
|
||||||
on: [ pull_request ]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
linux:
|
|
||||||
name: Build
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4
|
|
||||||
with:
|
|
||||||
submodules: 'recursive'
|
|
||||||
|
|
||||||
- name: Setup Java 17
|
|
||||||
uses: actions/setup-java@v3
|
|
||||||
with:
|
|
||||||
distribution: temurin
|
|
||||||
java-version: 17
|
|
||||||
|
|
||||||
- name: Install NDK
|
|
||||||
run: |
|
|
||||||
echo "y" | sudo ${ANDROID_HOME}/tools/bin/sdkmanager --install "ndk;26.0.10636728" --channel=1 --sdk_root=${ANDROID_SDK_ROOT} &> /dev/null
|
|
||||||
|
|
||||||
- name: Install Rust Toolchain
|
|
||||||
run: rustup update && rustup target add armv7-linux-androideabi aarch64-linux-android i686-linux-android x86_64-linux-android && rustup component add rustfmt clippy
|
|
||||||
|
|
||||||
- name: Rustfmt Check
|
|
||||||
working-directory: ./app/src/main/rust
|
|
||||||
run: cargo fmt --all -- --check
|
|
||||||
|
|
||||||
- name: Clippy Check
|
|
||||||
working-directory: ./app/src/main/rust
|
|
||||||
run: cargo clippy --all-targets --all-features -- -D warnings
|
|
||||||
|
|
||||||
- name: Ktlint Check
|
|
||||||
run: ./gradlew ktlintCheck
|
|
||||||
|
|
||||||
- name: Gradle Build
|
|
||||||
uses: gradle/gradle-build-action@v2
|
|
||||||
with:
|
|
||||||
arguments: assembleRelease
|
|
||||||
|
|
||||||
- name: Update ARM64
|
|
||||||
uses: actions/upload-artifact@v3
|
|
||||||
with:
|
|
||||||
name: arm64-v8a-${{ github.sha }}
|
|
||||||
path: app/build/outputs/apk/release/app-arm64-v8a-release.apk
|
|
||||||
|
|
||||||
- name: Update x86_64
|
|
||||||
uses: actions/upload-artifact@v3
|
|
||||||
with:
|
|
||||||
name: x86_64-${{ github.sha }}
|
|
||||||
path: app/build/outputs/apk/release/app-x86_64-release.apk
|
|
||||||
|
|
||||||
- name: Update ARM32
|
|
||||||
uses: actions/upload-artifact@v3
|
|
||||||
with:
|
|
||||||
name: armeabi-v7a-${{ github.sha }}
|
|
||||||
path: app/build/outputs/apk/release/app-armeabi-v7a-release.apk
|
|
||||||
|
|
||||||
- name: Update x86
|
|
||||||
uses: actions/upload-artifact@v3
|
|
||||||
with:
|
|
||||||
name: x86-${{ github.sha }}
|
|
||||||
path: app/build/outputs/apk/release/app-x86-release.apk
|
|
||||||
@@ -11,7 +11,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4
|
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4
|
||||||
with:
|
with:
|
||||||
submodules: 'recursive'
|
submodules: 'recursive'
|
||||||
|
|
||||||
@@ -21,13 +21,23 @@ jobs:
|
|||||||
distribution: temurin
|
distribution: temurin
|
||||||
java-version: 17
|
java-version: 17
|
||||||
|
|
||||||
- name: Install NDK
|
|
||||||
run: |
|
|
||||||
echo "y" | sudo ${ANDROID_HOME}/tools/bin/sdkmanager --install "ndk;26.0.10636728" --channel=1 --sdk_root=${ANDROID_SDK_ROOT} &> /dev/null
|
|
||||||
|
|
||||||
- name: Install Rust Toolchain
|
- name: Install Rust Toolchain
|
||||||
run: rustup update && rustup target add armv7-linux-androideabi aarch64-linux-android i686-linux-android x86_64-linux-android
|
run: rustup update && rustup target add armv7-linux-androideabi aarch64-linux-android i686-linux-android x86_64-linux-android
|
||||||
|
|
||||||
|
- name: Rust Cache
|
||||||
|
uses: Swatinem/rust-cache@v2
|
||||||
|
with:
|
||||||
|
workspaces: "./app/src/main/rust"
|
||||||
|
|
||||||
|
- name: CMake Cache
|
||||||
|
uses: actions/cache@v3
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
app/.cxx
|
||||||
|
app/src/main/cpp/nettle/nettle
|
||||||
|
key: ${{ runner.os }}-cmake-${{ github.run_id }}
|
||||||
|
restore-keys: ${{ runner.os }}-cmake-
|
||||||
|
|
||||||
- name: Gradle Build
|
- name: Gradle Build
|
||||||
uses: gradle/gradle-build-action@v2
|
uses: gradle/gradle-build-action@v2
|
||||||
with:
|
with:
|
||||||
|
|||||||
@@ -1,3 +0,0 @@
|
|||||||
[submodule "app/src/main/cpp/nettle/nettle"]
|
|
||||||
path = app/src/main/cpp/nettle/nettle
|
|
||||||
url = https://github.com/Ehviewer-Overhauled/nettle
|
|
||||||
@@ -5,60 +5,60 @@ The project is in maintenance mode, will only receive bugfixes.
|
|||||||
<p align="right">
|
<p align="right">
|
||||||
<strong>English</strong>
|
<strong>English</strong>
|
||||||
<span> | </span>
|
<span> | </span>
|
||||||
<a href="https://github.com/Ehviewer-Overhauled/Ehviewer/blob/1.8.x.x/docs/README/zh-cn.md">
|
<a href="https://github.com/FooIbar/EhViewer/blob/1.8.x.x/docs/README/zh-cn.md">
|
||||||
简体中文
|
简体中文
|
||||||
</a>
|
</a>
|
||||||
<span> | </span>
|
<span> | </span>
|
||||||
<a href="https://github.com/Ehviewer-Overhauled/Ehviewer/blob/1.8.x.x/docs/README/zh-tw.md">
|
<a href="https://github.com/FooIbar/EhViewer/blob/1.8.x.x/docs/README/zh-tw.md">
|
||||||
正體中文
|
正體中文
|
||||||
</a>
|
</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<h1 align="center">
|
<h1 align="center">
|
||||||
<img src="https://github.com/Ehviewer-Overhauled/Art/blob/master/launcher_icon-web.svg" width="200">
|
<img src="https://github.com/Ehviewer-Overhauled/Art/blob/master/launcher_icon-web.svg" width="200" alt="EhViewer">
|
||||||
<br>EhViewer<br>
|
<br>EhViewer<br>
|
||||||
</h1>
|
</h1>
|
||||||
|
|
||||||
<p align="center">
|
<p align="center">
|
||||||
<a href="https://github.com/Ehviewer-Overhauled/Ehviewer/actions/workflows/ci.yml">
|
<a href="https://github.com/FooIbar/EhViewer/actions/workflows/ci.yml">
|
||||||
<img src="https://github.com/Ehviewer-Overhauled/Ehviewer/actions/workflows/ci.yml/badge.svg" alt="Github Actions">
|
<img src="https://github.com/FooIbar/EhViewer/actions/workflows/ci.yml/badge.svg" alt="Github Actions">
|
||||||
</a>
|
</a>
|
||||||
<a href="https://github.com/Ehviewer-Overhauled/Ehviewer/blob/1.8.x.x/LICENSE">
|
<a href="https://github.com/FooIbar/EhViewer/blob/1.8.x.x/LICENSE">
|
||||||
<img src="https://img.shields.io/github/license/Ehviewer-Overhauled/Ehviewer" alt="LICENSE">
|
<img src="https://img.shields.io/github/license/FooIbar/EhViewer" alt="LICENSE">
|
||||||
</a>
|
</a>
|
||||||
<a href="https://www.codefactor.io/repository/github/Ehviewer-Overhauled/ehviewer">
|
<a href="https://www.codefactor.io/repository/github/FooIbar/EhViewer">
|
||||||
<img src="https://www.codefactor.io/repository/github/Ehviewer-Overhauled/ehviewer/badge" alt="CodeFactor">
|
<img src="https://www.codefactor.io/repository/github/FooIbar/EhViewer/badge" alt="CodeFactor">
|
||||||
</a>
|
</a>
|
||||||
<a href="https://github.com/Ehviewer-Overhauled/Ehviewer/releases">
|
<a href="https://github.com/FooIbar/EhViewer/releases">
|
||||||
<img src="https://img.shields.io/github/downloads/Ehviewer-Overhauled/EhViewer/total.svg" alt="Downloads">
|
<img src="https://img.shields.io/github/downloads/FooIbar/EhViewer/total.svg" alt="Downloads">
|
||||||
</a>
|
</a>
|
||||||
<a href="https://github.com/Ehviewer-Overhauled/Ehviewer/releases">
|
<a href="https://github.com/FooIbar/EhViewer/releases">
|
||||||
<img src="https://img.shields.io/github/v/release/Ehviewer-Overhauled/ehviewer?include_prereleases" alt="Release">
|
<img src="https://img.shields.io/github/v/release/FooIbar/EhViewer" alt="Release">
|
||||||
</a>
|
</a>
|
||||||
<a href="https://github.com/Ehviewer-Overhauled/Ehviewer/issues">
|
<a href="https://github.com/FooIbar/EhViewer/issues">
|
||||||
<img src="https://img.shields.io/github/issues/Ehviewer-Overhauled/ehviewer" alt="Issues">
|
<img src="https://img.shields.io/github/issues/FooIbar/EhViewer" alt="Issues">
|
||||||
</a>
|
</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<div align="center">
|
<div align="center">
|
||||||
<h3>
|
<h3>
|
||||||
<a href="https://github.com/Ehviewer-Overhauled/Ehviewer#description">
|
<a href="https://github.com/FooIbar/EhViewer#description">
|
||||||
Description
|
Description
|
||||||
</a>
|
</a>
|
||||||
<span> | </span>
|
<span> | </span>
|
||||||
<a href="https://github.com/Ehviewer-Overhauled/Ehviewer#download">
|
<a href="https://github.com/FooIbar/EhViewer#download">
|
||||||
Download
|
Download
|
||||||
</a>
|
</a>
|
||||||
<span> | </span>
|
<span> | </span>
|
||||||
<a href="https://github.com/Ehviewer-Overhauled/Ehviewer#screenshot">
|
<a href="https://github.com/FooIbar/EhViewer#screenshot">
|
||||||
Screenshot
|
Screenshot
|
||||||
</a>
|
</a>
|
||||||
<span> | </span>
|
<span> | </span>
|
||||||
<a href="https://github.com/Ehviewer-Overhauled/Ehviewer#thanks">
|
<a href="https://github.com/FooIbar/EhViewer#thanks">
|
||||||
Thanks
|
Thanks
|
||||||
</a>
|
</a>
|
||||||
<span> | </span>
|
<span> | </span>
|
||||||
<a href="https://github.com/Ehviewer-Overhauled/Ehviewer#license">
|
<a href="https://github.com/FooIbar/EhViewer#license">
|
||||||
License
|
License
|
||||||
</a>
|
</a>
|
||||||
</h3>
|
</h3>
|
||||||
@@ -73,7 +73,9 @@ and [Dynamic Color](https://m3.material.io/styles/color/dynamic-color/overview)
|
|||||||
|
|
||||||
# Download
|
# Download
|
||||||
|
|
||||||
<a href="https://github.com/Ehviewer-Overhauled/Ehviewer/releases"><img alt="Get it on GitHub" src="https://github.com/Ehviewer-Overhauled/Art/blob/master/get-it-on-github.svg" width="200px"/></a> <a href="https://github.com/Ehviewer-Overhauled/fdroid-repo"><img alt="Get it on F-Droid" src="https://github.com/Ehviewer-Overhauled/Art/blob/master/get-it-on-fdroid.svg" width="200px"/></a>
|
<a href="https://github.com/FooIbar/EhViewer/releases">
|
||||||
|
<img alt="Get it on GitHub" src="https://github.com/Ehviewer-Overhauled/Art/blob/master/get-it-on-github.svg" width="200px"/>
|
||||||
|
</a>
|
||||||
|
|
||||||
# Screenshot
|
# Screenshot
|
||||||
|
|
||||||
@@ -103,6 +105,7 @@ Specially thanks [Tachiyomi](https://tachiyomi.org/) for its reader implementati
|
|||||||
Copyright 2014-2019 Hippo Seven
|
Copyright 2014-2019 Hippo Seven
|
||||||
Copyright 2020-2022 NekoInverter
|
Copyright 2020-2022 NekoInverter
|
||||||
Copyright 2022-2023 Tarsin Norbin
|
Copyright 2022-2023 Tarsin Norbin
|
||||||
|
Copyright 2023 Foolbar
|
||||||
|
|
||||||
EhViewer is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
|
EhViewer is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
|||||||
+32
-17
@@ -13,6 +13,7 @@ plugins {
|
|||||||
id("kotlin-parcelize")
|
id("kotlin-parcelize")
|
||||||
kotlin("plugin.serialization")
|
kotlin("plugin.serialization")
|
||||||
id("com.google.devtools.ksp")
|
id("com.google.devtools.ksp")
|
||||||
|
id("com.diffplug.spotless")
|
||||||
id("com.mikepenz.aboutlibraries.plugin")
|
id("com.mikepenz.aboutlibraries.plugin")
|
||||||
id("org.mozilla.rust-android-gradle.rust-android")
|
id("org.mozilla.rust-android-gradle.rust-android")
|
||||||
id("dev.shreyaspatil.compose-compiler-report-generator")
|
id("dev.shreyaspatil.compose-compiler-report-generator")
|
||||||
@@ -21,7 +22,7 @@ plugins {
|
|||||||
android {
|
android {
|
||||||
compileSdk = 34
|
compileSdk = 34
|
||||||
buildToolsVersion = "34.0.0"
|
buildToolsVersion = "34.0.0"
|
||||||
ndkVersion = "26.0.10636728"
|
ndkVersion = "26.0.10792818"
|
||||||
|
|
||||||
splits {
|
splits {
|
||||||
abi {
|
abi {
|
||||||
@@ -68,7 +69,7 @@ android {
|
|||||||
minSdk = 28
|
minSdk = 28
|
||||||
targetSdk = 34
|
targetSdk = 34
|
||||||
versionCode = 180043
|
versionCode = 180043
|
||||||
versionName = "1.8.9.6"
|
versionName = "1.8.9.7"
|
||||||
versionNameSuffix = "-gms"
|
versionNameSuffix = "-gms"
|
||||||
resourceConfigurations.addAll(
|
resourceConfigurations.addAll(
|
||||||
listOf(
|
listOf(
|
||||||
@@ -88,7 +89,6 @@ android {
|
|||||||
)
|
)
|
||||||
buildConfigField("String", "BRANCH", "\"$branch\"")
|
buildConfigField("String", "BRANCH", "\"$branch\"")
|
||||||
buildConfigField("String", "COMMIT_SHA", "\"$commitSha\"")
|
buildConfigField("String", "COMMIT_SHA", "\"$commitSha\"")
|
||||||
buildConfigField("String", "BUILD_TIME", "\"$buildTime\"")
|
|
||||||
buildConfigField("String", "REPO_NAME", "\"$repoName\"")
|
buildConfigField("String", "REPO_NAME", "\"$repoName\"")
|
||||||
buildConfigField("String", "VERSION_NAME_SUFFIX", "\"$versionNameSuffix\"")
|
buildConfigField("String", "VERSION_NAME_SUFFIX", "\"$versionNameSuffix\"")
|
||||||
}
|
}
|
||||||
@@ -153,9 +153,11 @@ android {
|
|||||||
isShrinkResources = true
|
isShrinkResources = true
|
||||||
proguardFiles("proguard-rules.pro")
|
proguardFiles("proguard-rules.pro")
|
||||||
signingConfig = signConfig
|
signingConfig = signConfig
|
||||||
|
buildConfigField("String", "BUILD_TIME", "\"$buildTime\"")
|
||||||
}
|
}
|
||||||
debug {
|
debug {
|
||||||
applicationIdSuffix = ".debug"
|
applicationIdSuffix = ".debug"
|
||||||
|
buildConfigField("String", "BUILD_TIME", "\"\"")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -174,7 +176,7 @@ android {
|
|||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
// https://developer.android.com/jetpack/androidx/releases/activity
|
// https://developer.android.com/jetpack/androidx/releases/activity
|
||||||
implementation("androidx.activity:activity-compose:1.8.0-beta01")
|
implementation("androidx.activity:activity-compose:1.8.0-rc01")
|
||||||
implementation("androidx.appcompat:appcompat:1.6.1")
|
implementation("androidx.appcompat:appcompat:1.6.1")
|
||||||
implementation("androidx.biometric:biometric-ktx:1.2.0-alpha05")
|
implementation("androidx.biometric:biometric-ktx:1.2.0-alpha05")
|
||||||
implementation("androidx.browser:browser:1.6.0")
|
implementation("androidx.browser:browser:1.6.0")
|
||||||
@@ -192,15 +194,15 @@ dependencies {
|
|||||||
|
|
||||||
implementation("androidx.constraintlayout:constraintlayout-compose:1.1.0-alpha12")
|
implementation("androidx.constraintlayout:constraintlayout-compose:1.1.0-alpha12")
|
||||||
implementation("androidx.coordinatorlayout:coordinatorlayout:1.2.0")
|
implementation("androidx.coordinatorlayout:coordinatorlayout:1.2.0")
|
||||||
implementation("androidx.fragment:fragment-ktx:1.7.0-alpha04")
|
implementation("androidx.fragment:fragment-ktx:1.7.0-alpha05")
|
||||||
// https://developer.android.com/jetpack/androidx/releases/lifecycle
|
// https://developer.android.com/jetpack/androidx/releases/lifecycle
|
||||||
implementation("androidx.lifecycle:lifecycle-process:2.6.2")
|
implementation("androidx.lifecycle:lifecycle-process:2.6.2")
|
||||||
|
|
||||||
// https://developer.android.com/jetpack/androidx/releases/navigation
|
// https://developer.android.com/jetpack/androidx/releases/navigation
|
||||||
val nav_version = "2.7.2"
|
val navigation = "2.7.3"
|
||||||
implementation("androidx.navigation:navigation-fragment-ktx:$nav_version")
|
implementation("androidx.navigation:navigation-fragment-ktx:$navigation")
|
||||||
implementation("androidx.navigation:navigation-ui-ktx:$nav_version")
|
implementation("androidx.navigation:navigation-ui-ktx:$navigation")
|
||||||
implementation("androidx.navigation:navigation-compose:$nav_version")
|
implementation("androidx.navigation:navigation-compose:$navigation")
|
||||||
|
|
||||||
// https://developer.android.com/jetpack/androidx/releases/paging
|
// https://developer.android.com/jetpack/androidx/releases/paging
|
||||||
val paging = "3.2.1"
|
val paging = "3.2.1"
|
||||||
@@ -210,9 +212,9 @@ dependencies {
|
|||||||
implementation("androidx.recyclerview:recyclerview-selection:1.2.0-alpha01")
|
implementation("androidx.recyclerview:recyclerview-selection:1.2.0-alpha01")
|
||||||
|
|
||||||
// https://developer.android.com/jetpack/androidx/releases/room
|
// https://developer.android.com/jetpack/androidx/releases/room
|
||||||
val room_version = "2.6.0-beta01"
|
val room = "2.6.0-rc01"
|
||||||
ksp("androidx.room:room-compiler:$room_version")
|
ksp("androidx.room:room-compiler:$room")
|
||||||
implementation("androidx.room:room-paging:$room_version")
|
implementation("androidx.room:room-paging:$room")
|
||||||
|
|
||||||
implementation("androidx.swiperefreshlayout:swiperefreshlayout:1.2.0-alpha01")
|
implementation("androidx.swiperefreshlayout:swiperefreshlayout:1.2.0-alpha01")
|
||||||
implementation("androidx.work:work-runtime-ktx:2.8.1")
|
implementation("androidx.work:work-runtime-ktx:2.8.1")
|
||||||
@@ -220,10 +222,10 @@ dependencies {
|
|||||||
implementation("com.github.chrisbanes:PhotoView:2.3.0") // Dead Dependency
|
implementation("com.github.chrisbanes:PhotoView:2.3.0") // Dead Dependency
|
||||||
implementation("com.github.tachiyomiorg:DirectionalViewPager:1.0.0") // Dead Dependency
|
implementation("com.github.tachiyomiorg:DirectionalViewPager:1.0.0") // Dead Dependency
|
||||||
// https://github.com/google/accompanist/releases
|
// https://github.com/google/accompanist/releases
|
||||||
val accompanist_version = "0.32.0"
|
val accompanist = "0.32.0"
|
||||||
implementation("com.google.accompanist:accompanist-themeadapter-material3:$accompanist_version")
|
implementation("com.google.accompanist:accompanist-themeadapter-material3:$accompanist")
|
||||||
implementation("com.google.accompanist:accompanist-webview:$accompanist_version")
|
implementation("com.google.accompanist:accompanist-webview:$accompanist")
|
||||||
implementation("com.google.android.material:material:1.11.0-alpha02")
|
implementation("com.google.android.material:material:1.11.0-alpha03")
|
||||||
|
|
||||||
val splitties = "3.0.0"
|
val splitties = "3.0.0"
|
||||||
implementation("com.louiscad.splitties:splitties-appctx:$splitties")
|
implementation("com.louiscad.splitties:splitties-appctx:$splitties")
|
||||||
@@ -238,7 +240,7 @@ dependencies {
|
|||||||
|
|
||||||
implementation("com.squareup.okio:okio-jvm:3.5.0")
|
implementation("com.squareup.okio:okio-jvm:3.5.0")
|
||||||
|
|
||||||
implementation("com.mikepenz:aboutlibraries-core:10.8.3")
|
implementation("com.mikepenz:aboutlibraries-core:10.9.1")
|
||||||
|
|
||||||
implementation("dev.chrisbanes.insetter:insetter:0.6.1") // Dead Dependency
|
implementation("dev.chrisbanes.insetter:insetter:0.6.1") // Dead Dependency
|
||||||
implementation("dev.rikka.rikkax.core:core-ktx:1.4.1")
|
implementation("dev.rikka.rikkax.core:core-ktx:1.4.1")
|
||||||
@@ -302,6 +304,19 @@ cargo {
|
|||||||
if (isRelease) profile = "release"
|
if (isRelease) profile = "release"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
spotless {
|
||||||
|
kotlin {
|
||||||
|
ktlint()
|
||||||
|
}
|
||||||
|
kotlinGradle {
|
||||||
|
ktlint().editorConfigOverride(
|
||||||
|
mapOf(
|
||||||
|
"ktlint_standard_multiline-expression-wrapping" to "disabled",
|
||||||
|
),
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
tasks.configureEach {
|
tasks.configureEach {
|
||||||
if ((name == "mergeDebugJniLibFolders" || name == "mergeReleaseJniLibFolders")) {
|
if ((name == "mergeDebugJniLibFolders" || name == "mergeReleaseJniLibFolders")) {
|
||||||
dependsOn("cargoBuild")
|
dependsOn("cargoBuild")
|
||||||
|
|||||||
@@ -1,34 +0,0 @@
|
|||||||
From 2bda36800a5424c44378bbc0cc8bb5d26a0f34fa Mon Sep 17 00:00:00 2001
|
|
||||||
From: tarsin <yuanqingxiang233@163.com>
|
|
||||||
Date: Sat, 22 Jul 2023 08:30:20 +0800
|
|
||||||
Subject: [PATCH] Don't build other binarys
|
|
||||||
|
|
||||||
---
|
|
||||||
CMakeLists.txt | 4 ++--
|
|
||||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
||||||
index 55cd358..52b57aa 100644
|
|
||||||
--- a/CMakeLists.txt
|
|
||||||
+++ b/CMakeLists.txt
|
|
||||||
@@ -962,7 +962,7 @@ check_symbol_exists(getopt_long getopt.h HAVE_GETOPT_LONG)
|
|
||||||
# xzdec
|
|
||||||
#############################################################################
|
|
||||||
|
|
||||||
-if(HAVE_GETOPT_LONG AND HAVE_DECODERS)
|
|
||||||
+if(0)
|
|
||||||
add_executable(xzdec
|
|
||||||
src/common/sysdefs.h
|
|
||||||
src/common/tuklib_common.h
|
|
||||||
@@ -1008,7 +1008,7 @@ endif()
|
|
||||||
# xz
|
|
||||||
#############################################################################
|
|
||||||
|
|
||||||
-if(NOT MSVC AND HAVE_GETOPT_LONG)
|
|
||||||
+if(0)
|
|
||||||
add_executable(xz
|
|
||||||
src/common/mythread.h
|
|
||||||
src/common/sysdefs.h
|
|
||||||
--
|
|
||||||
2.41.0
|
|
||||||
|
|
||||||
@@ -1,29 +0,0 @@
|
|||||||
From 57da49f9b0ed8538573f6cfe289f835ee0078eec Mon Sep 17 00:00:00 2001
|
|
||||||
From: tarsin <yuanqingxiang233@163.com>
|
|
||||||
Date: Sat, 22 Jul 2023 17:50:08 +0800
|
|
||||||
Subject: [PATCH] Hide symbols
|
|
||||||
|
|
||||||
---
|
|
||||||
CMakeLists.txt | 4 ++--
|
|
||||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
||||||
index 646484b7..67a71272 100644
|
|
||||||
--- a/CMakeLists.txt
|
|
||||||
+++ b/CMakeLists.txt
|
|
||||||
@@ -2060,10 +2060,10 @@ SET(OLD_CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS}")
|
|
||||||
SET(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -fvisibility=hidden -Werror")
|
|
||||||
CHECK_C_SOURCE_COMPILES("void __attribute__((visibility(\"default\"))) foo(void);
|
|
||||||
int main() { return 0; }" HAVE_VISIBILITY_ATTR)
|
|
||||||
-IF (HAVE_VISIBILITY_ATTR)
|
|
||||||
+IF (0)
|
|
||||||
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fvisibility=hidden")
|
|
||||||
ADD_DEFINITIONS(-D__LIBARCHIVE_ENABLE_VISIBILITY)
|
|
||||||
-ENDIF(HAVE_VISIBILITY_ATTR)
|
|
||||||
+ENDIF(0)
|
|
||||||
SET(CMAKE_REQUIRED_FLAGS "${OLD_CMAKE_REQUIRED_FLAGS}")
|
|
||||||
|
|
||||||
# Generate "config.h" from "build/cmake/config.h.in"
|
|
||||||
--
|
|
||||||
2.41.0
|
|
||||||
|
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
From c9298fd6dc0a8b04dd4b2247118b9cb895c46e58 Mon Sep 17 00:00:00 2001
|
|
||||||
From: tarsin <yuanqingxiang233@163.com>
|
|
||||||
Date: Sat, 23 Jul 2022 16:05:36 +0800
|
|
||||||
Subject: [PATCH 2/2] Insert link libs
|
|
||||||
|
|
||||||
---
|
|
||||||
CMakeLists.txt | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
||||||
index 713e3bc5..7247640d 100644
|
|
||||||
--- a/CMakeLists.txt
|
|
||||||
+++ b/CMakeLists.txt
|
|
||||||
@@ -415,7 +415,7 @@ IF(DEFINED __GNUWIN32PATH AND EXISTS "${__GNUWIN32PATH}")
|
|
||||||
# # endif
|
|
||||||
ENDIF(DEFINED __GNUWIN32PATH AND EXISTS "${__GNUWIN32PATH}")
|
|
||||||
|
|
||||||
-SET(ADDITIONAL_LIBS "")
|
|
||||||
+SET(ADDITIONAL_LIBS ${LIBARCHIVE_CUSTOM_LIBS})
|
|
||||||
#
|
|
||||||
# Find ZLIB
|
|
||||||
#
|
|
||||||
--
|
|
||||||
2.39.2
|
|
||||||
|
|
||||||
@@ -23,15 +23,21 @@ set(FETCHCONTENT_BASE_DIR ${deps})
|
|||||||
set(BUILD_TESTING 0)
|
set(BUILD_TESTING 0)
|
||||||
|
|
||||||
FetchContent_Declare(liblzma
|
FetchContent_Declare(liblzma
|
||||||
GIT_REPOSITORY https://git.tukaani.org/xz.git
|
GIT_REPOSITORY https://github.com/FooIbar/xz.git
|
||||||
GIT_TAG v5.4.3
|
GIT_TAG v5.4.4
|
||||||
PATCH_COMMAND git apply ${CMAKE_CURRENT_LIST_DIR}/0001-Don-t-build-other-binarys.patch || cd .
|
|
||||||
)
|
)
|
||||||
|
|
||||||
FetchContent_MakeAvailable(liblzma)
|
FetchContent_MakeAvailable(liblzma)
|
||||||
include_directories(${liblzma_SOURCE_DIR}/src/liblzma/api)
|
include_directories(${liblzma_SOURCE_DIR}/src/liblzma/api)
|
||||||
|
|
||||||
# Build GNUTLS libnettle
|
# Build GNUTLS libnettle
|
||||||
|
FetchContent_Declare(nettle
|
||||||
|
URL https://ftp.gnu.org/gnu/nettle/nettle-3.9.1.tar.gz
|
||||||
|
URL_MD5 29fcd2dec6bf5b48e5e3ffb3cbc4779e
|
||||||
|
SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR}/nettle/nettle
|
||||||
|
)
|
||||||
|
|
||||||
|
FetchContent_MakeAvailable(nettle)
|
||||||
add_subdirectory(nettle)
|
add_subdirectory(nettle)
|
||||||
|
|
||||||
# Configure libnettle support for libarchive
|
# Configure libnettle support for libarchive
|
||||||
@@ -62,9 +68,8 @@ option(ENABLE_TEST OFF)
|
|||||||
SET(LIBARCHIVE_CUSTOM_LIBS "nettle" "liblzma")
|
SET(LIBARCHIVE_CUSTOM_LIBS "nettle" "liblzma")
|
||||||
|
|
||||||
FetchContent_Declare(libarchive
|
FetchContent_Declare(libarchive
|
||||||
GIT_REPOSITORY https://github.com/libarchive/libarchive
|
GIT_REPOSITORY https://github.com/FooIbar/libarchive.git
|
||||||
GIT_TAG v3.7.0
|
GIT_TAG v3.7.2
|
||||||
PATCH_COMMAND git apply ${CMAKE_CURRENT_LIST_DIR}/0001-Hide-symbols.patch ${CMAKE_CURRENT_LIST_DIR}/0002-Insert-link-libs.patch || cd .
|
|
||||||
)
|
)
|
||||||
|
|
||||||
FetchContent_MakeAvailable(libarchive)
|
FetchContent_MakeAvailable(libarchive)
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
/nettle
|
||||||
@@ -32,7 +32,6 @@ set(LIBNETTLE_SOURCES
|
|||||||
nettle/aes256-meta.c
|
nettle/aes256-meta.c
|
||||||
nettle/nist-keywrap.c
|
nettle/nist-keywrap.c
|
||||||
nettle/arcfour.c
|
nettle/arcfour.c
|
||||||
nettle/arcfour-crypt.c
|
|
||||||
nettle/arctwo.c
|
nettle/arctwo.c
|
||||||
nettle/arctwo-meta.c
|
nettle/arctwo-meta.c
|
||||||
nettle/blowfish.c
|
nettle/blowfish.c
|
||||||
@@ -177,7 +176,7 @@ set(LIBNETTLE_SOURCES
|
|||||||
nettle/sha1-compress.c
|
nettle/sha1-compress.c
|
||||||
nettle/sha1-meta.c
|
nettle/sha1-meta.c
|
||||||
nettle/sha256.c
|
nettle/sha256.c
|
||||||
nettle/sha256-compress.c
|
nettle/sha256-compress-n.c
|
||||||
nettle/sha224-meta.c
|
nettle/sha224-meta.c
|
||||||
nettle/sha256-meta.c
|
nettle/sha256-meta.c
|
||||||
nettle/sha512.c
|
nettle/sha512.c
|
||||||
|
|||||||
@@ -4,13 +4,19 @@
|
|||||||
/* Define if building universal (internal helper macro) */
|
/* Define if building universal (internal helper macro) */
|
||||||
/* #undef AC_APPLE_UNIVERSAL_BUILD */
|
/* #undef AC_APPLE_UNIVERSAL_BUILD */
|
||||||
|
|
||||||
/* Define to 1 if using 'alloca.c'. */
|
/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
|
||||||
|
systems. This function is required for `alloca.c' support on those systems.
|
||||||
|
*/
|
||||||
|
/* #undef CRAY_STACKSEG_END */
|
||||||
|
|
||||||
|
/* Define to 1 if using `alloca.c'. */
|
||||||
/* #undef C_ALLOCA */
|
/* #undef C_ALLOCA */
|
||||||
|
|
||||||
/* Define to 1 if you have 'alloca', as a function or macro. */
|
/* Define to 1 if you have `alloca', as a function or macro. */
|
||||||
#define HAVE_ALLOCA 1
|
#define HAVE_ALLOCA 1
|
||||||
|
|
||||||
/* Define to 1 if <alloca.h> works. */
|
/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix).
|
||||||
|
*/
|
||||||
#define HAVE_ALLOCA_H 1
|
#define HAVE_ALLOCA_H 1
|
||||||
|
|
||||||
/* Define if __builtin_bswap64 is available */
|
/* Define if __builtin_bswap64 is available */
|
||||||
@@ -46,6 +52,9 @@
|
|||||||
/* Define to 1 if you have the <malloc.h> header file. */
|
/* Define to 1 if you have the <malloc.h> header file. */
|
||||||
#define HAVE_MALLOC_H 1
|
#define HAVE_MALLOC_H 1
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <memory.h> header file. */
|
||||||
|
#define HAVE_MEMORY_H 1
|
||||||
|
|
||||||
/* Define to 1 each of the following for which a native (ie. CPU specific)
|
/* Define to 1 each of the following for which a native (ie. CPU specific)
|
||||||
implementation of the corresponding routine exists. */
|
implementation of the corresponding routine exists. */
|
||||||
/* #undef HAVE_NATIVE_memxor3 */
|
/* #undef HAVE_NATIVE_memxor3 */
|
||||||
@@ -71,7 +80,7 @@
|
|||||||
/* #undef HAVE_NATIVE_cbc_aes256_encrypt */
|
/* #undef HAVE_NATIVE_cbc_aes256_encrypt */
|
||||||
/* #undef HAVE_NATIVE_chacha_core */
|
/* #undef HAVE_NATIVE_chacha_core */
|
||||||
/* #undef HAVE_NATIVE_chacha_2core */
|
/* #undef HAVE_NATIVE_chacha_2core */
|
||||||
/* #undef HAVE_NATIVE_chacha_3core */
|
#define HAVE_NATIVE_chacha_3core 1
|
||||||
/* #undef HAVE_NATIVE_chacha_4core */
|
/* #undef HAVE_NATIVE_chacha_4core */
|
||||||
/* #undef HAVE_NATIVE_fat_chacha_2core */
|
/* #undef HAVE_NATIVE_fat_chacha_2core */
|
||||||
/* #undef HAVE_NATIVE_fat_chacha_3core */
|
/* #undef HAVE_NATIVE_fat_chacha_3core */
|
||||||
@@ -88,13 +97,18 @@
|
|||||||
/* #undef HAVE_NATIVE_ecc_secp384r1_redc */
|
/* #undef HAVE_NATIVE_ecc_secp384r1_redc */
|
||||||
/* #undef HAVE_NATIVE_ecc_secp521r1_modp */
|
/* #undef HAVE_NATIVE_ecc_secp521r1_modp */
|
||||||
/* #undef HAVE_NATIVE_ecc_secp521r1_redc */
|
/* #undef HAVE_NATIVE_ecc_secp521r1_redc */
|
||||||
|
/* #undef HAVE_NATIVE_poly1305_set_key */
|
||||||
|
/* #undef HAVE_NATIVE_poly1305_block */
|
||||||
|
/* #undef HAVE_NATIVE_poly1305_digest */
|
||||||
|
/* #undef HAVE_NATIVE_poly1305_blocks */
|
||||||
|
/* #undef HAVE_NATIVE_fat_poly1305_blocks */
|
||||||
/* #undef HAVE_NATIVE_ghash_set_key */
|
/* #undef HAVE_NATIVE_ghash_set_key */
|
||||||
/* #undef HAVE_NATIVE_ghash_update */
|
/* #undef HAVE_NATIVE_ghash_update */
|
||||||
/* #undef HAVE_NATIVE_salsa20_core */
|
/* #undef HAVE_NATIVE_salsa20_core */
|
||||||
/* #undef HAVE_NATIVE_salsa20_2core */
|
#define HAVE_NATIVE_salsa20_2core 1
|
||||||
/* #undef HAVE_NATIVE_fat_salsa20_2core */
|
/* #undef HAVE_NATIVE_fat_salsa20_2core */
|
||||||
/* #undef HAVE_NATIVE_sha1_compress */
|
/* #undef HAVE_NATIVE_sha1_compress */
|
||||||
/* #undef HAVE_NATIVE_sha256_compress */
|
/* #undef HAVE_NATIVE_sha256_compress_n */
|
||||||
/* #undef HAVE_NATIVE_sha512_compress */
|
/* #undef HAVE_NATIVE_sha512_compress */
|
||||||
/* #undef HAVE_NATIVE_sha3_permute */
|
/* #undef HAVE_NATIVE_sha3_permute */
|
||||||
/* #undef HAVE_NATIVE_umac_nh */
|
/* #undef HAVE_NATIVE_umac_nh */
|
||||||
@@ -107,14 +121,11 @@
|
|||||||
/* #undef HAVE_OPENSSL_EVP_H */
|
/* #undef HAVE_OPENSSL_EVP_H */
|
||||||
|
|
||||||
/* Define to 1 if you have the `secure_getenv' function. */
|
/* Define to 1 if you have the `secure_getenv' function. */
|
||||||
/* #undef HAVE_SECURE_GETENV */
|
#define HAVE_SECURE_GETENV 1
|
||||||
|
|
||||||
/* Define to 1 if you have the <stdint.h> header file. */
|
/* Define to 1 if you have the <stdint.h> header file. */
|
||||||
#define HAVE_STDINT_H 1
|
#define HAVE_STDINT_H 1
|
||||||
|
|
||||||
/* Define to 1 if you have the <stdio.h> header file. */
|
|
||||||
#define HAVE_STDIO_H 1
|
|
||||||
|
|
||||||
/* Define to 1 if you have the <stdlib.h> header file. */
|
/* Define to 1 if you have the <stdlib.h> header file. */
|
||||||
#define HAVE_STDLIB_H 1
|
#define HAVE_STDLIB_H 1
|
||||||
|
|
||||||
@@ -130,9 +141,6 @@
|
|||||||
/* Define to 1 if you have the <sys/stat.h> header file. */
|
/* Define to 1 if you have the <sys/stat.h> header file. */
|
||||||
#define HAVE_SYS_STAT_H 1
|
#define HAVE_SYS_STAT_H 1
|
||||||
|
|
||||||
/* Define to 1 if you have the <sys/time.h> header file. */
|
|
||||||
#define HAVE_SYS_TIME_H 1
|
|
||||||
|
|
||||||
/* Define to 1 if you have the <sys/types.h> header file. */
|
/* Define to 1 if you have the <sys/types.h> header file. */
|
||||||
#define HAVE_SYS_TYPES_H 1
|
#define HAVE_SYS_TYPES_H 1
|
||||||
|
|
||||||
@@ -149,7 +157,7 @@
|
|||||||
#define PACKAGE_NAME "nettle"
|
#define PACKAGE_NAME "nettle"
|
||||||
|
|
||||||
/* Define to the full name and version of this package. */
|
/* Define to the full name and version of this package. */
|
||||||
#define PACKAGE_STRING "nettle 3.8.1"
|
#define PACKAGE_STRING "nettle 3.9.1"
|
||||||
|
|
||||||
/* Define to the one symbol short name of this package. */
|
/* Define to the one symbol short name of this package. */
|
||||||
#define PACKAGE_TARNAME "nettle"
|
#define PACKAGE_TARNAME "nettle"
|
||||||
@@ -158,7 +166,7 @@
|
|||||||
#define PACKAGE_URL ""
|
#define PACKAGE_URL ""
|
||||||
|
|
||||||
/* Define to the version of this package. */
|
/* Define to the version of this package. */
|
||||||
#define PACKAGE_VERSION "3.8.1"
|
#define PACKAGE_VERSION "3.9.1"
|
||||||
|
|
||||||
/* The size of `long', as computed by sizeof. */
|
/* The size of `long', as computed by sizeof. */
|
||||||
#define SIZEOF_LONG __SIZEOF_LONG__
|
#define SIZEOF_LONG __SIZEOF_LONG__
|
||||||
@@ -174,13 +182,10 @@
|
|||||||
STACK_DIRECTION = 0 => direction of growth unknown */
|
STACK_DIRECTION = 0 => direction of growth unknown */
|
||||||
/* #undef STACK_DIRECTION */
|
/* #undef STACK_DIRECTION */
|
||||||
|
|
||||||
/* Define to 1 if all of the C90 standard headers exist (not just the ones
|
/* Define to 1 if you have the ANSI C header files. */
|
||||||
required in a freestanding environment). This macro is provided for
|
|
||||||
backward compatibility; new code need not use it. */
|
|
||||||
#define STDC_HEADERS 1
|
#define STDC_HEADERS 1
|
||||||
|
|
||||||
/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. This
|
/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
|
||||||
macro is obsolete. */
|
|
||||||
#define TIME_WITH_SYS_TIME 1
|
#define TIME_WITH_SYS_TIME 1
|
||||||
|
|
||||||
/* Defined if public key features are enabled */
|
/* Defined if public key features are enabled */
|
||||||
|
|||||||
Submodule app/src/main/cpp/nettle/nettle deleted from 990abad16c.
@@ -41,7 +41,7 @@ extern "C" {
|
|||||||
|
|
||||||
/* Individual version numbers in decimal */
|
/* Individual version numbers in decimal */
|
||||||
#define NETTLE_VERSION_MAJOR 3
|
#define NETTLE_VERSION_MAJOR 3
|
||||||
#define NETTLE_VERSION_MINOR 8
|
#define NETTLE_VERSION_MINOR 9
|
||||||
|
|
||||||
#define NETTLE_USE_MINI_GMP 0
|
#define NETTLE_USE_MINI_GMP 0
|
||||||
|
|
||||||
|
|||||||
@@ -5,10 +5,12 @@ import androidx.compose.animation.AnimatedContentTransitionScope
|
|||||||
import androidx.compose.animation.core.tween
|
import androidx.compose.animation.core.tween
|
||||||
import androidx.compose.animation.fadeIn
|
import androidx.compose.animation.fadeIn
|
||||||
import androidx.compose.animation.fadeOut
|
import androidx.compose.animation.fadeOut
|
||||||
|
import androidx.compose.foundation.layout.imePadding
|
||||||
import androidx.compose.material3.windowsizeclass.calculateWindowSizeClass
|
import androidx.compose.material3.windowsizeclass.calculateWindowSizeClass
|
||||||
import androidx.compose.runtime.CompositionLocalProvider
|
import androidx.compose.runtime.CompositionLocalProvider
|
||||||
import androidx.compose.runtime.SideEffect
|
import androidx.compose.runtime.SideEffect
|
||||||
import androidx.compose.runtime.compositionLocalOf
|
import androidx.compose.runtime.compositionLocalOf
|
||||||
|
import androidx.compose.ui.Modifier
|
||||||
import androidx.core.view.WindowCompat
|
import androidx.core.view.WindowCompat
|
||||||
import androidx.navigation.NavController
|
import androidx.navigation.NavController
|
||||||
import androidx.navigation.compose.NavHost
|
import androidx.navigation.compose.NavHost
|
||||||
@@ -46,6 +48,7 @@ class ConfigureActivity : EhActivity() {
|
|||||||
} else {
|
} else {
|
||||||
BASE_SETTINGS_SCREEN
|
BASE_SETTINGS_SCREEN
|
||||||
},
|
},
|
||||||
|
modifier = Modifier.imePadding(),
|
||||||
enterTransition = { slideIntoContainer(AnimatedContentTransitionScope.SlideDirection.Up, tween(200)) },
|
enterTransition = { slideIntoContainer(AnimatedContentTransitionScope.SlideDirection.Up, tween(200)) },
|
||||||
exitTransition = { fadeOut(tween(200)) },
|
exitTransition = { fadeOut(tween(200)) },
|
||||||
popEnterTransition = { fadeIn(tween(200)) },
|
popEnterTransition = { fadeIn(tween(200)) },
|
||||||
|
|||||||
@@ -8,14 +8,11 @@ import android.util.AttributeSet
|
|||||||
import androidx.activity.result.contract.ActivityResultContracts
|
import androidx.activity.result.contract.ActivityResultContracts
|
||||||
import androidx.compose.animation.AnimatedVisibility
|
import androidx.compose.animation.AnimatedVisibility
|
||||||
import androidx.compose.foundation.layout.Column
|
import androidx.compose.foundation.layout.Column
|
||||||
import androidx.compose.foundation.layout.Spacer
|
|
||||||
import androidx.compose.foundation.layout.WindowInsets
|
|
||||||
import androidx.compose.foundation.layout.asPaddingValues
|
|
||||||
import androidx.compose.foundation.layout.fillMaxWidth
|
import androidx.compose.foundation.layout.fillMaxWidth
|
||||||
import androidx.compose.foundation.layout.height
|
import androidx.compose.foundation.layout.height
|
||||||
import androidx.compose.foundation.layout.imePadding
|
import androidx.compose.foundation.layout.imePadding
|
||||||
|
import androidx.compose.foundation.layout.navigationBarsPadding
|
||||||
import androidx.compose.foundation.layout.padding
|
import androidx.compose.foundation.layout.padding
|
||||||
import androidx.compose.foundation.layout.systemBars
|
|
||||||
import androidx.compose.foundation.rememberScrollState
|
import androidx.compose.foundation.rememberScrollState
|
||||||
import androidx.compose.foundation.verticalScroll
|
import androidx.compose.foundation.verticalScroll
|
||||||
import androidx.compose.material3.ElevatedCard
|
import androidx.compose.material3.ElevatedCard
|
||||||
@@ -34,6 +31,10 @@ import androidx.compose.ui.platform.AbstractComposeView
|
|||||||
import androidx.compose.ui.res.dimensionResource
|
import androidx.compose.ui.res.dimensionResource
|
||||||
import androidx.compose.ui.res.stringResource
|
import androidx.compose.ui.res.stringResource
|
||||||
import androidx.compose.ui.text.font.FontWeight
|
import androidx.compose.ui.text.font.FontWeight
|
||||||
|
import androidx.lifecycle.ViewModel
|
||||||
|
import androidx.lifecycle.ViewModelProvider
|
||||||
|
import androidx.lifecycle.findViewTreeViewModelStoreOwner
|
||||||
|
import androidx.lifecycle.get
|
||||||
import com.google.accompanist.themeadapter.material3.Mdc3Theme
|
import com.google.accompanist.themeadapter.material3.Mdc3Theme
|
||||||
import com.hippo.ehviewer.R
|
import com.hippo.ehviewer.R
|
||||||
import com.hippo.ehviewer.Settings
|
import com.hippo.ehviewer.Settings
|
||||||
@@ -49,120 +50,125 @@ import com.hippo.ehviewer.util.pickVisualMedia
|
|||||||
import com.hippo.unifile.UniFile
|
import com.hippo.unifile.UniFile
|
||||||
import kotlinx.coroutines.launch
|
import kotlinx.coroutines.launch
|
||||||
|
|
||||||
|
class SearchViewModel : ViewModel() {
|
||||||
|
var isNormalMode by mutableStateOf(true) // else ImageSearch mode
|
||||||
|
var isAdvancedMode by mutableStateOf(false)
|
||||||
|
var mCategory by mutableIntStateOf(Settings.searchCategory)
|
||||||
|
var mSearchMode by mutableIntStateOf(1)
|
||||||
|
var advancedState by mutableStateOf(AdvancedSearchOption())
|
||||||
|
var uss by mutableStateOf(false)
|
||||||
|
var osc by mutableStateOf(false)
|
||||||
|
var path by mutableStateOf("")
|
||||||
|
}
|
||||||
|
|
||||||
class SearchLayout @JvmOverloads constructor(
|
class SearchLayout @JvmOverloads constructor(
|
||||||
context: Context,
|
context: Context,
|
||||||
attrs: AttributeSet? = null,
|
attrs: AttributeSet? = null,
|
||||||
defStyle: Int = 0,
|
defStyle: Int = 0,
|
||||||
) : AbstractComposeView(context, attrs, defStyle) {
|
) : AbstractComposeView(context, attrs, defStyle) {
|
||||||
private var isNormalMode by mutableStateOf(true) // else ImageSearch mode
|
private val vm by lazy {
|
||||||
private var isAdvancedMode by mutableStateOf(false)
|
ViewModelProvider(findViewTreeViewModelStoreOwner()!!).get<SearchViewModel>()
|
||||||
private var mCategory by mutableIntStateOf(Settings.searchCategory)
|
}
|
||||||
private var mSearchMode by mutableIntStateOf(1)
|
|
||||||
private var advancedState by mutableStateOf(AdvancedSearchOption())
|
|
||||||
private var uss by mutableStateOf(false)
|
|
||||||
private var osc by mutableStateOf(false)
|
|
||||||
private var path by mutableStateOf("")
|
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
override fun Content() {
|
override fun Content() {
|
||||||
val coroutineScope = rememberCoroutineScope()
|
val coroutineScope = rememberCoroutineScope()
|
||||||
fun selectImage() = coroutineScope.launch {
|
fun selectImage() = coroutineScope.launch {
|
||||||
context.pickVisualMedia(ActivityResultContracts.PickVisualMedia.ImageOnly)?.let {
|
context.pickVisualMedia(ActivityResultContracts.PickVisualMedia.ImageOnly)?.let {
|
||||||
path = it.toString()
|
vm.path = it.toString()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Mdc3Theme {
|
Mdc3Theme {
|
||||||
Column(modifier = Modifier.padding(horizontal = dimensionResource(id = R.dimen.search_layout_margin_h)).imePadding().verticalScroll(rememberScrollState())) {
|
Column(modifier = Modifier.imePadding().verticalScroll(rememberScrollState()).navigationBarsPadding().padding(horizontal = dimensionResource(id = R.dimen.search_layout_margin_h))) {
|
||||||
AnimatedVisibility(visible = isNormalMode) {
|
AnimatedVisibility(visible = vm.isNormalMode) {
|
||||||
ElevatedCard(modifier = Modifier.fillMaxWidth().padding(vertical = dimensionResource(id = R.dimen.search_layout_margin_v))) {
|
ElevatedCard(modifier = Modifier.fillMaxWidth().padding(vertical = dimensionResource(id = R.dimen.search_layout_margin_v))) {
|
||||||
Column(modifier = Modifier.padding(horizontal = dimensionResource(id = R.dimen.search_category_padding_h), vertical = dimensionResource(id = R.dimen.search_category_padding_v))) {
|
Column(modifier = Modifier.padding(horizontal = dimensionResource(id = R.dimen.search_category_padding_h), vertical = dimensionResource(id = R.dimen.search_category_padding_v))) {
|
||||||
Text(text = stringResource(id = R.string.search_normal), modifier = Modifier.height(dimensionResource(id = R.dimen.search_category_title_height)), fontWeight = FontWeight.Bold, style = MaterialTheme.typography.titleMedium)
|
Text(text = stringResource(id = R.string.search_normal), modifier = Modifier.height(dimensionResource(id = R.dimen.search_category_title_height)), fontWeight = FontWeight.Bold, style = MaterialTheme.typography.titleMedium)
|
||||||
NormalSearch(
|
NormalSearch(
|
||||||
category = mCategory,
|
category = vm.mCategory,
|
||||||
onCategoryChanged = {
|
onCategoryChanged = {
|
||||||
Settings.searchCategory = it
|
Settings.searchCategory = it
|
||||||
mCategory = it
|
vm.mCategory = it
|
||||||
},
|
},
|
||||||
searchMode = mSearchMode,
|
searchMode = vm.mSearchMode,
|
||||||
onSearchModeChanged = { mSearchMode = it },
|
onSearchModeChanged = { vm.mSearchMode = it },
|
||||||
isAdvanced = isAdvancedMode,
|
isAdvanced = vm.isAdvancedMode,
|
||||||
onAdvancedChanged = { isAdvancedMode = it },
|
onAdvancedChanged = { vm.isAdvancedMode = it },
|
||||||
showInfo = { BaseDialogBuilder(context).setMessage(R.string.search_tip).show() },
|
showInfo = { BaseDialogBuilder(context).setMessage(R.string.search_tip).show() },
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
AnimatedVisibility(visible = isNormalMode && isAdvancedMode) {
|
AnimatedVisibility(visible = vm.isNormalMode && vm.isAdvancedMode) {
|
||||||
ElevatedCard(modifier = Modifier.fillMaxWidth().padding(vertical = dimensionResource(id = R.dimen.search_layout_margin_v))) {
|
ElevatedCard(modifier = Modifier.fillMaxWidth().padding(vertical = dimensionResource(id = R.dimen.search_layout_margin_v))) {
|
||||||
Column(modifier = Modifier.padding(horizontal = dimensionResource(id = R.dimen.search_category_padding_h), vertical = dimensionResource(id = R.dimen.search_category_padding_v))) {
|
Column(modifier = Modifier.padding(horizontal = dimensionResource(id = R.dimen.search_category_padding_h), vertical = dimensionResource(id = R.dimen.search_category_padding_v))) {
|
||||||
Text(text = stringResource(id = R.string.search_advance), modifier = Modifier.height(dimensionResource(id = R.dimen.search_category_title_height)), fontWeight = FontWeight.Bold, style = MaterialTheme.typography.titleMedium)
|
Text(text = stringResource(id = R.string.search_advance), modifier = Modifier.height(dimensionResource(id = R.dimen.search_category_title_height)), fontWeight = FontWeight.Bold, style = MaterialTheme.typography.titleMedium)
|
||||||
SearchAdvanced(
|
SearchAdvanced(
|
||||||
state = advancedState,
|
state = vm.advancedState,
|
||||||
onStateChanged = { advancedState = it },
|
onStateChanged = { vm.advancedState = it },
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
AnimatedVisibility(visible = !isNormalMode) {
|
AnimatedVisibility(visible = !vm.isNormalMode) {
|
||||||
ElevatedCard(modifier = Modifier.fillMaxWidth().padding(vertical = dimensionResource(id = R.dimen.search_layout_margin_v))) {
|
ElevatedCard(modifier = Modifier.fillMaxWidth().padding(vertical = dimensionResource(id = R.dimen.search_layout_margin_v))) {
|
||||||
Column(modifier = Modifier.padding(horizontal = dimensionResource(id = R.dimen.search_category_padding_h), vertical = dimensionResource(id = R.dimen.search_category_padding_v))) {
|
Column(modifier = Modifier.padding(horizontal = dimensionResource(id = R.dimen.search_category_padding_h), vertical = dimensionResource(id = R.dimen.search_category_padding_v))) {
|
||||||
Text(text = stringResource(id = R.string.search_image), modifier = Modifier.height(dimensionResource(id = R.dimen.search_category_title_height)), fontWeight = FontWeight.Bold, style = MaterialTheme.typography.titleMedium)
|
Text(text = stringResource(id = R.string.search_image), modifier = Modifier.height(dimensionResource(id = R.dimen.search_category_title_height)), fontWeight = FontWeight.Bold, style = MaterialTheme.typography.titleMedium)
|
||||||
ImageSearch(
|
ImageSearch(
|
||||||
imagePath = path,
|
imagePath = vm.path,
|
||||||
onSelectImage = ::selectImage,
|
onSelectImage = ::selectImage,
|
||||||
uss = uss,
|
uss = vm.uss,
|
||||||
onUssChecked = { uss = it },
|
onUssChecked = { vm.uss = it },
|
||||||
osc = osc,
|
osc = vm.osc,
|
||||||
onOscChecked = { osc = it },
|
onOscChecked = { vm.osc = it },
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
TabRow(
|
TabRow(
|
||||||
selectedTabIndex = if (isNormalMode) 0 else 1,
|
selectedTabIndex = if (vm.isNormalMode) 0 else 1,
|
||||||
divider = {},
|
divider = {},
|
||||||
) {
|
) {
|
||||||
Tab(
|
Tab(
|
||||||
selected = isNormalMode,
|
selected = vm.isNormalMode,
|
||||||
onClick = { isNormalMode = true },
|
onClick = { vm.isNormalMode = true },
|
||||||
text = { Text(text = stringResource(id = R.string.keyword_search)) },
|
text = { Text(text = stringResource(id = R.string.keyword_search)) },
|
||||||
)
|
)
|
||||||
Tab(
|
Tab(
|
||||||
selected = !isNormalMode,
|
selected = !vm.isNormalMode,
|
||||||
onClick = { isNormalMode = false },
|
onClick = { vm.isNormalMode = false },
|
||||||
text = { Text(text = stringResource(id = R.string.search_image)) },
|
text = { Text(text = stringResource(id = R.string.search_image)) },
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
Spacer(modifier = Modifier.height(WindowInsets.systemBars.asPaddingValues().calculateBottomPadding()))
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fun setSearchMyTags(isMyTags: Boolean) {
|
fun setSearchMyTags(isMyTags: Boolean) {
|
||||||
if (isMyTags) mSearchMode = 2
|
if (isMyTags) vm.mSearchMode = 2
|
||||||
}
|
}
|
||||||
|
|
||||||
fun setCategory(category: Int) {
|
fun setCategory(category: Int) {
|
||||||
mCategory = category
|
vm.mCategory = category
|
||||||
}
|
}
|
||||||
|
|
||||||
fun formatListUrlBuilder(urlBuilder: ListUrlBuilder, query: String?) {
|
fun formatListUrlBuilder(urlBuilder: ListUrlBuilder, query: String?) {
|
||||||
urlBuilder.reset()
|
urlBuilder.reset()
|
||||||
when (isNormalMode) {
|
when (vm.isNormalMode) {
|
||||||
true -> {
|
true -> {
|
||||||
when (mSearchMode) {
|
when (vm.mSearchMode) {
|
||||||
1 -> urlBuilder.mode = ListUrlBuilder.MODE_NORMAL
|
1 -> urlBuilder.mode = ListUrlBuilder.MODE_NORMAL
|
||||||
2 -> urlBuilder.mode = ListUrlBuilder.MODE_SUBSCRIPTION
|
2 -> urlBuilder.mode = ListUrlBuilder.MODE_SUBSCRIPTION
|
||||||
3 -> urlBuilder.mode = ListUrlBuilder.MODE_UPLOADER
|
3 -> urlBuilder.mode = ListUrlBuilder.MODE_UPLOADER
|
||||||
4 -> urlBuilder.mode = ListUrlBuilder.MODE_TAG
|
4 -> urlBuilder.mode = ListUrlBuilder.MODE_TAG
|
||||||
}
|
}
|
||||||
urlBuilder.keyword = query
|
urlBuilder.keyword = query
|
||||||
urlBuilder.category = mCategory
|
urlBuilder.category = vm.mCategory
|
||||||
if (isAdvancedMode) {
|
if (vm.isAdvancedMode) {
|
||||||
urlBuilder.advanceSearch = advancedState.advanceSearch
|
urlBuilder.advanceSearch = vm.advancedState.advanceSearch
|
||||||
urlBuilder.minRating = advancedState.minRating
|
urlBuilder.minRating = vm.advancedState.minRating
|
||||||
val pageFrom = advancedState.fromPage
|
val pageFrom = vm.advancedState.fromPage
|
||||||
val pageTo = advancedState.toPage
|
val pageTo = vm.advancedState.toPage
|
||||||
if (pageTo != -1 && pageTo < 10) {
|
if (pageTo != -1 && pageTo < 10) {
|
||||||
throw EhException(context.getString(R.string.search_sp_err1))
|
throw EhException(context.getString(R.string.search_sp_err1))
|
||||||
} else if (pageFrom != -1 && pageTo != -1 && pageTo - pageFrom < 20) {
|
} else if (pageFrom != -1 && pageTo != -1 && pageTo - pageFrom < 20) {
|
||||||
@@ -175,15 +181,15 @@ class SearchLayout @JvmOverloads constructor(
|
|||||||
|
|
||||||
false -> {
|
false -> {
|
||||||
urlBuilder.mode = ListUrlBuilder.MODE_IMAGE_SEARCH
|
urlBuilder.mode = ListUrlBuilder.MODE_IMAGE_SEARCH
|
||||||
if (path.isBlank()) throw EhException(context.getString(R.string.select_image_first))
|
if (vm.path.isBlank()) throw EhException(context.getString(R.string.select_image_first))
|
||||||
val uri = Uri.parse(path)
|
val uri = Uri.parse(vm.path)
|
||||||
val src = UniFile.fromUri(context, uri)?.imageSource ?: return
|
val src = UniFile.fromUri(context, uri)?.imageSource ?: return
|
||||||
val temp = AppConfig.createTempFile() ?: return
|
val temp = AppConfig.createTempFile() ?: return
|
||||||
val bitmap = ImageDecoder.decodeBitmap(src, Image.imageSearchDecoderSampleListener)
|
val bitmap = ImageDecoder.decodeBitmap(src, Image.imageSearchDecoderSampleListener)
|
||||||
temp.outputStream().use { bitmap.compress(Bitmap.CompressFormat.JPEG, 90, it) }
|
temp.outputStream().use { bitmap.compress(Bitmap.CompressFormat.JPEG, 90, it) }
|
||||||
urlBuilder.imagePath = temp.path
|
urlBuilder.imagePath = temp.path
|
||||||
urlBuilder.isUseSimilarityScan = uss
|
urlBuilder.isUseSimilarityScan = vm.uss
|
||||||
urlBuilder.isOnlySearchCovers = osc
|
urlBuilder.isOnlySearchCovers = vm.osc
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -257,7 +257,7 @@ fun CookieSignInScene(windowSizeClass: WindowSizeClass) {
|
|||||||
when (windowSizeClass.widthSizeClass) {
|
when (windowSizeClass.widthSizeClass) {
|
||||||
WindowWidthSizeClass.Compact, WindowWidthSizeClass.Medium -> {
|
WindowWidthSizeClass.Compact, WindowWidthSizeClass.Medium -> {
|
||||||
Column(
|
Column(
|
||||||
modifier = Modifier.padding(dimensionResource(id = R.dimen.keyline_margin)).padding(padding).fillMaxSize().verticalScroll(rememberScrollState()),
|
modifier = Modifier.fillMaxSize().verticalScroll(rememberScrollState()).padding(padding).padding(dimensionResource(id = R.dimen.keyline_margin)),
|
||||||
horizontalAlignment = Alignment.CenterHorizontally,
|
horizontalAlignment = Alignment.CenterHorizontally,
|
||||||
) {
|
) {
|
||||||
Icon(
|
Icon(
|
||||||
@@ -284,7 +284,7 @@ fun CookieSignInScene(windowSizeClass: WindowSizeClass) {
|
|||||||
}
|
}
|
||||||
WindowWidthSizeClass.Expanded -> {
|
WindowWidthSizeClass.Expanded -> {
|
||||||
Row(
|
Row(
|
||||||
modifier = Modifier.padding(dimensionResource(id = R.dimen.keyline_margin)).padding(padding).verticalScroll(rememberScrollState()),
|
modifier = Modifier.fillMaxSize().verticalScroll(rememberScrollState()).padding(padding).padding(dimensionResource(id = R.dimen.keyline_margin)),
|
||||||
verticalAlignment = Alignment.CenterVertically,
|
verticalAlignment = Alignment.CenterVertically,
|
||||||
) {
|
) {
|
||||||
Column(
|
Column(
|
||||||
|
|||||||
@@ -5,12 +5,10 @@ import androidx.activity.compose.BackHandler
|
|||||||
import androidx.compose.foundation.layout.Box
|
import androidx.compose.foundation.layout.Box
|
||||||
import androidx.compose.foundation.layout.Column
|
import androidx.compose.foundation.layout.Column
|
||||||
import androidx.compose.foundation.layout.Spacer
|
import androidx.compose.foundation.layout.Spacer
|
||||||
import androidx.compose.foundation.layout.WindowInsets
|
|
||||||
import androidx.compose.foundation.layout.asPaddingValues
|
|
||||||
import androidx.compose.foundation.layout.fillMaxSize
|
import androidx.compose.foundation.layout.fillMaxSize
|
||||||
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.systemBars
|
import androidx.compose.foundation.layout.systemBarsPadding
|
||||||
import androidx.compose.material3.Button
|
import androidx.compose.material3.Button
|
||||||
import androidx.compose.material3.MaterialTheme
|
import androidx.compose.material3.MaterialTheme
|
||||||
import androidx.compose.material3.SegmentedButton
|
import androidx.compose.material3.SegmentedButton
|
||||||
@@ -45,7 +43,7 @@ fun SelectSiteScreen() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Column(
|
Column(
|
||||||
modifier = Modifier.padding(WindowInsets.systemBars.asPaddingValues()).padding(horizontal = dimensionResource(R.dimen.keyline_margin)).padding(top = dimensionResource(R.dimen.keyline_margin)).fillMaxSize(),
|
modifier = Modifier.systemBarsPadding().padding(horizontal = dimensionResource(R.dimen.keyline_margin)).padding(top = dimensionResource(R.dimen.keyline_margin)).fillMaxSize(),
|
||||||
horizontalAlignment = Alignment.CenterHorizontally,
|
horizontalAlignment = Alignment.CenterHorizontally,
|
||||||
) {
|
) {
|
||||||
Text(
|
Text(
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ import androidx.compose.foundation.layout.fillMaxSize
|
|||||||
import androidx.compose.foundation.layout.fillMaxWidth
|
import androidx.compose.foundation.layout.fillMaxWidth
|
||||||
import androidx.compose.foundation.layout.height
|
import androidx.compose.foundation.layout.height
|
||||||
import androidx.compose.foundation.layout.padding
|
import androidx.compose.foundation.layout.padding
|
||||||
|
import androidx.compose.foundation.layout.systemBarsPadding
|
||||||
import androidx.compose.foundation.layout.width
|
import androidx.compose.foundation.layout.width
|
||||||
import androidx.compose.foundation.layout.widthIn
|
import androidx.compose.foundation.layout.widthIn
|
||||||
import androidx.compose.foundation.rememberScrollState
|
import androidx.compose.foundation.rememberScrollState
|
||||||
@@ -181,7 +182,7 @@ fun SignInScreen(windowSizeClass: WindowSizeClass) {
|
|||||||
when (windowSizeClass.widthSizeClass) {
|
when (windowSizeClass.widthSizeClass) {
|
||||||
WindowWidthSizeClass.Compact, WindowWidthSizeClass.Medium -> {
|
WindowWidthSizeClass.Compact, WindowWidthSizeClass.Medium -> {
|
||||||
Column(
|
Column(
|
||||||
modifier = Modifier.padding(dimensionResource(id = R.dimen.keyline_margin)).fillMaxSize().verticalScroll(rememberScrollState()),
|
modifier = Modifier.fillMaxSize().verticalScroll(rememberScrollState()).systemBarsPadding().padding(dimensionResource(id = R.dimen.keyline_margin)),
|
||||||
horizontalAlignment = Alignment.CenterHorizontally,
|
horizontalAlignment = Alignment.CenterHorizontally,
|
||||||
) {
|
) {
|
||||||
Image(
|
Image(
|
||||||
@@ -266,7 +267,7 @@ fun SignInScreen(windowSizeClass: WindowSizeClass) {
|
|||||||
}
|
}
|
||||||
WindowWidthSizeClass.Expanded -> {
|
WindowWidthSizeClass.Expanded -> {
|
||||||
Row(
|
Row(
|
||||||
modifier = Modifier.padding(dimensionResource(id = R.dimen.keyline_margin)).fillMaxSize().verticalScroll(rememberScrollState()),
|
modifier = Modifier.fillMaxSize().verticalScroll(rememberScrollState()).systemBarsPadding().padding(dimensionResource(id = R.dimen.keyline_margin)),
|
||||||
verticalAlignment = Alignment.CenterVertically,
|
verticalAlignment = Alignment.CenterVertically,
|
||||||
) {
|
) {
|
||||||
Column(
|
Column(
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ object AdvanceTable {
|
|||||||
|
|
||||||
data class AdvancedSearchOption(
|
data class AdvancedSearchOption(
|
||||||
val advanceSearch: Int = 0,
|
val advanceSearch: Int = 0,
|
||||||
val minRating: Int = 0,
|
val minRating: Int = -1,
|
||||||
val fromPage: Int = -1,
|
val fromPage: Int = -1,
|
||||||
val toPage: Int = -1,
|
val toPage: Int = -1,
|
||||||
)
|
)
|
||||||
@@ -59,7 +59,7 @@ fun SearchAdvanced(
|
|||||||
OutlinedTextField(
|
OutlinedTextField(
|
||||||
modifier = Modifier.menuAnchor(),
|
modifier = Modifier.menuAnchor(),
|
||||||
readOnly = true,
|
readOnly = true,
|
||||||
value = minRatingItems[state.minRating],
|
value = minRatingItems[if (state.minRating in 2..5) state.minRating - 1 else 0],
|
||||||
onValueChange = {},
|
onValueChange = {},
|
||||||
label = { Text(stringResource(id = R.string.search_sr)) },
|
label = { Text(stringResource(id = R.string.search_sr)) },
|
||||||
trailingIcon = { ExposedDropdownMenuDefaults.TrailingIcon(expanded = expanded) },
|
trailingIcon = { ExposedDropdownMenuDefaults.TrailingIcon(expanded = expanded) },
|
||||||
@@ -77,7 +77,8 @@ fun SearchAdvanced(
|
|||||||
text = { Text(selectionOption) },
|
text = { Text(selectionOption) },
|
||||||
onClick = {
|
onClick = {
|
||||||
expanded = false
|
expanded = false
|
||||||
onStateChanged(state.copy(minRating = minRatingItems.indexOf(selectionOption)))
|
val index = minRatingItems.indexOf(selectionOption)
|
||||||
|
onStateChanged(state.copy(minRating = if (index > 0) index + 1 else -1))
|
||||||
},
|
},
|
||||||
contentPadding = ExposedDropdownMenuDefaults.ItemContentPadding,
|
contentPadding = ExposedDropdownMenuDefaults.ItemContentPadding,
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -156,7 +156,10 @@ abstract class BaseScene : Fragment() {
|
|||||||
}
|
}
|
||||||
hideSoftInput()
|
hideSoftInput()
|
||||||
createDrawerView(savedInstanceState)?.let {
|
createDrawerView(savedInstanceState)?.let {
|
||||||
sideSheetDialog = SideSheetDialog(requireContext()).apply {
|
sideSheetDialog = object : SideSheetDialog(requireContext()) {
|
||||||
|
// Dirty workaround
|
||||||
|
override fun cancel() = hide()
|
||||||
|
}.apply {
|
||||||
window?.decorView?.apply {
|
window?.decorView?.apply {
|
||||||
val owner = viewLifecycleOwner
|
val owner = viewLifecycleOwner
|
||||||
setViewTreeLifecycleOwner(owner)
|
setViewTreeLifecycleOwner(owner)
|
||||||
|
|||||||
@@ -333,7 +333,7 @@ class FavoritesScene : SearchBarScene() {
|
|||||||
drawable.setBounds(0, 0, drawable.intrinsicWidth, drawable.intrinsicHeight)
|
drawable.setBounds(0, 0, drawable.intrinsicWidth, drawable.intrinsicHeight)
|
||||||
binding.tip.setCompoundDrawables(null, drawable, null, null)
|
binding.tip.setCompoundDrawables(null, drawable, null, null)
|
||||||
binding.tip.setOnClickListener { mAdapter?.refresh() }
|
binding.tip.setOnClickListener { mAdapter?.refresh() }
|
||||||
binding.refreshLayout.setOnRefreshListener { mAdapter?.refresh() }
|
binding.refreshLayout.setOnRefreshListener { switchFav(urlBuilder.favCat) }
|
||||||
val transition = ViewTransition(binding.refreshLayout, binding.progress, binding.tip)
|
val transition = ViewTransition(binding.refreshLayout, binding.progress, binding.tip)
|
||||||
val empty = getString(R.string.gallery_list_empty_hit)
|
val empty = getString(R.string.gallery_list_empty_hit)
|
||||||
viewLifecycleOwner.lifecycleScope.launch {
|
viewLifecycleOwner.lifecycleScope.launch {
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ import android.view.ViewGroup
|
|||||||
import android.view.ViewPropertyAnimator
|
import android.view.ViewPropertyAnimator
|
||||||
import android.widget.TextView
|
import android.widget.TextView
|
||||||
import androidx.activity.OnBackPressedCallback
|
import androidx.activity.OnBackPressedCallback
|
||||||
|
import androidx.compose.foundation.layout.consumeWindowInsets
|
||||||
import androidx.compose.material3.Text
|
import androidx.compose.material3.Text
|
||||||
import androidx.compose.ui.platform.ComposeView
|
import androidx.compose.ui.platform.ComposeView
|
||||||
import androidx.compose.ui.res.stringResource
|
import androidx.compose.ui.res.stringResource
|
||||||
@@ -39,6 +40,7 @@ import androidx.drawerlayout.widget.DrawerLayout
|
|||||||
import androidx.fragment.app.viewModels
|
import androidx.fragment.app.viewModels
|
||||||
import androidx.lifecycle.ViewModel
|
import androidx.lifecycle.ViewModel
|
||||||
import androidx.lifecycle.lifecycleScope
|
import androidx.lifecycle.lifecycleScope
|
||||||
|
import androidx.lifecycle.setViewTreeViewModelStoreOwner
|
||||||
import androidx.lifecycle.viewModelScope
|
import androidx.lifecycle.viewModelScope
|
||||||
import androidx.paging.LoadState
|
import androidx.paging.LoadState
|
||||||
import androidx.paging.Pager
|
import androidx.paging.Pager
|
||||||
@@ -284,7 +286,7 @@ class GalleryListScene : SearchBarScene() {
|
|||||||
setSearchBarHint(title)
|
setSearchBarHint(title)
|
||||||
|
|
||||||
when (mode) {
|
when (mode) {
|
||||||
MODE_NORMAL -> if (category != EhUtils.NONE || !keyword.isNullOrEmpty()) {
|
MODE_NORMAL, MODE_SUBSCRIPTION -> if (category != EhUtils.NONE || !keyword.isNullOrEmpty()) {
|
||||||
mainActivity?.clearNavCheckedItem()
|
mainActivity?.clearNavCheckedItem()
|
||||||
}
|
}
|
||||||
MODE_TAG, MODE_UPLOADER, MODE_IMAGE_SEARCH -> mainActivity?.clearNavCheckedItem()
|
MODE_TAG, MODE_UPLOADER, MODE_IMAGE_SEARCH -> mainActivity?.clearNavCheckedItem()
|
||||||
@@ -331,6 +333,8 @@ class GalleryListScene : SearchBarScene() {
|
|||||||
),
|
),
|
||||||
)
|
)
|
||||||
mViewTransition = BringOutTransition(binding.contentLayout.contentView, binding.searchLayout)
|
mViewTransition = BringOutTransition(binding.contentLayout.contentView, binding.searchLayout)
|
||||||
|
binding.searchLayout.consumeWindowInsets = false
|
||||||
|
binding.searchLayout.setViewTreeViewModelStoreOwner(this)
|
||||||
binding.fastScroller.setOnDragHandlerListener(object : OnDragHandlerListener {
|
binding.fastScroller.setOnDragHandlerListener(object : OnDragHandlerListener {
|
||||||
override fun onStartDragHandler() {}
|
override fun onStartDragHandler() {}
|
||||||
override fun onEndDragHandler() {
|
override fun onEndDragHandler() {
|
||||||
@@ -360,7 +364,11 @@ class GalleryListScene : SearchBarScene() {
|
|||||||
drawable.setBounds(0, 0, drawable.intrinsicWidth, drawable.intrinsicHeight)
|
drawable.setBounds(0, 0, drawable.intrinsicWidth, drawable.intrinsicHeight)
|
||||||
binding.tip.setCompoundDrawables(null, drawable, null, null)
|
binding.tip.setCompoundDrawables(null, drawable, null, null)
|
||||||
binding.tip.setOnClickListener { mAdapter?.refresh() }
|
binding.tip.setOnClickListener { mAdapter?.refresh() }
|
||||||
binding.refreshLayout.setOnRefreshListener { mAdapter?.refresh() }
|
binding.refreshLayout.setOnRefreshListener {
|
||||||
|
mUrlBuilder.setIndex(null, true)
|
||||||
|
mUrlBuilder.mJumpTo = null
|
||||||
|
mAdapter?.refresh()
|
||||||
|
}
|
||||||
val transition = ViewTransition(binding.refreshLayout, binding.progress, binding.tip)
|
val transition = ViewTransition(binding.refreshLayout, binding.progress, binding.tip)
|
||||||
val empty = getString(R.string.gallery_list_empty_hit)
|
val empty = getString(R.string.gallery_list_empty_hit)
|
||||||
launch {
|
launch {
|
||||||
@@ -509,14 +517,15 @@ class GalleryListScene : SearchBarScene() {
|
|||||||
tip: TextView,
|
tip: TextView,
|
||||||
) {
|
) {
|
||||||
val context = context ?: return
|
val context = context ?: return
|
||||||
|
if (mAdapter!!.itemCount == 0) return
|
||||||
|
|
||||||
// Can't add image search as quick search
|
// Can't add image search as quick search
|
||||||
if (MODE_IMAGE_SEARCH == mUrlBuilder.mode) {
|
if (MODE_IMAGE_SEARCH == mUrlBuilder.mode) {
|
||||||
showTip(R.string.image_search_not_quick_search, LENGTH_LONG)
|
showTip(R.string.image_search_not_quick_search, LENGTH_LONG)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
val gi = mAdapter?.peek(binding.recyclerView.layoutManager!!.firstVisibleItemPosition)
|
val gi = mAdapter!!.peek(binding.recyclerView.layoutManager!!.firstVisibleItemPosition)!!
|
||||||
val next = gi?.gid?.plus(1)
|
val next = gi.gid + 1
|
||||||
|
|
||||||
// Check duplicate
|
// Check duplicate
|
||||||
for (q in mQuickSearchList) {
|
for (q in mQuickSearchList) {
|
||||||
@@ -551,7 +560,7 @@ class GalleryListScene : SearchBarScene() {
|
|||||||
}
|
}
|
||||||
return@launchIO
|
return@launchIO
|
||||||
}
|
}
|
||||||
if (checked[0] && next != null) {
|
if (checked[0]) {
|
||||||
text += "@$next"
|
text += "@$next"
|
||||||
Settings.qSSaveProgress = true
|
Settings.qSSaveProgress = true
|
||||||
} else {
|
} else {
|
||||||
@@ -614,20 +623,22 @@ class GalleryListScene : SearchBarScene() {
|
|||||||
drawerBinding.toolbar.setTitle(R.string.toplist)
|
drawerBinding.toolbar.setTitle(R.string.toplist)
|
||||||
} else {
|
} else {
|
||||||
drawerBinding.toolbar.setTitle(R.string.quick_search)
|
drawerBinding.toolbar.setTitle(R.string.quick_search)
|
||||||
}
|
if (mUrlBuilder.mode != MODE_WHATS_HOT) {
|
||||||
if (!mIsTopList) drawerBinding.toolbar.inflateMenu(R.menu.drawer_gallery_list)
|
drawerBinding.toolbar.inflateMenu(R.menu.drawer_gallery_list)
|
||||||
drawerBinding.toolbar.setOnMenuItemClickListener { item: MenuItem ->
|
drawerBinding.toolbar.setOnMenuItemClickListener { item: MenuItem ->
|
||||||
val id = item.itemId
|
val id = item.itemId
|
||||||
if (id == R.id.action_add) {
|
if (id == R.id.action_add) {
|
||||||
showAddQuickSearchDialog(
|
showAddQuickSearchDialog(
|
||||||
qsDrawerAdapter,
|
qsDrawerAdapter,
|
||||||
drawerBinding.recyclerViewDrawer,
|
drawerBinding.recyclerViewDrawer,
|
||||||
drawerBinding.tip,
|
drawerBinding.tip,
|
||||||
)
|
)
|
||||||
} else if (id == R.id.action_help) {
|
} else if (id == R.id.action_help) {
|
||||||
showQuickSearchTipDialog()
|
showQuickSearchTipDialog()
|
||||||
|
}
|
||||||
|
true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
true
|
|
||||||
}
|
}
|
||||||
return drawerBinding.root
|
return drawerBinding.root
|
||||||
}
|
}
|
||||||
@@ -850,13 +861,17 @@ class GalleryListScene : SearchBarScene() {
|
|||||||
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): QsDrawerHolder {
|
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): QsDrawerHolder {
|
||||||
val holder = QsDrawerHolder(ItemDrawerListBinding.inflate(mInflater, parent, false))
|
val holder = QsDrawerHolder(ItemDrawerListBinding.inflate(mInflater, parent, false))
|
||||||
holder.itemView.setOnClickListener {
|
holder.itemView.setOnClickListener {
|
||||||
if (!mIsTopList) {
|
if (mUrlBuilder.mode == MODE_WHATS_HOT) {
|
||||||
val q = mQuickSearchList[holder.bindingAdapterPosition]
|
val q = mQuickSearchList[holder.bindingAdapterPosition]
|
||||||
// Navigate to galleryListScene to clear nav checked item
|
|
||||||
navAnimated(R.id.galleryListScene, ListUrlBuilder().apply { set(q) }.toStartArgs())
|
navAnimated(R.id.galleryListScene, ListUrlBuilder().apply { set(q) }.toStartArgs())
|
||||||
} else {
|
} else {
|
||||||
mUrlBuilder.keyword = keywords[holder.bindingAdapterPosition].toString()
|
if (mIsTopList) {
|
||||||
mUrlBuilder.mJumpTo = null
|
mUrlBuilder.keyword = keywords[holder.bindingAdapterPosition].toString()
|
||||||
|
mUrlBuilder.mJumpTo = null
|
||||||
|
} else {
|
||||||
|
val q = mQuickSearchList[holder.bindingAdapterPosition]
|
||||||
|
mUrlBuilder.set(q)
|
||||||
|
}
|
||||||
onUpdateUrlBuilder()
|
onUpdateUrlBuilder()
|
||||||
mAdapter?.refresh()
|
mAdapter?.refresh()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ import androidx.annotation.CallSuper
|
|||||||
import androidx.compose.foundation.clickable
|
import androidx.compose.foundation.clickable
|
||||||
import androidx.compose.foundation.layout.WindowInsets
|
import androidx.compose.foundation.layout.WindowInsets
|
||||||
import androidx.compose.foundation.layout.asPaddingValues
|
import androidx.compose.foundation.layout.asPaddingValues
|
||||||
|
import androidx.compose.foundation.layout.consumeWindowInsets
|
||||||
import androidx.compose.foundation.layout.navigationBars
|
import androidx.compose.foundation.layout.navigationBars
|
||||||
import androidx.compose.foundation.lazy.LazyColumn
|
import androidx.compose.foundation.lazy.LazyColumn
|
||||||
import androidx.compose.foundation.lazy.items
|
import androidx.compose.foundation.lazy.items
|
||||||
@@ -82,6 +83,7 @@ abstract class SearchBarScene : BaseScene(), ToolBarScene {
|
|||||||
onApplySearch()
|
onApplySearch()
|
||||||
true
|
true
|
||||||
}
|
}
|
||||||
|
binding.searchBarList.consumeWindowInsets = false
|
||||||
binding.searchBarList.setMD3Content {
|
binding.searchBarList.setMD3Content {
|
||||||
LazyColumn(contentPadding = WindowInsets.navigationBars.asPaddingValues()) {
|
LazyColumn(contentPadding = WindowInsets.navigationBars.asPaddingValues()) {
|
||||||
items(mSuggestionList) {
|
items(mSuggestionList) {
|
||||||
@@ -140,6 +142,7 @@ abstract class SearchBarScene : BaseScene(), ToolBarScene {
|
|||||||
override fun onDestroyView() {
|
override fun onDestroyView() {
|
||||||
super.onDestroyView()
|
super.onDestroyView()
|
||||||
mSearchViewOnBackPressedCallback.remove()
|
mSearchViewOnBackPressedCallback.remove()
|
||||||
|
binding.root.removeAllViews()
|
||||||
_binding = null
|
_binding = null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ import androidx.compose.foundation.layout.Column
|
|||||||
import androidx.compose.foundation.layout.Spacer
|
import androidx.compose.foundation.layout.Spacer
|
||||||
import androidx.compose.foundation.layout.height
|
import androidx.compose.foundation.layout.height
|
||||||
import androidx.compose.foundation.layout.padding
|
import androidx.compose.foundation.layout.padding
|
||||||
import androidx.compose.foundation.layout.size
|
|
||||||
import androidx.compose.foundation.rememberScrollState
|
import androidx.compose.foundation.rememberScrollState
|
||||||
import androidx.compose.foundation.verticalScroll
|
import androidx.compose.foundation.verticalScroll
|
||||||
import androidx.compose.material.icons.Icons
|
import androidx.compose.material.icons.Icons
|
||||||
@@ -84,7 +83,7 @@ fun AboutScreen() {
|
|||||||
},
|
},
|
||||||
snackbarHost = { SnackbarHost(snackbarHostState) },
|
snackbarHost = { SnackbarHost(snackbarHostState) },
|
||||||
) { paddingValues ->
|
) { paddingValues ->
|
||||||
Column(modifier = Modifier.padding(top = paddingValues.calculateTopPadding()).nestedScroll(scrollBehavior.nestedScrollConnection).verticalScroll(rememberScrollState())) {
|
Column(modifier = Modifier.nestedScroll(scrollBehavior.nestedScrollConnection).verticalScroll(rememberScrollState()).padding(paddingValues)) {
|
||||||
Preference(
|
Preference(
|
||||||
title = stringResource(id = R.string.settings_about_declaration),
|
title = stringResource(id = R.string.settings_about_declaration),
|
||||||
summary = stringResource(id = R.string.settings_about_declaration_summary),
|
summary = stringResource(id = R.string.settings_about_declaration_summary),
|
||||||
@@ -127,7 +126,6 @@ fun AboutScreen() {
|
|||||||
launchSnackBar(ExceptionUtils.getReadableString(it))
|
launchSnackBar(ExceptionUtils.getReadableString(it))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Spacer(modifier = Modifier.size(paddingValues.calculateBottomPadding()))
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,9 +7,7 @@ import android.provider.Settings.ACTION_APPLICATION_DETAILS_SETTINGS
|
|||||||
import android.provider.Settings.ACTION_APP_OPEN_BY_DEFAULT_SETTINGS
|
import android.provider.Settings.ACTION_APP_OPEN_BY_DEFAULT_SETTINGS
|
||||||
import androidx.activity.result.contract.ActivityResultContracts
|
import androidx.activity.result.contract.ActivityResultContracts
|
||||||
import androidx.compose.foundation.layout.Column
|
import androidx.compose.foundation.layout.Column
|
||||||
import androidx.compose.foundation.layout.Spacer
|
|
||||||
import androidx.compose.foundation.layout.padding
|
import androidx.compose.foundation.layout.padding
|
||||||
import androidx.compose.foundation.layout.size
|
|
||||||
import androidx.compose.foundation.rememberScrollState
|
import androidx.compose.foundation.rememberScrollState
|
||||||
import androidx.compose.foundation.verticalScroll
|
import androidx.compose.foundation.verticalScroll
|
||||||
import androidx.compose.material.icons.Icons
|
import androidx.compose.material.icons.Icons
|
||||||
@@ -70,7 +68,7 @@ fun AdvancedScreen() {
|
|||||||
},
|
},
|
||||||
snackbarHost = { SnackbarHost(snackbarHostState) },
|
snackbarHost = { SnackbarHost(snackbarHostState) },
|
||||||
) { paddingValues ->
|
) { paddingValues ->
|
||||||
Column(modifier = Modifier.padding(top = paddingValues.calculateTopPadding()).nestedScroll(scrollBehavior.nestedScrollConnection).verticalScroll(rememberScrollState())) {
|
Column(modifier = Modifier.nestedScroll(scrollBehavior.nestedScrollConnection).verticalScroll(rememberScrollState()).padding(paddingValues)) {
|
||||||
SwitchPreference(
|
SwitchPreference(
|
||||||
title = stringResource(id = R.string.settings_advanced_save_parse_error_body),
|
title = stringResource(id = R.string.settings_advanced_save_parse_error_body),
|
||||||
summary = stringResource(id = R.string.settings_advanced_save_parse_error_body_summary),
|
summary = stringResource(id = R.string.settings_advanced_save_parse_error_body_summary),
|
||||||
@@ -225,7 +223,6 @@ fun AdvancedScreen() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Spacer(modifier = Modifier.size(paddingValues.calculateBottomPadding()))
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -5,9 +5,7 @@ import android.content.Intent.FLAG_GRANT_WRITE_URI_PERMISSION
|
|||||||
import androidx.activity.compose.rememberLauncherForActivityResult
|
import androidx.activity.compose.rememberLauncherForActivityResult
|
||||||
import androidx.activity.result.contract.ActivityResultContracts
|
import androidx.activity.result.contract.ActivityResultContracts
|
||||||
import androidx.compose.foundation.layout.Column
|
import androidx.compose.foundation.layout.Column
|
||||||
import androidx.compose.foundation.layout.Spacer
|
|
||||||
import androidx.compose.foundation.layout.padding
|
import androidx.compose.foundation.layout.padding
|
||||||
import androidx.compose.foundation.layout.size
|
|
||||||
import androidx.compose.foundation.rememberScrollState
|
import androidx.compose.foundation.rememberScrollState
|
||||||
import androidx.compose.foundation.verticalScroll
|
import androidx.compose.foundation.verticalScroll
|
||||||
import androidx.compose.material.icons.Icons
|
import androidx.compose.material.icons.Icons
|
||||||
@@ -74,7 +72,7 @@ fun DownloadScreen() {
|
|||||||
},
|
},
|
||||||
snackbarHost = { SnackbarHost(snackbarHostState) },
|
snackbarHost = { SnackbarHost(snackbarHostState) },
|
||||||
) { paddingValues ->
|
) { paddingValues ->
|
||||||
Column(modifier = Modifier.padding(top = paddingValues.calculateTopPadding()).nestedScroll(scrollBehavior.nestedScrollConnection).verticalScroll(rememberScrollState())) {
|
Column(modifier = Modifier.nestedScroll(scrollBehavior.nestedScrollConnection).verticalScroll(rememberScrollState()).padding(paddingValues)) {
|
||||||
var downloadLocationState by ::downloadLocation.observed
|
var downloadLocationState by ::downloadLocation.observed
|
||||||
val cannotGetDownloadLocation = stringResource(id = R.string.settings_download_cant_get_download_location)
|
val cannotGetDownloadLocation = stringResource(id = R.string.settings_download_cant_get_download_location)
|
||||||
val selectDownloadDirLauncher = rememberLauncherForActivityResult(ActivityResultContracts.OpenDocumentTree()) { treeUri ->
|
val selectDownloadDirLauncher = rememberLauncherForActivityResult(ActivityResultContracts.OpenDocumentTree()) { treeUri ->
|
||||||
@@ -232,7 +230,6 @@ fun DownloadScreen() {
|
|||||||
it.printStackTrace()
|
it.printStackTrace()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Spacer(modifier = Modifier.size(paddingValues.calculateBottomPadding()))
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,9 +4,7 @@ import android.content.DialogInterface
|
|||||||
import android.os.Build
|
import android.os.Build
|
||||||
import androidx.compose.animation.AnimatedVisibility
|
import androidx.compose.animation.AnimatedVisibility
|
||||||
import androidx.compose.foundation.layout.Column
|
import androidx.compose.foundation.layout.Column
|
||||||
import androidx.compose.foundation.layout.Spacer
|
|
||||||
import androidx.compose.foundation.layout.padding
|
import androidx.compose.foundation.layout.padding
|
||||||
import androidx.compose.foundation.layout.size
|
|
||||||
import androidx.compose.foundation.rememberScrollState
|
import androidx.compose.foundation.rememberScrollState
|
||||||
import androidx.compose.foundation.verticalScroll
|
import androidx.compose.foundation.verticalScroll
|
||||||
import androidx.compose.material.icons.Icons
|
import androidx.compose.material.icons.Icons
|
||||||
@@ -90,7 +88,7 @@ fun EhScreen() {
|
|||||||
) { paddingValues ->
|
) { paddingValues ->
|
||||||
val touristMode = stringResource(id = R.string.settings_eh_identity_cookies_tourist)
|
val touristMode = stringResource(id = R.string.settings_eh_identity_cookies_tourist)
|
||||||
val copiedToClipboard = stringResource(id = R.string.copied_to_clipboard)
|
val copiedToClipboard = stringResource(id = R.string.copied_to_clipboard)
|
||||||
Column(modifier = Modifier.padding(top = paddingValues.calculateTopPadding()).nestedScroll(scrollBehavior.nestedScrollConnection).verticalScroll(rememberScrollState())) {
|
Column(modifier = Modifier.nestedScroll(scrollBehavior.nestedScrollConnection).verticalScroll(rememberScrollState()).padding(paddingValues)) {
|
||||||
Preference(
|
Preference(
|
||||||
title = stringResource(id = R.string.account_name),
|
title = stringResource(id = R.string.account_name),
|
||||||
summary = Settings.displayName ?: touristMode,
|
summary = Settings.displayName ?: touristMode,
|
||||||
@@ -343,7 +341,6 @@ fun EhScreen() {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Spacer(modifier = Modifier.size(paddingValues.calculateBottomPadding()))
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -38,7 +38,7 @@ fun MyTagsScreen() {
|
|||||||
val state = rememberWebViewState(url = url)
|
val state = rememberWebViewState(url = url)
|
||||||
WebView(
|
WebView(
|
||||||
state = state,
|
state = state,
|
||||||
modifier = Modifier.padding(top = paddingValues.calculateTopPadding()).fillMaxSize(),
|
modifier = Modifier.padding(paddingValues).fillMaxSize(),
|
||||||
onCreated = {
|
onCreated = {
|
||||||
it.setDefaultSettings()
|
it.setDefaultSettings()
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ fun UConfigScreen() {
|
|||||||
val state = rememberWebViewState(url = url)
|
val state = rememberWebViewState(url = url)
|
||||||
WebView(
|
WebView(
|
||||||
state = state,
|
state = state,
|
||||||
modifier = Modifier.padding(top = paddingValues.calculateTopPadding()).fillMaxSize(),
|
modifier = Modifier.padding(paddingValues).fillMaxSize(),
|
||||||
onCreated = {
|
onCreated = {
|
||||||
it.setDefaultSettings()
|
it.setDefaultSettings()
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ fun WebViewScreen(url: String, onNavigateUp: () -> Unit) {
|
|||||||
) { paddingValues ->
|
) { paddingValues ->
|
||||||
WebView(
|
WebView(
|
||||||
state = state,
|
state = state,
|
||||||
modifier = Modifier.padding(top = paddingValues.calculateTopPadding()).fillMaxSize(),
|
modifier = Modifier.padding(paddingValues).fillMaxSize(),
|
||||||
onCreated = { it.setDefaultSettings() },
|
onCreated = { it.setDefaultSettings() },
|
||||||
)
|
)
|
||||||
DisposableEffect(Unit) {
|
DisposableEffect(Unit) {
|
||||||
|
|||||||
@@ -440,7 +440,7 @@
|
|||||||
<string name="settings_about_declaration" translatable="false">EhViewer</string>
|
<string name="settings_about_declaration" translatable="false">EhViewer</string>
|
||||||
<string name="settings_about_declaration_summary">EhViewer is not affiliated with E-Hentai.org in any way</string>
|
<string name="settings_about_declaration_summary">EhViewer is not affiliated with E-Hentai.org in any way</string>
|
||||||
<string name="settings_about_author">Author</string>
|
<string name="settings_about_author">Author</string>
|
||||||
<string name="settings_about_author_summary" translatable="false"><del>Hippo &lt;ehviewersu$gmail.com&gt;</del><br><del>NekoInverter</del><br>飛鳥澪</string>
|
<string name="settings_about_author_summary" translatable="false"><del>Hippo &lt;ehviewersu$gmail.com&gt;</del><br><del>NekoInverter</del><br><del>飛鳥澪</del><br>Foolbar</string>
|
||||||
<string name="settings_about_latest_release">Latest release</string>
|
<string name="settings_about_latest_release">Latest release</string>
|
||||||
<string name="settings_about_source">Source</string>
|
<string name="settings_about_source">Source</string>
|
||||||
<string name="settings_about_version">Build version</string>
|
<string name="settings_about_version">Build version</string>
|
||||||
|
|||||||
@@ -1,2 +0,0 @@
|
|||||||
/target
|
|
||||||
Cargo.lock
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
/target
|
|
||||||
Cargo.lock
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
/target
|
|
||||||
Cargo.lock
|
|
||||||
+4
-7
@@ -1,23 +1,20 @@
|
|||||||
plugins {
|
plugins {
|
||||||
id("com.android.application") version "8.1.1" apply false
|
id("com.android.application") version "8.1.2" apply false
|
||||||
kotlin("android") version "1.9.10" apply false
|
kotlin("android") version "1.9.10" apply false
|
||||||
kotlin("plugin.serialization") version "1.9.10" apply false
|
kotlin("plugin.serialization") version "1.9.10" apply false
|
||||||
id("com.google.devtools.ksp") version "1.9.10-1.0.13" apply false
|
id("com.google.devtools.ksp") version "1.9.10-1.0.13" apply false
|
||||||
id("com.mikepenz.aboutlibraries.plugin") version "10.8.3" apply false
|
id("com.diffplug.spotless") version "6.22.0" apply false
|
||||||
|
id("com.mikepenz.aboutlibraries.plugin") version "10.9.1" apply false
|
||||||
id("org.mozilla.rust-android-gradle.rust-android") version "0.9.3" apply false
|
id("org.mozilla.rust-android-gradle.rust-android") version "0.9.3" apply false
|
||||||
id("dev.shreyaspatil.compose-compiler-report-generator") version "1.1.0" apply false
|
id("dev.shreyaspatil.compose-compiler-report-generator") version "1.1.0" apply false
|
||||||
}
|
}
|
||||||
|
|
||||||
allprojects {
|
|
||||||
apply(from = "$rootDir/ktlint.gradle.kts")
|
|
||||||
}
|
|
||||||
|
|
||||||
tasks.register("Delete", Delete::class) {
|
tasks.register("Delete", Delete::class) {
|
||||||
delete(rootProject.layout.buildDirectory)
|
delete(rootProject.layout.buildDirectory)
|
||||||
}
|
}
|
||||||
|
|
||||||
buildscript {
|
buildscript {
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath("com.android.tools:r8:8.2.20-dev")
|
classpath("com.android.tools:r8:8.3.6-dev")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,103 +0,0 @@
|
|||||||
<p align="right">
|
|
||||||
<strong>English</strong>
|
|
||||||
<span> | </span>
|
|
||||||
<a href="https://github.com/Ehviewer-Overhauled/Ehviewer/blob/1.8.x.x/docs/README/zh-cn.md">
|
|
||||||
简体中文
|
|
||||||
</a>
|
|
||||||
<span> | </span>
|
|
||||||
<a href="https://github.com/Ehviewer-Overhauled/Ehviewer/blob/1.8.x.x/docs/README/zh-tw.md">
|
|
||||||
正體中文
|
|
||||||
</a>
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<h1 align="center">
|
|
||||||
<img src="https://github.com/Ehviewer-Overhauled/Art/blob/master/launcher_icon-web.svg" width="200">
|
|
||||||
<br>EhViewer<br>
|
|
||||||
</h1>
|
|
||||||
|
|
||||||
<p align="center">
|
|
||||||
<a href="https://github.com/Ehviewer-Overhauled/Ehviewer/actions/workflows/ci.yml">
|
|
||||||
<img src="https://github.com/Ehviewer-Overhauled/Ehviewer/actions/workflows/ci.yml/badge.svg" alt="Github Actions">
|
|
||||||
</a>
|
|
||||||
<a href="https://github.com/Ehviewer-Overhauled/Ehviewer/blob/1.8.x.x/LICENSE">
|
|
||||||
<img src="https://img.shields.io/github/license/Ehviewer-Overhauled/Ehviewer" alt="LICENSE">
|
|
||||||
</a>
|
|
||||||
<a href="https://www.codefactor.io/repository/github/Ehviewer-Overhauled/ehviewer">
|
|
||||||
<img src="https://www.codefactor.io/repository/github/Ehviewer-Overhauled/ehviewer/badge" alt="CodeFactor">
|
|
||||||
</a>
|
|
||||||
<a href="https://github.com/Ehviewer-Overhauled/Ehviewer/releases">
|
|
||||||
<img src="https://img.shields.io/github/v/release/Ehviewer-Overhauled/ehviewer?include_prereleases" alt="Release">
|
|
||||||
</a>
|
|
||||||
<a href="https://github.com/Ehviewer-Overhauled/Ehviewer/issues">
|
|
||||||
<img src="https://img.shields.io/github/issues/Ehviewer-Overhauled/ehviewer" alt="Issues">
|
|
||||||
</a>
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<div align="center">
|
|
||||||
<h3>
|
|
||||||
<a href="https://github.com/Ehviewer-Overhauled/Ehviewer/blob/1.8.x.x/docs/README/en.md#description">
|
|
||||||
Description
|
|
||||||
</a>
|
|
||||||
<span> | </span>
|
|
||||||
<a href="https://github.com/Ehviewer-Overhauled/Ehviewer/blob/1.8.x.x/docs/README/en.md#download">
|
|
||||||
Download
|
|
||||||
</a>
|
|
||||||
<span> | </span>
|
|
||||||
<a href="https://github.com/Ehviewer-Overhauled/Ehviewer/blob/1.8.x.x/docs/README/en.md#screenshot">
|
|
||||||
Screenshot
|
|
||||||
</a>
|
|
||||||
<span> | </span>
|
|
||||||
<a href="https://github.com/Ehviewer-Overhauled/Ehviewer/blob/1.8.x.x/docs/README/en.md#thanks">
|
|
||||||
Thanks
|
|
||||||
</a>
|
|
||||||
<span> | </span>
|
|
||||||
<a href="https://github.com/Ehviewer-Overhauled/Ehviewer/blob/1.8.x.x/docs/README/en.md#license">
|
|
||||||
License
|
|
||||||
</a>
|
|
||||||
</h3>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
# Description
|
|
||||||
|
|
||||||
EhViewer fork dedicated to lightweight and high-performance
|
|
||||||
|
|
||||||
with Material Design 3 and Dynamic Color Support
|
|
||||||
|
|
||||||
# Download
|
|
||||||
|
|
||||||
<a href="https://github.com/Ehviewer-Overhauled/Ehviewer/releases"><img alt="Get it on GitHub" src="https://github.com/Ehviewer-Overhauled/Art/blob/master/get-it-on-github.svg" width="200px"/></a> <a href="https://github.com/Ehviewer-Overhauled/fdroid-repo"><img alt="Get it on F-Droid" src="https://github.com/Ehviewer-Overhauled/Art/blob/master/get-it-on-fdroid.svg" width="200px"/></a>
|
|
||||||
|
|
||||||
# Screenshot
|
|
||||||
|
|
||||||

|
|
||||||

|
|
||||||
|
|
||||||
# Thanks
|
|
||||||
|
|
||||||
Here is the libraries
|
|
||||||
|
|
||||||
- [Arrow](https://arrow-kt.io/)
|
|
||||||
- [AOSP & AndroidX](http://source.android.com/)
|
|
||||||
- [Kotlin & KotlinX](https://kotlinlang.org/)
|
|
||||||
- [FullDraggableDrawer](https://github.com/PureWriter/FullDraggableDrawer)
|
|
||||||
- [MCA](https://github.com/material-components/material-components-android)
|
|
||||||
- [material-design-icons](https://github.com/google/material-design-icons)
|
|
||||||
- [Okhttp](https://square.github.io/okhttp/)
|
|
||||||
- [RikkaX](https://github.com/RikkaApps/RikkaX)
|
|
||||||
- [Libarchive](http://www.libarchive.org/)
|
|
||||||
- [Coil](https://coil-kt.github.io/coil/)
|
|
||||||
- [Jsoup](https://jsoup.org/)
|
|
||||||
|
|
||||||
Specially thanks [Tachiyomi](https://tachiyomi.org/) for its reader implementation!
|
|
||||||
|
|
||||||
# License
|
|
||||||
|
|
||||||
Copyright 2014-2019 Hippo Seven
|
|
||||||
Copyright 2020-2022 NekoInverter
|
|
||||||
Copyright 2022-2023 Tarsin Norbin
|
|
||||||
|
|
||||||
EhViewer is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
|
|
||||||
|
|
||||||
EhViewer is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License along with EhViewer. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
+22
-19
@@ -1,57 +1,57 @@
|
|||||||
<p align="right">
|
<p align="right">
|
||||||
<a href="https://github.com/Ehviewer-Overhauled/Ehviewer/blob/1.8.x.x/docs/README/en.md">
|
<a href="https://github.com/FooIbar/EhViewer/blob/1.8.x.x/README.md">
|
||||||
English
|
English
|
||||||
</a>
|
</a>
|
||||||
<span> | </span>
|
<span> | </span>
|
||||||
<strong>简体中文</strong>
|
<strong>简体中文</strong>
|
||||||
<span> | </span>
|
<span> | </span>
|
||||||
<a href="https://github.com/Ehviewer-Overhauled/Ehviewer/blob/1.8.x.x/docs/README/zh-tw.md">
|
<a href="https://github.com/FooIbar/EhViewer/blob/1.8.x.x/docs/README/zh-tw.md">
|
||||||
正體中文
|
正體中文
|
||||||
</a>
|
</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<h1 align="center">
|
<h1 align="center">
|
||||||
<img src="https://github.com/Ehviewer-Overhauled/Art/blob/master/launcher_icon-web.svg" width="200">
|
<img src="https://github.com/Ehviewer-Overhauled/Art/blob/master/launcher_icon-web.svg" width="200" alt="EhViewer">
|
||||||
<br>EhViewer<br>
|
<br>EhViewer<br>
|
||||||
</h1>
|
</h1>
|
||||||
|
|
||||||
<p align="center">
|
<p align="center">
|
||||||
<a href="https://github.com/Ehviewer-Overhauled/Ehviewer/actions/workflows/ci.yml">
|
<a href="https://github.com/FooIbar/EhViewer/actions/workflows/ci.yml">
|
||||||
<img src="https://github.com/Ehviewer-Overhauled/Ehviewer/actions/workflows/ci.yml/badge.svg" alt="Github Actions">
|
<img src="https://github.com/FooIbar/EhViewer/actions/workflows/ci.yml/badge.svg" alt="Github Actions">
|
||||||
</a>
|
</a>
|
||||||
<a href="https://github.com/Ehviewer-Overhauled/Ehviewer/blob/1.8.x.x/LICENSE">
|
<a href="https://github.com/FooIbar/EhViewer/blob/1.8.x.x/LICENSE">
|
||||||
<img src="https://img.shields.io/github/license/Ehviewer-Overhauled/Ehviewer" alt="LICENSE">
|
<img src="https://img.shields.io/github/license/FooIbar/EhViewer" alt="LICENSE">
|
||||||
</a>
|
</a>
|
||||||
<a href="https://www.codefactor.io/repository/github/Ehviewer-Overhauled/ehviewer">
|
<a href="https://www.codefactor.io/repository/github/FooIbar/EhViewer">
|
||||||
<img src="https://www.codefactor.io/repository/github/Ehviewer-Overhauled/ehviewer/badge" alt="CodeFactor">
|
<img src="https://www.codefactor.io/repository/github/FooIbar/EhViewer/badge" alt="CodeFactor">
|
||||||
</a>
|
</a>
|
||||||
<a href="https://github.com/Ehviewer-Overhauled/Ehviewer/releases">
|
<a href="https://github.com/FooIbar/EhViewer/releases">
|
||||||
<img src="https://img.shields.io/github/v/release/Ehviewer-Overhauled/ehviewer?include_prereleases" alt="Release">
|
<img src="https://img.shields.io/github/v/release/FooIbar/EhViewer" alt="Release">
|
||||||
</a>
|
</a>
|
||||||
<a href="https://github.com/Ehviewer-Overhauled/Ehviewer/issues">
|
<a href="https://github.com/FooIbar/EhViewer/issues">
|
||||||
<img src="https://img.shields.io/github/issues/Ehviewer-Overhauled/ehviewer" alt="Issues">
|
<img src="https://img.shields.io/github/issues/FooIbar/EhViewer" alt="Issues">
|
||||||
</a>
|
</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<div align="center">
|
<div align="center">
|
||||||
<h3>
|
<h3>
|
||||||
<a href="https://github.com/Ehviewer-Overhauled/Ehviewer/blob/1.8.x.x/docs/README/zh-cn.md#描述">
|
<a href="https://github.com/FooIbar/EhViewer/blob/1.8.x.x/docs/README/zh-cn.md#描述">
|
||||||
描述
|
描述
|
||||||
</a>
|
</a>
|
||||||
<span> | </span>
|
<span> | </span>
|
||||||
<a href="https://github.com/Ehviewer-Overhauled/Ehviewer/blob/1.8.x.x/docs/README/zh-cn.md#下载">
|
<a href="https://github.com/FooIbar/EhViewer/blob/1.8.x.x/docs/README/zh-cn.md#下载">
|
||||||
下载
|
下载
|
||||||
</a>
|
</a>
|
||||||
<span> | </span>
|
<span> | </span>
|
||||||
<a href="https://github.com/Ehviewer-Overhauled/Ehviewer/blob/1.8.x.x/docs/README/zh-cn.md#截图">
|
<a href="https://github.com/FooIbar/EhViewer/blob/1.8.x.x/docs/README/zh-cn.md#截图">
|
||||||
截图
|
截图
|
||||||
</a>
|
</a>
|
||||||
<span> | </span>
|
<span> | </span>
|
||||||
<a href="https://github.com/Ehviewer-Overhauled/Ehviewer/blob/1.8.x.x/docs/README/zh-cn.md#感谢">
|
<a href="https://github.com/FooIbar/EhViewer/blob/1.8.x.x/docs/README/zh-cn.md#感谢">
|
||||||
感谢
|
感谢
|
||||||
</a>
|
</a>
|
||||||
<span> | </span>
|
<span> | </span>
|
||||||
<a href="https://github.com/Ehviewer-Overhauled/Ehviewer/blob/1.8.x.x/docs/README/zh-cn.md#许可证">
|
<a href="https://github.com/FooIbar/EhViewer/blob/1.8.x.x/docs/README/zh-cn.md#许可证">
|
||||||
许可证
|
许可证
|
||||||
</a>
|
</a>
|
||||||
</h3>
|
</h3>
|
||||||
@@ -65,7 +65,9 @@
|
|||||||
|
|
||||||
# 下载
|
# 下载
|
||||||
|
|
||||||
<a href="https://github.com/Ehviewer-Overhauled/Ehviewer/releases"><img alt="Get it on GitHub" src="https://github.com/Ehviewer-Overhauled/Art/blob/master/get-it-on-github.svg" width="200px"/></a> <a href="https://github.com/Ehviewer-Overhauled/fdroid-repo"><img alt="Get it on F-Droid" src="https://github.com/Ehviewer-Overhauled/Art/blob/master/get-it-on-fdroid.svg" width="200px"/></a>
|
<a href="https://github.com/FooIbar/EhViewer/releases">
|
||||||
|
<img alt="Get it on GitHub" src="https://github.com/Ehviewer-Overhauled/Art/blob/master/get-it-on-github.svg" width="200px"/>
|
||||||
|
</a>
|
||||||
|
|
||||||
# 截图
|
# 截图
|
||||||
|
|
||||||
@@ -95,6 +97,7 @@
|
|||||||
Copyright 2014-2019 Hippo Seven
|
Copyright 2014-2019 Hippo Seven
|
||||||
Copyright 2020-2022 NekoInverter
|
Copyright 2020-2022 NekoInverter
|
||||||
Copyright 2022-2023 Tarsin Norbin
|
Copyright 2022-2023 Tarsin Norbin
|
||||||
|
Copyright 2023 Foolbar
|
||||||
|
|
||||||
EhViewer is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
|
EhViewer is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
|||||||
+22
-19
@@ -1,9 +1,9 @@
|
|||||||
<p align="right">
|
<p align="right">
|
||||||
<a href="https://github.com/Ehviewer-Overhauled/Ehviewer/blob/1.8.x.x/docs/README/en.md">
|
<a href="https://github.com/FooIbar/EhViewer/blob/1.8.x.x/README.md">
|
||||||
English
|
English
|
||||||
</a>
|
</a>
|
||||||
<span> | </span>
|
<span> | </span>
|
||||||
<a href="https://github.com/Ehviewer-Overhauled/Ehviewer/blob/1.8.x.x/docs/README/zh-cn.md">
|
<a href="https://github.com/FooIbar/EhViewer/blob/1.8.x.x/docs/README/zh-cn.md">
|
||||||
简体中文
|
简体中文
|
||||||
</a>
|
</a>
|
||||||
<span> | </span>
|
<span> | </span>
|
||||||
@@ -11,47 +11,47 @@
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
<h1 align="center">
|
<h1 align="center">
|
||||||
<img src="https://github.com/Ehviewer-Overhauled/Art/blob/master/launcher_icon-web.svg" width="200">
|
<img src="https://github.com/Ehviewer-Overhauled/Art/blob/master/launcher_icon-web.svg" width="200" alt="EhViewer">
|
||||||
<br>EhViewer<br>
|
<br>EhViewer<br>
|
||||||
</h1>
|
</h1>
|
||||||
|
|
||||||
<p align="center">
|
<p align="center">
|
||||||
<a href="https://github.com/Ehviewer-Overhauled/Ehviewer/actions/workflows/ci.yml">
|
<a href="https://github.com/FooIbar/EhViewer/actions/workflows/ci.yml">
|
||||||
<img src="https://github.com/Ehviewer-Overhauled/Ehviewer/actions/workflows/ci.yml/badge.svg" alt="Github Actions">
|
<img src="https://github.com/FooIbar/EhViewer/actions/workflows/ci.yml/badge.svg" alt="Github Actions">
|
||||||
</a>
|
</a>
|
||||||
<a href="https://github.com/Ehviewer-Overhauled/Ehviewer/blob/1.8.x.x/LICENSE">
|
<a href="https://github.com/FooIbar/EhViewer/blob/1.8.x.x/LICENSE">
|
||||||
<img src="https://img.shields.io/github/license/Ehviewer-Overhauled/Ehviewer" alt="LICENSE">
|
<img src="https://img.shields.io/github/license/FooIbar/EhViewer" alt="LICENSE">
|
||||||
</a>
|
</a>
|
||||||
<a href="https://www.codefactor.io/repository/github/Ehviewer-Overhauled/ehviewer">
|
<a href="https://www.codefactor.io/repository/github/FooIbar/EhViewer">
|
||||||
<img src="https://www.codefactor.io/repository/github/Ehviewer-Overhauled/ehviewer/badge" alt="CodeFactor">
|
<img src="https://www.codefactor.io/repository/github/FooIbar/EhViewer/badge" alt="CodeFactor">
|
||||||
</a>
|
</a>
|
||||||
<a href="https://github.com/Ehviewer-Overhauled/Ehviewer/releases">
|
<a href="https://github.com/FooIbar/EhViewer/releases">
|
||||||
<img src="https://img.shields.io/github/v/release/Ehviewer-Overhauled/ehviewer?include_prereleases" alt="Release">
|
<img src="https://img.shields.io/github/v/release/FooIbar/EhViewer" alt="Release">
|
||||||
</a>
|
</a>
|
||||||
<a href="https://github.com/Ehviewer-Overhauled/Ehviewer/issues">
|
<a href="https://github.com/FooIbar/EhViewer/issues">
|
||||||
<img src="https://img.shields.io/github/issues/Ehviewer-Overhauled/ehviewer" alt="Issues">
|
<img src="https://img.shields.io/github/issues/FooIbar/EhViewer" alt="Issues">
|
||||||
</a>
|
</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<div align="center">
|
<div align="center">
|
||||||
<h3>
|
<h3>
|
||||||
<a href="https://github.com/Ehviewer-Overhauled/Ehviewer/blob/1.8.x.x/docs/README/zh-tw.md#說明">
|
<a href="https://github.com/FooIbar/EhViewer/blob/1.8.x.x/docs/README/zh-tw.md#說明">
|
||||||
說明
|
說明
|
||||||
</a>
|
</a>
|
||||||
<span> | </span>
|
<span> | </span>
|
||||||
<a href="https://github.com/Ehviewer-Overhauled/Ehviewer/blob/1.8.x.x/docs/README/zh-tw.md#下載">
|
<a href="https://github.com/FooIbar/EhViewer/blob/1.8.x.x/docs/README/zh-tw.md#下載">
|
||||||
下載
|
下載
|
||||||
</a>
|
</a>
|
||||||
<span> | </span>
|
<span> | </span>
|
||||||
<a href="https://github.com/Ehviewer-Overhauled/Ehviewer/blob/1.8.x.x/docs/README/zh-tw.md#截圖">
|
<a href="https://github.com/FooIbar/EhViewer/blob/1.8.x.x/docs/README/zh-tw.md#截圖">
|
||||||
截圖
|
截圖
|
||||||
</a>
|
</a>
|
||||||
<span> | </span>
|
<span> | </span>
|
||||||
<a href="https://github.com/Ehviewer-Overhauled/Ehviewer/blob/1.8.x.x/docs/README/zh-tw.md#感謝">
|
<a href="https://github.com/FooIbar/EhViewer/blob/1.8.x.x/docs/README/zh-tw.md#感謝">
|
||||||
感謝
|
感謝
|
||||||
</a>
|
</a>
|
||||||
<span> | </span>
|
<span> | </span>
|
||||||
<a href="https://github.com/Ehviewer-Overhauled/Ehviewer/blob/1.8.x.x/docs/README/zh-tw.md#許可證書">
|
<a href="https://github.com/FooIbar/EhViewer/blob/1.8.x.x/docs/README/zh-tw.md#許可證書">
|
||||||
許可證書
|
許可證書
|
||||||
</a>
|
</a>
|
||||||
</h3>
|
</h3>
|
||||||
@@ -65,7 +65,9 @@
|
|||||||
|
|
||||||
# 下載
|
# 下載
|
||||||
|
|
||||||
<a href="https://github.com/Ehviewer-Overhauled/Ehviewer/releases"><img alt="Get it on GitHub" src="https://github.com/Ehviewer-Overhauled/Art/blob/master/get-it-on-github.svg" width="200px"/></a> <a href="https://github.com/Ehviewer-Overhauled/fdroid-repo"><img alt="Get it on F-Droid" src="https://github.com/Ehviewer-Overhauled/Art/blob/master/get-it-on-fdroid.svg" width="200px"/></a>
|
<a href="https://github.com/FooIbar/EhViewer/releases">
|
||||||
|
<img alt="Get it on GitHub" src="https://github.com/Ehviewer-Overhauled/Art/blob/master/get-it-on-github.svg" width="200px"/>
|
||||||
|
</a>
|
||||||
|
|
||||||
# 截圖
|
# 截圖
|
||||||
|
|
||||||
@@ -93,6 +95,7 @@
|
|||||||
Copyright 2014-2019 Hippo Seven
|
Copyright 2014-2019 Hippo Seven
|
||||||
Copyright 2020-2022 NekoInverter
|
Copyright 2020-2022 NekoInverter
|
||||||
Copyright 2022-2023 Tarsin Norbin
|
Copyright 2022-2023 Tarsin Norbin
|
||||||
|
Copyright 2023 Foolbar
|
||||||
|
|
||||||
EhViewer is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
|
EhViewer is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
|||||||
Vendored
BIN
Binary file not shown.
@@ -83,7 +83,8 @@ done
|
|||||||
# This is normally unused
|
# This is normally unused
|
||||||
# shellcheck disable=SC2034
|
# shellcheck disable=SC2034
|
||||||
APP_BASE_NAME=${0##*/}
|
APP_BASE_NAME=${0##*/}
|
||||||
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
|
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
|
||||||
|
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
|
||||||
|
|
||||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||||
MAX_FD=maximum
|
MAX_FD=maximum
|
||||||
|
|||||||
@@ -1,38 +0,0 @@
|
|||||||
val ktlint by configurations.creating
|
|
||||||
|
|
||||||
dependencies {
|
|
||||||
ktlint("com.pinterest:ktlint:0.50.0") {
|
|
||||||
attributes {
|
|
||||||
attribute(Bundling.BUNDLING_ATTRIBUTE, objects.named(Bundling.EXTERNAL))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// ktlint(project(":custom-ktlint-ruleset")) // in case of custom ruleset
|
|
||||||
}
|
|
||||||
|
|
||||||
val ktlintCheck by tasks.registering(JavaExec::class) {
|
|
||||||
group = LifecycleBasePlugin.VERIFICATION_GROUP
|
|
||||||
description = "Check Kotlin code style"
|
|
||||||
classpath = ktlint
|
|
||||||
mainClass.set("com.pinterest.ktlint.Main")
|
|
||||||
// see https://pinterest.github.io/ktlint/install/cli/#command-line-usage for more information
|
|
||||||
args(
|
|
||||||
"**/*.kt",
|
|
||||||
"**/*.kts",
|
|
||||||
"!**/build/**",
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
val ktlintFormat by tasks.registering(JavaExec::class) {
|
|
||||||
group = LifecycleBasePlugin.VERIFICATION_GROUP
|
|
||||||
description = "Check Kotlin code style and format"
|
|
||||||
classpath = ktlint
|
|
||||||
mainClass.set("com.pinterest.ktlint.Main")
|
|
||||||
jvmArgs("--add-opens=java.base/java.lang=ALL-UNNAMED")
|
|
||||||
// see https://pinterest.github.io/ktlint/install/cli/#command-line-usage for more information
|
|
||||||
args(
|
|
||||||
"-F",
|
|
||||||
"**/*.kt",
|
|
||||||
"**/*.kts",
|
|
||||||
"!**/build/**",
|
|
||||||
)
|
|
||||||
}
|
|
||||||
+1
-2
@@ -4,8 +4,7 @@
|
|||||||
],
|
],
|
||||||
|
|
||||||
"automerge": true,
|
"automerge": true,
|
||||||
"automergeType": "pr",
|
"automergeType": "branch",
|
||||||
"automergeStrategy": "squash",
|
|
||||||
|
|
||||||
"extends": [
|
"extends": [
|
||||||
"config:base"
|
"config:base"
|
||||||
|
|||||||
Reference in new issue
Block a user