Commit 8b16e1c8 authored by Janne Koschinski's avatar Janne Koschinski

Fixes an issue where channel notices were also redirected

parent 60f1776e
Pipeline #504 passed with stages
in 38 minutes and 48 seconds
......@@ -20,11 +20,13 @@
package de.kuschku.quasseldroid.persistence.util
import de.kuschku.libquassel.protocol.BufferId
import de.kuschku.libquassel.protocol.Buffer_Type
import de.kuschku.libquassel.protocol.Message
import de.kuschku.libquassel.protocol.NetworkId
import de.kuschku.libquassel.quassel.syncables.IgnoreListManager
import de.kuschku.libquassel.session.BacklogStorage
import de.kuschku.libquassel.session.ISession
import de.kuschku.libquassel.util.flag.hasFlag
import de.kuschku.quasseldroid.persistence.db.QuasselDatabase
import de.kuschku.quasseldroid.persistence.models.MessageData
import io.reactivex.subjects.BehaviorSubject
......@@ -53,7 +55,10 @@ class QuasselBacklogStorage(private val db: QuasselDatabase) : BacklogStorage {
type = it.type,
flag = it.flag,
bufferId = it.bufferInfo.bufferId,
currentBufferId = currentBuffer.value,
currentBufferId =
if (it.bufferInfo.type.hasFlag(Buffer_Type.QueryBuffer) ||
it.bufferInfo.type.hasFlag(Buffer_Type.StatusBuffer)) currentBuffer.value
else BufferId(0),
networkId = it.bufferInfo.networkId,
sender = it.sender,
senderPrefixes = it.senderPrefixes,
......
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