Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision
  • ChenZhangg-Modify_GRADLE_1
  • attachments
  • demo-jump-in-history
  • jetpack-compose-rewrite
  • main
  • wip
  • 1.4.0
  • 1.4.1
  • 1.4.2
  • 1.4.3
  • 1.4.4
  • 1.5.0
  • 1.5.1
  • 1.5.2
  • 1.5.3
  • 1.6.0
  • 1.6.1
  • 1.6.2
  • 1.7.0
  • v0.2.0
  • v0.3.0
  • v0.4.0
  • v0.5.0
  • v1.0.0
  • v1.0.1
  • v1.0.10
  • v1.0.11
  • v1.0.12
  • v1.0.13
  • v1.0.14
  • v1.0.15
  • v1.0.16
  • v1.0.17
  • v1.0.18
  • v1.0.19
  • v1.0.2
  • v1.0.20
  • v1.0.21
  • v1.0.22
  • v1.0.23
  • v1.0.25
  • v1.0.26
  • v1.0.27
  • v1.0.28
  • v1.0.29
  • v1.0.3
  • v1.0.31
  • v1.0.35
  • v1.0.36
  • v1.0.37
  • v1.0.38
  • v1.0.39
  • v1.0.4
  • v1.0.40
  • v1.0.41
  • v1.0.42
  • v1.0.43
  • v1.0.44
  • v1.0.45
  • v1.0.5
  • v1.0.6
  • v1.0.7
  • v1.0.8
  • v1.0.9
  • v1.1.0
  • v1.1.1
  • v1.1.2
  • v1.1.3
  • v1.1.4
  • v1.2.1
  • v1.2.10
  • v1.2.11
  • v1.2.12
  • v1.2.13
  • v1.2.14
  • v1.2.15
  • v1.2.16
  • v1.2.17
  • v1.2.18
  • v1.2.19
  • v1.2.2
  • v1.2.20
  • v1.2.21
  • v1.2.22
  • v1.2.23
  • v1.2.24
  • v1.2.25
  • v1.2.26
  • v1.2.27
  • v1.2.28
  • v1.2.3
  • v1.2.4
  • v1.2.5
  • v1.2.6
  • v1.2.7
  • v1.2.9
  • v1.3.0
  • v1.3.1
  • v1.3.2
  • v1.3.3
100 results

Target

Select target project
  • justJanne/QuasselDroid-ng
1 result
Select Git revision
  • ChenZhangg-Modify_GRADLE_1
  • attachments
  • demo-jump-in-history
  • jetpack-compose-rewrite
  • main
  • wip
  • 1.4.0
  • 1.4.1
  • 1.4.2
  • 1.4.3
  • 1.4.4
  • 1.5.0
  • 1.5.1
  • 1.5.2
  • 1.5.3
  • 1.6.0
  • 1.6.1
  • 1.6.2
  • 1.7.0
  • v0.2.0
  • v0.3.0
  • v0.4.0
  • v0.5.0
  • v1.0.0
  • v1.0.1
  • v1.0.10
  • v1.0.11
  • v1.0.12
  • v1.0.13
  • v1.0.14
  • v1.0.15
  • v1.0.16
  • v1.0.17
  • v1.0.18
  • v1.0.19
  • v1.0.2
  • v1.0.20
  • v1.0.21
  • v1.0.22
  • v1.0.23
  • v1.0.25
  • v1.0.26
  • v1.0.27
  • v1.0.28
  • v1.0.29
  • v1.0.3
  • v1.0.31
  • v1.0.35
  • v1.0.36
  • v1.0.37
  • v1.0.38
  • v1.0.39
  • v1.0.4
  • v1.0.40
  • v1.0.41
  • v1.0.42
  • v1.0.43
  • v1.0.44
  • v1.0.45
  • v1.0.5
  • v1.0.6
  • v1.0.7
  • v1.0.8
  • v1.0.9
  • v1.1.0
  • v1.1.1
  • v1.1.2
  • v1.1.3
  • v1.1.4
  • v1.2.1
  • v1.2.10
  • v1.2.11
  • v1.2.12
  • v1.2.13
  • v1.2.14
  • v1.2.15
  • v1.2.16
  • v1.2.17
  • v1.2.18
  • v1.2.19
  • v1.2.2
  • v1.2.20
  • v1.2.21
  • v1.2.22
  • v1.2.23
  • v1.2.24
  • v1.2.25
  • v1.2.26
  • v1.2.27
  • v1.2.28
  • v1.2.3
  • v1.2.4
  • v1.2.5
  • v1.2.6
  • v1.2.7
  • v1.2.9
  • v1.3.0
  • v1.3.1
  • v1.3.2
  • v1.3.3
100 results
Show changes

Commits on Source 2

