diff --git a/android/app/build.gradle b/android/app/build.gradle index a67d5e6..5fbdcca 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -138,8 +138,8 @@ android { applicationId "com.mangareader" minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion - versionCode 9 - versionName "0.2.0" + versionCode 10 + versionName "0.2.1" buildConfigField "boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled().toString() if (isNewArchitectureEnabled()) { diff --git a/ios/MangaReader.xcodeproj/project.pbxproj b/ios/MangaReader.xcodeproj/project.pbxproj index 9e3c91a..33a5c6d 100644 --- a/ios/MangaReader.xcodeproj/project.pbxproj +++ b/ios/MangaReader.xcodeproj/project.pbxproj @@ -493,7 +493,7 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; - CURRENT_PROJECT_VERSION = 9; + CURRENT_PROJECT_VERSION = 10; DEVELOPMENT_TEAM = VAL2KK2S94; ENABLE_BITCODE = NO; INFOPLIST_FILE = MangaReader/Info.plist; @@ -501,7 +501,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 0.2.0; + MARKETING_VERSION = 0.2.1; OTHER_LDFLAGS = ( "$(inherited)", "-ObjC", @@ -521,14 +521,14 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; - CURRENT_PROJECT_VERSION = 9; + CURRENT_PROJECT_VERSION = 10; DEVELOPMENT_TEAM = VAL2KK2S94; INFOPLIST_FILE = MangaReader/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 0.2.0; + MARKETING_VERSION = 0.2.1; OTHER_LDFLAGS = ( "$(inherited)", "-ObjC", diff --git a/package.json b/package.json index dd34a33..168222a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "mangareader", - "version": "0.2.0", + "version": "0.2.1", "private": true, "scripts": { "android": "react-native run-android", diff --git a/src/redux/saga.ts b/src/redux/saga.ts index 3f31a44..3fc8bfc 100644 --- a/src/redux/saga.ts +++ b/src/redux/saga.ts @@ -160,27 +160,30 @@ function* batchUpdateSaga() { break; } - const id = nanoid(); - const dict = ((state: RootState) => state.dict)(yield select()); - yield put(loadManga({ mangaHash: hash, taskId: id })); + const loadMangaEffect = function* () { + const id = nanoid(); + const dict = ((state: RootState) => state.dict)(yield select()); + yield put(loadManga({ mangaHash: hash, taskId: id })); - const { - payload: { error: fetchError, data }, - }: ActionParameters = yield take( - ({ type, payload: { taskId } }: any) => type === loadMangaCompletion.type && taskId === id - ); + const { + payload: { error: fetchError, data }, + }: ActionParameters = yield take( + ({ type, payload: { taskId } }: any) => type === loadMangaCompletion.type && taskId === id + ); - let isTrend = false; - if (!fetchError) { - const prev = dict.manga[hash]?.chapters || []; - const curr = data?.chapters || []; + let isTrend = false; + if (!fetchError) { + const prev = dict.manga[hash]?.chapters || []; + const curr = data?.chapters || []; - if (curr.length > prev.length) { - isTrend = true; + if (curr.length > prev.length) { + isTrend = true; + } } - } - yield put(batchRecord({ isSuccess: !fetchError, isTrend, hash })); + yield put(batchRecord({ isSuccess: !fetchError, isTrend, hash })); + }; + yield all([loadMangaEffect(), delay(1000)]); } yield put(endBatchUpdate());