Compare commits
18
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a6d215a0bf | ||
|
|
cf9441adb5 | ||
|
|
d6a3a351f5 | ||
|
|
a574bca48e | ||
|
|
785faf1bf4 | ||
|
|
fbcc32b3ee | ||
|
|
46b19a9de5 | ||
|
|
d2f47d51f9 | ||
|
|
db380507f5 | ||
|
|
84cf67d21a | ||
|
|
8f53591800 | ||
|
|
65ffd78844 | ||
|
|
c00b5e6635 | ||
|
|
8160991086 | ||
|
|
f0c933d97a | ||
|
|
3fb8d3e73b | ||
|
|
d8efff9921 | ||
|
|
32170688b6 |
No files matched your search
@@ -25,7 +25,7 @@ jobs:
|
||||
|
||||
- name: Install NDK
|
||||
run: |
|
||||
echo "y" | sudo ${ANDROID_HOME}/tools/bin/sdkmanager --install "ndk;26.0.10404224" --channel=1 --sdk_root=${ANDROID_SDK_ROOT} &> /dev/null
|
||||
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
|
||||
|
||||
@@ -20,7 +20,7 @@ jobs:
|
||||
|
||||
- name: Install NDK
|
||||
run: |
|
||||
echo "y" | sudo ${ANDROID_HOME}/tools/bin/sdkmanager --install "ndk;26.0.10404224" --channel=1 --sdk_root=${ANDROID_SDK_ROOT} &> /dev/null
|
||||
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
|
||||
|
||||
@@ -23,7 +23,7 @@ jobs:
|
||||
|
||||
- name: Install NDK
|
||||
run: |
|
||||
echo "y" | sudo ${ANDROID_HOME}/tools/bin/sdkmanager --install "ndk;26.0.10404224" --channel=1 --sdk_root=${ANDROID_SDK_ROOT} &> /dev/null
|
||||
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
|
||||
|
||||
+10
-10
@@ -21,7 +21,7 @@ plugins {
|
||||
android {
|
||||
compileSdk = 34
|
||||
buildToolsVersion = "34.0.0"
|
||||
ndkVersion = "26.0.10404224"
|
||||
ndkVersion = "26.0.10636728"
|
||||
|
||||
splits {
|
||||
abi {
|
||||
@@ -64,7 +64,7 @@ android {
|
||||
minSdk = 28
|
||||
targetSdk = 34
|
||||
versionCode = 180043
|
||||
versionName = "1.8.9.3-gms"
|
||||
versionName = "1.8.9.4-gms"
|
||||
resourceConfigurations.addAll(
|
||||
listOf(
|
||||
"zh",
|
||||
@@ -159,7 +159,7 @@ android {
|
||||
}
|
||||
|
||||
composeOptions {
|
||||
kotlinCompilerExtensionVersion = "1.5.1"
|
||||
kotlinCompilerExtensionVersion = "1.5.3"
|
||||
}
|
||||
|
||||
namespace = "com.hippo.ehviewer"
|
||||
@@ -167,7 +167,7 @@ android {
|
||||
|
||||
dependencies {
|
||||
// https://developer.android.com/jetpack/androidx/releases/activity
|
||||
implementation("androidx.activity:activity-compose:1.8.0-alpha06")
|
||||
implementation("androidx.activity:activity-compose:1.8.0-alpha07")
|
||||
implementation("androidx.appcompat:appcompat:1.6.1")
|
||||
implementation("androidx.biometric:biometric-ktx:1.2.0-alpha05")
|
||||
implementation("androidx.browser:browser:1.6.0")
|
||||
@@ -185,12 +185,12 @@ dependencies {
|
||||
|
||||
implementation("androidx.constraintlayout:constraintlayout-compose:1.1.0-alpha12")
|
||||
implementation("androidx.coordinatorlayout:coordinatorlayout:1.2.0")
|
||||
implementation("androidx.fragment:fragment-ktx:1.7.0-alpha02")
|
||||
implementation("androidx.fragment:fragment-ktx:1.7.0-alpha03")
|
||||
// https://developer.android.com/jetpack/androidx/releases/lifecycle
|
||||
implementation("androidx.lifecycle:lifecycle-process:2.6.1")
|
||||
|
||||
// https://developer.android.com/jetpack/androidx/releases/navigation
|
||||
val nav_version = "2.7.0"
|
||||
val nav_version = "2.7.1"
|
||||
implementation("androidx.navigation:navigation-fragment-ktx:$nav_version")
|
||||
implementation("androidx.navigation:navigation-ui-ktx:$nav_version")
|
||||
implementation("androidx.navigation:navigation-compose:$nav_version")
|
||||
@@ -203,7 +203,7 @@ dependencies {
|
||||
implementation("androidx.recyclerview:recyclerview-selection:1.2.0-alpha01")
|
||||
|
||||
// https://developer.android.com/jetpack/androidx/releases/room
|
||||
val room_version = "2.6.0-alpha03"
|
||||
val room_version = "2.6.0-beta01"
|
||||
ksp("androidx.room:room-compiler:$room_version")
|
||||
implementation("androidx.room:room-paging:$room_version")
|
||||
|
||||
@@ -213,7 +213,7 @@ dependencies {
|
||||
implementation("com.github.chrisbanes:PhotoView:2.3.0") // Dead Dependency
|
||||
implementation("com.github.tachiyomiorg:DirectionalViewPager:1.0.0") // Dead Dependency
|
||||
// https://github.com/google/accompanist/releases
|
||||
val accompanist_version = "0.31.6-rc"
|
||||
val accompanist_version = "0.32.0"
|
||||
implementation("com.google.accompanist:accompanist-themeadapter-material3:$accompanist_version")
|
||||
implementation("com.google.accompanist:accompanist-webview:$accompanist_version")
|
||||
implementation("com.google.android.material:material:1.11.0-alpha02")
|
||||
@@ -253,7 +253,7 @@ dependencies {
|
||||
implementation("org.chromium.net:cronet-api:113.5672.61")
|
||||
implementation("com.google.android.gms:play-services-cronet:18.0.1")
|
||||
|
||||
val serialization = "1.5.1"
|
||||
val serialization = "1.6.0"
|
||||
implementation("org.jetbrains.kotlinx:kotlinx-serialization-cbor:$serialization")
|
||||
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:$serialization")
|
||||
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json-okio:$serialization")
|
||||
@@ -299,6 +299,6 @@ tasks.configureEach {
|
||||
if ((name == "mergeDebugJniLibFolders" || name == "mergeReleaseJniLibFolders")) {
|
||||
dependsOn("cargoBuild")
|
||||
// fix mergeDebugJniLibFolders UP-TO-DATE
|
||||
inputs.dir(buildDir.resolve("rustJniLibs/android"))
|
||||
inputs.dir(layout.buildDirectory.dir("rustJniLibs/android"))
|
||||
}
|
||||
}
|
||||
@@ -44,21 +44,23 @@ data class DownloadEntity(
|
||||
|
||||
@ColumnInfo(name = "POSITION")
|
||||
override var position: Int = 0,
|
||||
|
||||
@Ignore
|
||||
override var speed: Long = 0,
|
||||
|
||||
@Ignore
|
||||
override var remaining: Long = 0,
|
||||
|
||||
@Ignore
|
||||
override var finished: Int = 0,
|
||||
|
||||
@Ignore
|
||||
override var downloaded: Int = 0,
|
||||
|
||||
@Ignore
|
||||
override var total: Int = 0,
|
||||
) : AbstractDownloadInfo {
|
||||
@Ignore
|
||||
override var speed: Long = 0
|
||||
|
||||
@Ignore
|
||||
override var remaining: Long = 0
|
||||
|
||||
@Ignore
|
||||
override var finished = 0
|
||||
|
||||
@Ignore
|
||||
override var downloaded = 0
|
||||
|
||||
@Ignore
|
||||
override var total = 0
|
||||
constructor() : this(0)
|
||||
}
|
||||
|
||||
data class DownloadInfo(
|
||||
|
||||
@@ -202,7 +202,7 @@ class DownloadsScene :
|
||||
getString(R.string.default_download_label_name) -> DownloadManager.defaultInfoList
|
||||
else -> DownloadManager.getLabelDownloadInfoList(mLabel)
|
||||
?: DownloadManager.allInfoList.also { mLabel = null }
|
||||
}.filter(::filter)
|
||||
}.mapNotNull { it.takeIf(::filter)?.copy(downloadInfo = it.downloadInfo.copy()) }
|
||||
submitList(list) {
|
||||
if (mGid != -1L) {
|
||||
val position = list.indexOfFirst { it.gid == mGid }
|
||||
|
||||
@@ -105,6 +105,7 @@ import arrow.core.partially1
|
||||
import coil.imageLoader
|
||||
import com.google.android.material.snackbar.Snackbar
|
||||
import com.hippo.ehviewer.EhApplication.Companion.galleryDetailCache
|
||||
import com.hippo.ehviewer.EhApplication.Companion.imageCache
|
||||
import com.hippo.ehviewer.EhDB
|
||||
import com.hippo.ehviewer.R
|
||||
import com.hippo.ehviewer.Settings
|
||||
@@ -122,6 +123,7 @@ import com.hippo.ehviewer.client.data.GalleryTagGroup
|
||||
import com.hippo.ehviewer.client.data.ListUrlBuilder
|
||||
import com.hippo.ehviewer.client.exception.EhException
|
||||
import com.hippo.ehviewer.client.exception.NoHAtHClientException
|
||||
import com.hippo.ehviewer.client.getImageKey
|
||||
import com.hippo.ehviewer.client.parser.ArchiveParser
|
||||
import com.hippo.ehviewer.client.parser.HomeParser
|
||||
import com.hippo.ehviewer.client.parser.TorrentResult
|
||||
@@ -341,6 +343,24 @@ class GalleryDetailScene : BaseScene() {
|
||||
}
|
||||
}
|
||||
|
||||
private fun actionClearCache() {
|
||||
val gd = composeBindingGD ?: return
|
||||
lifecycleScope.launchIO {
|
||||
dialogState.awaitPermissionOrCancel(
|
||||
confirmText = R.string.clear_all,
|
||||
dismissText = android.R.string.cancel,
|
||||
title = R.string.clear_image_cache,
|
||||
) {
|
||||
Text(text = stringResource(id = R.string.clear_image_cache_confirm))
|
||||
}
|
||||
(0..<gd.pages).forEach {
|
||||
val key = getImageKey(gd.gid, it)
|
||||
imageCache.remove(key)
|
||||
}
|
||||
showTip(R.string.image_cache_cleared, LENGTH_SHORT)
|
||||
}
|
||||
}
|
||||
|
||||
private fun actionOpenInOtherApp() {
|
||||
val url = galleryDetailUrl ?: return
|
||||
val activity: Activity = mainActivity ?: return
|
||||
@@ -466,6 +486,13 @@ class GalleryDetailScene : BaseScene() {
|
||||
actionRefresh()
|
||||
},
|
||||
)
|
||||
DropdownMenuItem(
|
||||
text = { Text(text = stringResource(id = R.string.clear_image_cache)) },
|
||||
onClick = {
|
||||
dropdown = false
|
||||
actionClearCache()
|
||||
},
|
||||
)
|
||||
DropdownMenuItem(
|
||||
text = { Text(text = stringResource(id = R.string.open_in_other_app)) },
|
||||
onClick = {
|
||||
|
||||
+3
-1
@@ -57,7 +57,9 @@ class WebtoonRecyclerView @JvmOverloads constructor(
|
||||
}
|
||||
|
||||
override fun onTouchEvent(e: MotionEvent): Boolean {
|
||||
detector.onTouchEvent(e)
|
||||
if (scrollState == SCROLL_STATE_IDLE) {
|
||||
detector.onTouchEvent(e)
|
||||
}
|
||||
return super.onTouchEvent(e)
|
||||
}
|
||||
|
||||
|
||||
@@ -149,6 +149,9 @@
|
||||
<string name="refresh">刷新</string>
|
||||
<string name="refresh_original">刷新(原图)</string>
|
||||
<string name="open_in_other_app">在其他应用中打开</string>
|
||||
<string name="clear_image_cache">清除图片缓存</string>
|
||||
<string name="clear_image_cache_confirm">清除该画廊的所有图片缓存?</string>
|
||||
<string name="image_cache_cleared">已清除图片缓存</string>
|
||||
<string name="rate_successfully">评分成功</string>
|
||||
<string name="rate_failed">评分失败</string>
|
||||
<string name="no_torrents">没有种子</string>
|
||||
|
||||
@@ -191,6 +191,9 @@
|
||||
<string name="refresh">Refresh</string>
|
||||
<string name="refresh_original">Refresh (Original image)</string>
|
||||
<string name="open_in_other_app">Open with other app</string>
|
||||
<string name="clear_image_cache">Clear image cache</string>
|
||||
<string name="clear_image_cache_confirm">Clear all cached images for this gallery?</string>
|
||||
<string name="image_cache_cleared">Image cache cleared</string>
|
||||
<string name="rate_successfully">Rate successfully</string>
|
||||
<string name="rate_failed">Rate failed</string>
|
||||
<string name="no_torrents">No torrents</string>
|
||||
|
||||
+5
-5
@@ -1,8 +1,8 @@
|
||||
plugins {
|
||||
id("com.android.application") version "8.1.0" apply false
|
||||
kotlin("android") version "1.9.0" apply false
|
||||
kotlin("plugin.serialization") version "1.9.0" apply false
|
||||
id("com.google.devtools.ksp") version "1.9.0-1.0.13" apply false
|
||||
id("com.android.application") version "8.1.1" apply false
|
||||
kotlin("android") 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.mikepenz.aboutlibraries.plugin") version "10.8.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
|
||||
@@ -13,7 +13,7 @@ allprojects {
|
||||
}
|
||||
|
||||
tasks.register("Delete", Delete::class) {
|
||||
delete(rootProject.buildDir)
|
||||
delete(rootProject.layout.buildDirectory)
|
||||
}
|
||||
|
||||
buildscript {
|
||||
|
||||
Reference in new issue
Block a user