......@@ -38,6 +38,7 @@ class AvatarHelperTest {
bufferId = BufferId(0),
networkId = NetworkId(0),
currentBufferId = BufferId(0),
currentBufferType = Buffer_Type.of(),
sender = "justJanne",
senderPrefixes = "",
realName = "Janne Mareike Koschinski <janne@kuschku.de>",
......@@ -79,6 +80,7 @@ class AvatarHelperTest {
bufferId = BufferId(0),
networkId = NetworkId(0),
currentBufferId = BufferId(0),
currentBufferType = Buffer_Type.of(),
sender = "jwheare!sid2@irccloud.com",
senderPrefixes = "",
realName = "James Wheare",
......@@ -120,6 +122,7 @@ class AvatarHelperTest {
bufferId = BufferId(0),
networkId = NetworkId(0),
currentBufferId = BufferId(0),
currentBufferType = Buffer_Type.of(),
sender = "jwheare!sid2@irccloud.com",
senderPrefixes = "",
realName = "James Wheare",
......
......@@ -44,7 +44,7 @@ interface MessageDao {
@Query("SELECT * FROM message WHERE bufferId = :bufferId ORDER BY messageId ASC")
fun _findByBufferId(bufferId: BufferId_Type): List<MessageData>
@Query("SELECT * FROM message WHERE (bufferId = :bufferId AND type & ~ :type > 0 AND ignored = 0) OR (networkId = :networkId AND type & 2 > 0 AND ignored = 0 AND currentBufferId = :bufferId AND :showUserNotices != 0) OR (bufferId = :serverBufferId AND type & 2 > 0 AND ignored = 0 AND currentBufferId = :bufferId AND :showServerNotices != 0) OR (bufferId = :serverBufferId AND type & 4096 > 0 AND ignored = 0 AND currentBufferId = :bufferId AND :showErrors != 0) ORDER BY messageId DESC")
@Query("SELECT * FROM message WHERE (bufferId = :bufferId AND type & ~ :type > 0 AND ignored = 0) OR (networkId = :networkId AND type & 2 > 0 AND ignored = 0 AND currentBufferId = :bufferId AND currentBufferType = 4 AND :showUserNotices != 0) OR (bufferId = :serverBufferId AND type & 2 > 0 AND ignored = 0 AND currentBufferId = :bufferId AND currentBufferType = 1 AND :showServerNotices != 0) OR (bufferId = :serverBufferId AND type & 4096 > 0 AND ignored = 0 AND currentBufferId = :bufferId AND :showErrors != 0) ORDER BY messageId DESC")
fun _findByBufferIdPaged(networkId: NetworkId_Type, serverBufferId: BufferId_Type,
bufferId: BufferId_Type, type: Int,
showUserNotices: Boolean, showServerNotices: Boolean,
......@@ -59,7 +59,7 @@ interface MessageDao {
@Query("SELECT messageId FROM message WHERE bufferId = :bufferId ORDER BY messageId ASC LIMIT 1")
fun _firstMsgId(bufferId: BufferId_Type): Flowable<MsgId_Type>
@Query("SELECT messageId FROM message WHERE (bufferId = :bufferId AND type & ~ :type > 0 AND ignored = 0) OR (networkId = :networkId AND type & 2 > 0 AND ignored = 0 AND currentBufferId = :bufferId AND :showUserNotices != 0) OR (bufferId = :serverBufferId AND type & 2 > 0 AND ignored = 0 AND currentBufferId = :bufferId AND :showServerNotices != 0) OR (bufferId = :serverBufferId AND type & 4096 > 0 AND ignored = 0 AND currentBufferId = :bufferId AND :showErrors != 0) ORDER BY messageId ASC LIMIT 1")
@Query("SELECT messageId FROM message WHERE (bufferId = :bufferId AND type & ~ :type > 0 AND ignored = 0) OR (networkId = :networkId AND type & 2 > 0 AND ignored = 0 AND currentBufferId = :bufferId AND currentBufferType = 4 AND :showUserNotices != 0) OR (bufferId = :serverBufferId AND type & 2 > 0 AND ignored = 0 AND currentBufferId = :bufferId AND currentBufferType = 1 AND :showServerNotices != 0) OR (bufferId = :serverBufferId AND type & 4096 > 0 AND ignored = 0 AND currentBufferId = :bufferId AND :showErrors != 0) ORDER BY messageId ASC LIMIT 1")
fun _firstVisibleMsgId(networkId: NetworkId_Type, serverBufferId: BufferId_Type,
bufferId: BufferId_Type, type: Int,
showUserNotices: Boolean, showServerNotices: Boolean,
......@@ -68,7 +68,7 @@ interface MessageDao {
@Query("SELECT * FROM message WHERE bufferId = :bufferId ORDER BY messageId ASC LIMIT 1")
fun _findFirstByBufferId(bufferId: BufferId_Type): MessageData?
@Query("SELECT EXISTS(SELECT 1 FROM message WHERE (bufferId = :bufferId AND type & ~ :type > 0 AND ignored = 0) OR (networkId = :networkId AND type & 2 > 0 AND ignored = 0 AND currentBufferId = :bufferId AND :showUserNotices != 0) OR (bufferId = :serverBufferId AND type & 2 > 0 AND ignored = 0 AND currentBufferId = :bufferId AND :showServerNotices != 0) OR (bufferId = :serverBufferId AND type & 4096 > 0 AND ignored = 0 AND currentBufferId = :bufferId AND :showErrors != 0))")
@Query("SELECT EXISTS(SELECT 1 FROM message WHERE (bufferId = :bufferId AND type & ~ :type > 0 AND ignored = 0) OR (networkId = :networkId AND type & 2 > 0 AND ignored = 0 AND currentBufferId = :bufferId AND currentBufferType = 4 AND :showUserNotices != 0) OR (bufferId = :serverBufferId AND type & 2 > 0 AND ignored = 0 AND currentBufferId = :bufferId AND currentBufferType = 1 AND :showServerNotices != 0) OR (bufferId = :serverBufferId AND type & 4096 > 0 AND ignored = 0 AND currentBufferId = :bufferId AND :showErrors != 0))")
fun _hasVisibleMessages(networkId: NetworkId_Type, serverBufferId: BufferId_Type,
bufferId: BufferId_Type, type: Int,
showUserNotices: Boolean, showServerNotices: Boolean,
......
......@@ -30,7 +30,7 @@ import de.kuschku.quasseldroid.persistence.models.*
import de.kuschku.quasseldroid.persistence.util.MessageTypeConverter
@Database(entities = [MessageData::class, Filtered::class, SslValidityWhitelistEntry::class, SslHostnameWhitelistEntry::class, NotificationData::class],
version = 20)
version = 21)
@TypeConverters(MessageTypeConverter::class)
abstract class QuasselDatabase : RoomDatabase() {
abstract fun message(): MessageDao
......@@ -164,6 +164,12 @@ abstract class QuasselDatabase : RoomDatabase() {
database.execSQL("CREATE INDEX index_message_currentBufferId ON message(currentBufferId);")
database.execSQL("CREATE INDEX index_message_networkId ON message(networkId);")
}
},
object : Migration(20, 21) {
override fun migrate(database: SupportSQLiteDatabase) {
database.execSQL("ALTER TABLE message ADD currentBufferType INT DEFAULT 0 NOT NULL;")
database.execSQL("CREATE INDEX index_message_currentBufferType ON message(currentBufferType);")
}
}
).build()
}
......
......@@ -28,7 +28,14 @@ import de.kuschku.libquassel.protocol.*
import org.threeten.bp.Instant
import java.io.Serializable
@Entity(tableName = "message", indices = [Index("bufferId"), Index("ignored"), Index("currentBufferId"), Index("networkId")])
@Entity(tableName = "message",
indices = [
Index("bufferId"),
Index("ignored"),
Index("currentBufferId"),
Index("currentBufferType"),
Index("networkId")
])
data class MessageData(
@PrimaryKey
@ColumnInfo(name = "messageId")
......@@ -40,6 +47,7 @@ data class MessageData(
var rawBufferId: BufferId_Type,
@ColumnInfo(name = "currentBufferId")
var rawCurrentBufferId: BufferId_Type,
var currentBufferType: Buffer_Types,
@ColumnInfo(name = "networkId")
var rawNetworkId: NetworkId_Type,
var sender: String,
......@@ -65,6 +73,7 @@ data class MessageData(
type: Message_Types,
flag: Message_Flags,
bufferId: BufferId,
currentBufferType: Buffer_Types,
networkId: NetworkId,
currentBufferId: BufferId,
sender: String,
......@@ -80,6 +89,7 @@ data class MessageData(
flag,
bufferId.id,
currentBufferId.id,
currentBufferType,
networkId.id,
sender,
senderPrefixes,
......
......@@ -20,13 +20,11 @@
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
......@@ -55,10 +53,8 @@ class QuasselBacklogStorage(private val db: QuasselDatabase) : BacklogStorage {
type = it.type,
flag = it.flag,
bufferId = it.bufferInfo.bufferId,
currentBufferId =
if (it.bufferInfo.type.hasFlag(Buffer_Type.QueryBuffer) ||
it.bufferInfo.type.hasFlag(Buffer_Type.StatusBuffer)) currentBuffer.value
else BufferId(0),
currentBufferId = currentBuffer.value,
currentBufferType = it.bufferInfo.type,
networkId = it.bufferInfo.networkId,
sender = it.sender,
senderPrefixes = it.senderPrefixes,
......