Fixes buffer search not working

parent fc4fdf28
Pipeline #494 canceled with stages
in 0 seconds
......@@ -365,8 +365,8 @@ class ChatActivity : ServiceBoundActivity(), SharedPreferences.OnSharedPreferenc
accountDatabase.accounts().listenDefaultFiltered(accountId, 0).toObservable()
)
val maxBufferActivity = modelHelper.processRawBufferList(modelHelper.bufferViewConfig,
filtered).map { (config, bufferList) ->
val maxBufferActivity = modelHelper.processBufferList(modelHelper.bufferViewConfig,
filtered).map { (config, bufferList) ->
val minimumActivity: Buffer_Activity = config?.minimumActivity()?.enabledValues()?.max()
?: Buffer_Activity.NoActivity
......
......@@ -66,7 +66,6 @@ import de.kuschku.quasseldroid.util.service.ServiceBoundFragment
import de.kuschku.quasseldroid.util.ui.BetterLinkMovementMethod
import de.kuschku.quasseldroid.util.ui.LinkLongClickMenuHelper
import de.kuschku.quasseldroid.viewmodel.data.Avatar
import de.kuschku.quasseldroid.viewmodel.data.BufferHiddenState
import de.kuschku.quasseldroid.viewmodel.data.BufferProps
import de.kuschku.quasseldroid.viewmodel.data.BufferStatus
import de.kuschku.quasseldroid.viewmodel.helper.EditorViewModelHelper
......@@ -241,7 +240,6 @@ class UserInfoFragment : ServiceBoundFragment() {
description = it.topic(),
activity = Message_Type.of(),
bufferStatus = bufferStatus,
hiddenState = BufferHiddenState.VISIBLE,
networkConnectionState = user.network().connectionState(),
fallbackDrawable = fallbackDrawable
)
......
......@@ -37,7 +37,6 @@ data class BufferProps(
val bufferActivity: Buffer_Activities = BufferInfo.Activity.of(
BufferInfo.Activity.NoActivity
),
val hiddenState: BufferHiddenState,
val ircUser: IrcUser? = null,
val avatarUrls: List<Avatar> = emptyList(),
val fallbackDrawable: Drawable? = null,
......@@ -57,7 +56,6 @@ data class BufferProps(
if (activity != other.activity) return false
if (highlights != other.highlights) return false
if (bufferActivity != other.bufferActivity) return false
if (hiddenState != other.hiddenState) return false
if (ircUser != other.ircUser) return false
if (avatarUrls != other.avatarUrls) return false
......@@ -73,7 +71,6 @@ data class BufferProps(
result = 31 * result + activity.hashCode()
result = 31 * result + highlights
result = 31 * result + bufferActivity.hashCode()
result = 31 * result + hiddenState.hashCode()
result = 31 * result + (ircUser?.hashCode() ?: 0)
result = 31 * result + avatarUrls.hashCode()
return result
......
......@@ -45,7 +45,7 @@ open class ArchiveViewModelHelper @Inject constructor(
showHandle: Boolean,
filtered: Observable<Pair<Map<BufferId, Int>, Int>>
) = filterBufferList(
processRawBufferList(
processBufferList(
bufferViewConfig,
filtered,
bufferListType = bufferListType,
......@@ -60,5 +60,5 @@ open class ArchiveViewModelHelper @Inject constructor(
showHandle
)
val selectedBuffer = processSelectedBuffer(archive.selectedBufferId, bufferViewConfig)
val selectedBuffer = processSelectedBuffer(archive.selectedBufferId)
}
......@@ -170,14 +170,18 @@ open class ChatViewModelHelper @Inject constructor(
val nickDataThrottled =
nickData.distinctUntilChanged().throttleLast(100, TimeUnit.MILLISECONDS)
val selectedBuffer = processSelectedBuffer(chat.selectedBufferId, bufferViewConfig)
val selectedBuffer = processSelectedBuffer(chat.selectedBufferId)
fun processChatBufferList(
filtered: Observable<Pair<Map<BufferId, Int>, Int>>
) = filterBufferList(
processRawBufferList(bufferViewConfig, filtered),
processBufferList(
bufferViewConfig,
filtered,
bufferSearch = chat.bufferSearch
),
chat.expandedNetworks,
chat.selectedBufferId,
false
showHandle = false
)
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment