diff --git a/briar b/briar index fbf0f63ff7c81d8379cd0c376aa7a348af094d5e..ec797cbd028c63f44f46e93c915633733b7a1b7c 160000 --- a/briar +++ b/briar @@ -1 +1 @@ -Subproject commit fbf0f63ff7c81d8379cd0c376aa7a348af094d5e +Subproject commit ec797cbd028c63f44f46e93c915633733b7a1b7c diff --git a/briar-desktop/src/main/kotlin/org/briarproject/briar/desktop/threadedgroup/conversation/ThreadedConversationViewModel.kt b/briar-desktop/src/main/kotlin/org/briarproject/briar/desktop/threadedgroup/conversation/ThreadedConversationViewModel.kt index b14b6456b4f761b9a586e09bd2442017b008c91a..f6691a2b32f11769c723aa5c15e534e040c2e40d 100644 --- a/briar-desktop/src/main/kotlin/org/briarproject/briar/desktop/threadedgroup/conversation/ThreadedConversationViewModel.kt +++ b/briar-desktop/src/main/kotlin/org/briarproject/briar/desktop/threadedgroup/conversation/ThreadedConversationViewModel.kt @@ -128,7 +128,7 @@ abstract class ThreadedConversationViewModel( } // we don't attach this to the transaction that actually changes the DB, // but that should be fine for this purpose of just decrementing a counter - eventBus.broadcast(ForumPostReadEvent(groupId, readIds.size)) + eventBus.broadcast(ForumPostReadEvent(groupId, readIds.size)) // todo: change for private groups // TODO replace immutable ThreadItems instead to avoid recomposing whole list val messageTree = (state.value as? Loaded)?.messageTree ?: return _state.value = Loaded(messageTree) diff --git a/briar-desktop/src/test/kotlin/org/briarproject/briar/desktop/TestMixedConversations.kt b/briar-desktop/src/test/kotlin/org/briarproject/briar/desktop/TestMixedConversations.kt index 41647e12e712bd562a201f7d497ad1db8236106a..9b9108bfb717dfb4eafc46ff77418ddef19fe665 100644 --- a/briar-desktop/src/test/kotlin/org/briarproject/briar/desktop/TestMixedConversations.kt +++ b/briar-desktop/src/test/kotlin/org/briarproject/briar/desktop/TestMixedConversations.kt @@ -20,5 +20,5 @@ package org.briarproject.briar.desktop fun main() = RunWithTemporaryAccount { getDeterministicTestDataCreator().createTestData(5, 20, 50, 10, 20) - getTestDataCreator().createTestData(5, 20, 50, 4, 10, 10) + getTestDataCreator().createTestData(5, 20, 50, 4, 10, 10, 10, 10) }.run() diff --git a/briar-desktop/src/test/kotlin/org/briarproject/briar/desktop/TestRandomConversations.kt b/briar-desktop/src/test/kotlin/org/briarproject/briar/desktop/TestRandomConversations.kt index d832d410a2aff49ba483f2a64481867a4fbbef04..dd7806bfa70cc7505597477d5aa5a58ed2f413b4 100644 --- a/briar-desktop/src/test/kotlin/org/briarproject/briar/desktop/TestRandomConversations.kt +++ b/briar-desktop/src/test/kotlin/org/briarproject/briar/desktop/TestRandomConversations.kt @@ -19,5 +19,5 @@ package org.briarproject.briar.desktop fun main() = RunWithTemporaryAccount { - getTestDataCreator().createTestData(5, 20, 50, 4, 10, 42) + getTestDataCreator().createTestData(5, 20, 50, 4, 4, 23, 4, 23) }.run() diff --git a/briar-desktop/src/test/kotlin/org/briarproject/briar/desktop/testdata/DeterministicTestDataCreatorImpl.kt b/briar-desktop/src/test/kotlin/org/briarproject/briar/desktop/testdata/DeterministicTestDataCreatorImpl.kt index 18d00fc7d85ab4b8d1b0d4c39ec3382f66dd8acb..ea06b3273348166e75d36c117f7ae32c3b1add42 100644 --- a/briar-desktop/src/test/kotlin/org/briarproject/briar/desktop/testdata/DeterministicTestDataCreatorImpl.kt +++ b/briar-desktop/src/test/kotlin/org/briarproject/briar/desktop/testdata/DeterministicTestDataCreatorImpl.kt @@ -143,7 +143,7 @@ class DeterministicTestDataCreatorImpl @Inject internal constructor( numPrivateMsgs: Int, avatarPercent: Int, numPrivateGroups: Int, - numPrivateGroupPosts: Int + numPrivateGroupPosts: Int, ) { val contacts = createContacts(numContacts, avatarPercent) createPrivateMessages(contacts, numPrivateMsgs) @@ -333,7 +333,7 @@ class DeterministicTestDataCreatorImpl @Inject internal constructor( @Throws(DbException::class) private fun createPrivateMessages( contacts: List<ContactId>, - numPrivateMsgs: Int + numPrivateMsgs: Int, ) { for (i in contacts.indices) { val contactId = contacts[i] @@ -354,7 +354,7 @@ class DeterministicTestDataCreatorImpl @Inject internal constructor( private fun createPrivateMessage( contactId: ContactId, groupId: GroupId, - message: Message + message: Message, ) { val timestamp = message.date.toEpochSecond(ZoneOffset.UTC) * 1000 val text = message.text @@ -372,7 +372,7 @@ class DeterministicTestDataCreatorImpl @Inject internal constructor( images: List<String>, timestamp: Long, local: Boolean, - autoDelete: Boolean + autoDelete: Boolean, ) { val timer = if (autoDelete) AutoDeleteConstants.MIN_AUTO_DELETE_TIMER_MS else AutoDeleteConstants.NO_AUTO_DELETE_TIMER @@ -414,7 +414,7 @@ class DeterministicTestDataCreatorImpl @Inject internal constructor( for (i in 0 until min(numPrivateGroups, GROUP_NAMES.size)) { // create private group val name = GROUP_NAMES[i] - var creator = identityManager.localAuthor + val creator = identityManager.localAuthor val privateGroup = privateGroupFactory.createPrivateGroup(name, creator) val joinMsg = groupMessageFactory.createJoinMessage( privateGroup.id, @@ -436,7 +436,7 @@ class DeterministicTestDataCreatorImpl @Inject internal constructor( private fun createRandomPrivateGroupMessages( privateGroup: PrivateGroup, contacts: List<ContactId>, - numPrivateGroupMessages: Int + numPrivateGroupMessages: Int, ) { // TODO }