Skip to content

Commit

Permalink
fix queue task
Browse files Browse the repository at this point in the history
  • Loading branch information
Notsfsssf committed Aug 22, 2021
1 parent 5e726e8 commit 981af58
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ android {
applicationId packageName
minSdkVersion 21
targetSdkVersion 30
versionCode 10005086
versionName "0.5.9 X"
versionCode 10006010
versionName "0.6.1 X"
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
Expand Down
10 changes: 8 additions & 2 deletions lib/er/fetcher.dart
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,14 @@ class Fetcher {

nextJob() {
if (queue.isNotEmpty && urlPool.length < userSetting.maxRunningTask) {
var first = queue.first;
if (urlPool.contains(first)) return;
TaskBean? first = null;
for (var i in queue) {
if (!urlPool.contains(i.url)) {
first = i;
break;
}
}
if (first == null) return;
IsoContactBean isoContactBean =
IsoContactBean(state: IsoTaskState.APPEND, data: first);
sendPortToChild?.send(isoContactBean);
Expand Down

0 comments on commit 981af58

Please sign in to comment.