Skip to content

Commit

Permalink
fix:修复未找到匹配项,点击上下箭头数组越界的BUG,版本号改为0.0.13
Browse files Browse the repository at this point in the history
  • Loading branch information
coder-pig committed Nov 21, 2023
1 parent 83877dc commit 98f4374
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion cp-network-capture/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ android {
minSdk 21
targetSdk 33
versionCode 1
versionName "0.0.12"
versionName "0.0.13"
}

buildTypes {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,16 @@ class TextSearchActivity : AppCompatActivity() {
searchMatchText()
}
tvNextMatch -> {
if (mCurMatchPos >= mMatchRangeList.size - 1) mCurMatchPos = 0 else mCurMatchPos++
scrollToTargetLine()
if (!mMatchRangeList.isNullOrEmpty()) {
if (mCurMatchPos >= mMatchRangeList.size - 1) mCurMatchPos = 0 else mCurMatchPos++
scrollToTargetLine()
}
}
tvPreviousMatch -> {
if (mCurMatchPos <= 0) mCurMatchPos = mMatchRangeList.size - 1 else mCurMatchPos--
scrollToTargetLine()
if (!mMatchRangeList.isNullOrEmpty()) {
if (mCurMatchPos <= 0) mCurMatchPos = mMatchRangeList.size - 1 else mCurMatchPos--
scrollToTargetLine()
}
}
}
}
Expand Down

0 comments on commit 98f4374

Please sign in to comment.