master
fengyuecanzhu 3 years ago
parent 6055e779c2
commit e62da66aed
  1. 4
      app/src/main/java/xyz/fycz/myreader/model/SearchWordEngine.kt
  2. 6
      app/src/main/java/xyz/fycz/myreader/ui/activity/SearchWordActivity.kt
  3. 2
      app/src/main/java/xyz/fycz/myreader/util/help/JsExtensions.java

@ -37,8 +37,8 @@ class SearchWordEngine(
private var scheduler: Scheduler private var scheduler: Scheduler
private var compositeDisposable: CompositeDisposable private var compositeDisposable: CompositeDisposable
private lateinit var searchListener: OnSearchListener private lateinit var searchListener: OnSearchListener
private val threadsNum = 4 private val threadsNum =
// SharedPreUtils.getInstance().getInt(App.getmContext().getString(R.string.threadNum), 8) SharedPreUtils.getInstance().getInt(App.getmContext().getString(R.string.threadNum), 8)
private var searchSiteIndex = 0 private var searchSiteIndex = 0
private var searchSuccessNum = 0 private var searchSuccessNum = 0
private var searchFinishNum = 0 private var searchFinishNum = 0

@ -107,14 +107,14 @@ class SearchWordActivity : BaseActivity() {
if (index == 0 && item.chapterNum < searchWord1.chapterNum) { if (index == 0 && item.chapterNum < searchWord1.chapterNum) {
adapter.addItem(0, item) adapter.addItem(0, item)
break break
} else if (index == adapter.itemSize - 1) {
adapter.addItem(item)
break
} else if (item.chapterNum >= searchWord1.chapterNum && } else if (item.chapterNum >= searchWord1.chapterNum &&
item.chapterNum < adapter.items[index + 1].chapterNum item.chapterNum < adapter.items[index + 1].chapterNum
) { ) {
adapter.addItem(index + 1, item) adapter.addItem(index + 1, item)
break break
} else if (index == adapter.itemSize - 1) {
adapter.addItem(item)
break
} }
} }
} }

@ -35,8 +35,6 @@ import xyz.fycz.myreader.util.utils.StringUtils;
@Keep @Keep
@SuppressWarnings({"unused"}) @SuppressWarnings({"unused"})
public interface JsExtensions { public interface JsExtensions {
String TAG = JsExtensions.class.getSimpleName(); String TAG = JsExtensions.class.getSimpleName();

Loading…
Cancel
Save