Skip to content
This repository has been archived by the owner on Jun 17, 2023. It is now read-only.

Commit

Permalink
修复: 1. 按 Backspace 删除搜索的单词,会修改搜索的单词。
Browse files Browse the repository at this point in the history
搜索当前词库时,没有执行深拷贝。
  • Loading branch information
tangshimin committed Aug 17, 2022
1 parent dec8f52 commit c5be328
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/kotlin/components/Search.kt
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ fun Search(
// 先搜索当前词库
val index = vocabulary.wordList.indexOf(inputWord)
if(index != -1){
searchResult = vocabulary.wordList.get(index)
searchResult = vocabulary.wordList.get(index).deepCopy()
}
// 如果当前词库没有,或者当前词库的单词没有字幕,再搜索熟悉词库。
if((searchResult == null) || searchResult!!.value.isEmpty() ||
Expand Down

0 comments on commit c5be328

Please sign in to comment.