Skip to content
Snippets Groups Projects
Commit fb9c7ab5 authored by Janne Mareike Koschinski's avatar Janne Mareike Koschinski
Browse files

Fixed an off-by-one error in the new autocomplete, removed debug code

parent acde6228
No related branches found
No related tags found
No related merge requests found
......@@ -38,8 +38,8 @@ class AutoCompleteAdapter(
runInBackground {
val word = it?.first ?: ""
val list = it?.second ?: emptyList()
val old: List<AutoCompleteItem> = if (word.length >= 3) list else emptyList()
val new: List<AutoCompleteItem> = list
val old: List<AutoCompleteItem> = data
val new: List<AutoCompleteItem> = if (word.length >= 3) list else emptyList()
val result = DiffUtil.calculateDiff(
object : DiffUtil.Callback() {
override fun areItemsTheSame(oldItemPosition: Int, newItemPosition: Int) =
......
......@@ -137,7 +137,6 @@ class ChatActivity : ServiceBoundActivity(), SharedPreferences.OnSharedPreferenc
}
}
println(next ?: Pair("", IntRange.EMPTY))
lastWord.onNext(next ?: Pair("", IntRange.EMPTY))
}
......
......@@ -109,7 +109,6 @@ class IrcFormatSerializer internal constructor(private val context: Context) {
}
fun writeReset() {
println("reset")
out.append(CODE_RESET)
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment