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"
minSdkVersion 21
targetSdkVersion 32
versionCode 111
versionName "1.7.2"
versionCode 112
versionName "1.7.3"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
resValue "string", "app_name", "Wulkanowy"
@ -160,8 +160,8 @@ kapt {
play {
defaultToAppBundles = false
track = 'production'
releaseStatus = com.github.triplet.gradle.androidpublisher.ReleaseStatus.IN_PROGRESS
userFraction = 0.05d
// releaseStatus = com.github.triplet.gradle.androidpublisher.ReleaseStatus.IN_PROGRESS
// userFraction = 0.05d
updatePriority = 5
enabled.set(false)
}
@ -186,7 +186,7 @@ ext {
}
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'

View File

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

View File

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