Compare commits

..
Author SHA1 Message Date
tarsin 1ebbf6e349 Release 1.8.6.0-alpha03
Releases / Build (push) Has been cancelled
2023-02-14 16:22:12 +08:00
tarsin 1b71f6a60a Fix issue that download progress being reset when entering reader 2023-02-14 16:20:38 +08:00
tarsin a3241e48df Release 1.8.6.0-alpha02
Releases / Build (push) Has been cancelled
2023-02-14 16:07:15 +08:00
FooIbar 69396f3d59 Use .jpg instead of .jpeg for image/jpeg
Revert "Resolve #795"

This reverts commit d6939b2913.
2023-02-14 16:05:07 +08:00
4 changed files with 6 additions and 8 deletions

No files matched your search

+1 -1
View File
@@ -35,7 +35,7 @@ android {
minSdk = 28
targetSdk = 33
versionCode = 180031
versionName = "1.8.6.0-alpha01"
versionName = "1.8.6.0-alpha03"
resourceConfigurations.addAll(
listOf(
"zh",
@@ -28,7 +28,6 @@ public abstract class PageLoader2 extends PageLoader {
// With dot
public static final String[] SUPPORT_IMAGE_EXTENSIONS = {
".jpg", // Joint Photographic Experts Group
".jpeg",
".png", // Portable Network Graphics
".gif", // Graphics Interchange Format
};
@@ -262,7 +262,7 @@ public final class SpiderQueen implements Runnable {
}
}
private boolean shouldIntoDownload = false;
private boolean mInDownloadMode = false;
private void updateMode() {
int mode;
@@ -277,7 +277,7 @@ public final class SpiderQueen implements Runnable {
// Update download page
boolean intoDownloadMode = mode == MODE_DOWNLOAD;
if (intoDownloadMode && mPageStateArray != null) {
if (intoDownloadMode && !mInDownloadMode && mPageStateArray != null) {
// Clear download state
synchronized (mPageStateLock) {
int[] temp = mPageStateArray;
@@ -292,9 +292,9 @@ public final class SpiderQueen implements Runnable {
mPageErrorMap.clear();
mPagePercentMap.clear();
}
} else if (intoDownloadMode && mPageStateArray == null) {
shouldIntoDownload = true;
}
mInDownloadMode = intoDownloadMode;
}
private void setMode(@Mode int mode) {
@@ -631,7 +631,7 @@ public final class SpiderQueen implements Runnable {
// Notify get pages
notifyGetPages(spiderInfo.getPages());
if (shouldIntoDownload) mWorkerScope.enterDownloadMode();
if (mInDownloadMode) mWorkerScope.enterDownloadMode();
// Wait finish
synchronized (mQueenLock) {
@@ -104,7 +104,6 @@ class SpiderQueenWorker(private val queen: SpiderQueen) : CoroutineScope {
return queen.updatePageState(index, STATE_FINISHED)
}
if (force) {
spiderDen.remove(index)
pTokenLock.withLock {
val pToken = spiderInfo.pTokenMap[index]
if (pToken == TOKEN_FAILED) spiderInfo.pTokenMap.remove(index)