pull/37/head
kunfei 5 years ago
parent 03f888b817
commit d91b2cd28a
  1. 4
      app/src/main/java/io/legado/app/help/BookHelp.kt

@ -103,7 +103,7 @@ object BookHelp {
return index
} else {
for (i in 1..50) {
if (index - 1 in chapters.indices) {
if (index - i in chapters.indices) {
jaccardSimilarity.apply(title, chapters[index - i].title).let {
if (it > similarity) {
similarity = it
@ -114,7 +114,7 @@ object BookHelp {
}
}
}
if (index + 1 in chapters.indices) {
if (index + i in chapters.indices) {
jaccardSimilarity.apply(title, chapters[index + i].title).let {
if (it > similarity) {
similarity = it

Loading…
Cancel
Save