Skip to content

Commit

Permalink
partially fixes #428
Browse files Browse the repository at this point in the history
  • Loading branch information
tux-mind committed Mar 27, 2016
1 parent 1144ea6 commit 1860d4f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
1 change: 0 additions & 1 deletion cSploit/src/org/csploit/android/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -612,7 +612,6 @@ public void onInputEntered(String input) {
@Override
public void run() {
System.addOrderedTarget(target);
mTargetAdapter.update(null, null);
}
});
} else
Expand Down
11 changes: 8 additions & 3 deletions cSploit/src/org/csploit/android/core/System.java
Original file line number Diff line number Diff line change
Expand Up @@ -1031,16 +1031,21 @@ public static boolean addOrderedTarget(Target target){
return false;
}

boolean inserted = false;

for (int i = 0; i < mTargets.size(); i++) {
if (mTargets.get(i).comesAfter(target)) {
mTargets.add(i, target);
Services.getNetworkRadar().onNewTargetFound(target);
return true;
inserted = true;
break;
}
}

mTargets.add(target);
if(!inserted)
mTargets.add(target);

Services.getNetworkRadar().onNewTargetFound(target);
notifyTargetListChanged();
return true;
}
}
Expand Down

0 comments on commit 1860d4f

Please sign in to comment.