1
0
mirror of https://github.com/wulkanowy/wulkanowy.git synced 2025-02-07 22:04:36 +01:00

Merge branch 'release/1.7.3'

This commit is contained in:
Mikołaj Pich 2022-08-31 19:31:33 +02:00
commit e6571a1dfc
4 changed files with 13 additions and 10 deletions

View File

@ -23,8 +23,8 @@ android {
testApplicationId "io.github.tests.wulkanowy" testApplicationId "io.github.tests.wulkanowy"
minSdkVersion 21 minSdkVersion 21
targetSdkVersion 32 targetSdkVersion 32
versionCode 111 versionCode 112
versionName "1.7.2" versionName "1.7.3"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
resValue "string", "app_name", "Wulkanowy" resValue "string", "app_name", "Wulkanowy"
@ -160,8 +160,8 @@ kapt {
play { play {
defaultToAppBundles = false defaultToAppBundles = false
track = 'production' track = 'production'
releaseStatus = com.github.triplet.gradle.androidpublisher.ReleaseStatus.IN_PROGRESS // releaseStatus = com.github.triplet.gradle.androidpublisher.ReleaseStatus.IN_PROGRESS
userFraction = 0.05d // userFraction = 0.05d
updatePriority = 5 updatePriority = 5
enabled.set(false) enabled.set(false)
} }
@ -186,7 +186,7 @@ ext {
} }
dependencies { dependencies {
implementation "io.github.wulkanowy:sdk:1.7.2" implementation "io.github.wulkanowy:sdk:1.7.3"
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.8' coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.8'

View File

@ -64,7 +64,10 @@ class MessageRepository @Inject constructor(
}, },
query = { messagesDb.loadAll(mailbox.globalKey, folder.id) }, query = { messagesDb.loadAll(mailbox.globalKey, folder.id) },
fetch = { fetch = {
sdk.init(student).getMessages(Folder.valueOf(folder.name)).mapToEntities(mailbox) sdk.init(student).getMessages(
folder = Folder.valueOf(folder.name),
mailboxKey = mailbox.globalKey,
).mapToEntities(mailbox)
}, },
saveFetchResult = { old, new -> saveFetchResult = { old, new ->
messagesDb.deleteAll(old uniqueSubtract new) messagesDb.deleteAll(old uniqueSubtract new)
@ -89,7 +92,7 @@ class MessageRepository @Inject constructor(
}, },
query = { messagesDb.loadMessageWithAttachment(message.messageGlobalKey) }, query = { messagesDb.loadMessageWithAttachment(message.messageGlobalKey) },
fetch = { fetch = {
sdk.init(student).getMessageDetails(it!!.message.messageGlobalKey) sdk.init(student).getMessageDetails(it!!.message.messageGlobalKey, markAsRead)
}, },
saveFetchResult = { old, new -> saveFetchResult = { old, new ->
checkNotNull(old) { "Fetched message no longer exist!" } checkNotNull(old) { "Fetched message no longer exist!" }
@ -98,7 +101,7 @@ class MessageRepository @Inject constructor(
id = message.id id = message.id
unread = !markAsRead unread = !markAsRead
sender = new.sender sender = new.sender
recipients = new.recipients.firstOrNull() ?: "Wielu adresoatów" recipients = new.recipients.singleOrNull() ?: "Wielu adresatów"
content = content.ifBlank { new.content } content = content.ifBlank { new.content }
}) })
) )

View File

@ -1,4 +1,4 @@
Wersja 1.7.2 Wersja 1.7.3
- naprawiliśmy kilka błędów w obsłudze nowego modułu wiadomości - naprawiliśmy kilka błędów w obsłudze nowego modułu wiadomości

View File

@ -141,7 +141,7 @@ class MessageRepositoryTest {
messageDb.loadMessageWithAttachment("v4") messageDb.loadMessageWithAttachment("v4")
} returnsMany listOf(flowOf(mWa), flowOf(mWaWithContent)) } returnsMany listOf(flowOf(mWa), flowOf(mWaWithContent))
coEvery { coEvery {
sdk.getMessageDetails("v4") sdk.getMessageDetails("v4", any())
} returns mockk { } returns mockk {
every { sender } returns "" every { sender } returns ""
every { recipients } returns listOf("") every { recipients } returns listOf("")