Merge branch 'vector-im:develop' into develop

This commit is contained in:
hanthor 2022-05-05 12:23:46 -04:00 committed by GitHub
commit 6cd92a5d77
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
47 changed files with 117 additions and 44 deletions

View File

@ -1,3 +1,58 @@
Changes in Element v1.4.14 (2022-05-05)
=======================================
Features ✨
----------
- Improve management of ignored users ([#5772](https://github.com/vector-im/element-android/issues/5772))
- VoIP Screen Sharing Permission ([#5811](https://github.com/vector-im/element-android/issues/5811))
- Live location sharing: updating beacon state event content structure ([#5814](https://github.com/vector-im/element-android/issues/5814))
Bugfixes 🐛
----------
- Fixes crash when accepting or receiving VOIP calls ([#5421](https://github.com/vector-im/element-android/issues/5421))
- Improve/fix crashes on messages decryption ([#5592](https://github.com/vector-im/element-android/issues/5592))
- Tentative fix of images crashing when being sent or shared from gallery ([#5652](https://github.com/vector-im/element-android/issues/5652))
- Improving deactivation experience along with a crash fix ([#5721](https://github.com/vector-im/element-android/issues/5721))
- Adds missing suggested tag for rooms in Explore Space ([#5826](https://github.com/vector-im/element-android/issues/5826))
- Fixes missing call icons when threads are enabled ([#5847](https://github.com/vector-im/element-android/issues/5847))
- Fix UX freezing when creating secure backup ([#5871](https://github.com/vector-im/element-android/issues/5871))
- Fixes sign in via other requiring homeserver registration to be enabled ([#5874](https://github.com/vector-im/element-android/issues/5874))
- Don't pause timer when call is held. ([#5885](https://github.com/vector-im/element-android/issues/5885))
- Fix UISIDetector grace period bug ([#5886](https://github.com/vector-im/element-android/issues/5886))
- Fix a crash with space invitations in the space list, and do not display space invitation twice. ([#5924](https://github.com/vector-im/element-android/issues/5924))
- Fixes crash on android api 21/22 devices when opening messages due to Konfetti library ([#5925](https://github.com/vector-im/element-android/issues/5925))
In development 🚧
----------------
- Reorders the registration steps to prioritise email, then terms for the FTUE onboarding ([#5783](https://github.com/vector-im/element-android/issues/5783))
- [Live location sharing] Improve aggregation process of events ([#5862](https://github.com/vector-im/element-android/issues/5862))
Improved Documentation 📚
------------------------
- Update the PR process doc with 2 reviewers and a new reviewer team. ([#5836](https://github.com/vector-im/element-android/issues/5836))
- Improve documentation of the project and of the SDK ([#5854](https://github.com/vector-im/element-android/issues/5854))
SDK API changes ⚠️
------------------
- Added registrationCustom into RegistrationWizard to send custom auth params for sign up
- Moved terms converter into api package to make it accessible in sdk ([#5575](https://github.com/vector-im/element-android/issues/5575))
- Move package `org.matrix.android.sdk.api.pushrules` to `org.matrix.android.sdk.api.session.pushrules` ([#5812](https://github.com/vector-im/element-android/issues/5812))
- Some `Session` apis are now available by requesting the service first. For instance `Session.updateAvatar(...)` is now `Session.profileService().updateAvatar(...)`
- The shortcut `Room.search()` has been removed, you have to use `Session.searchService().search()` ([#5816](https://github.com/vector-im/element-android/issues/5816))
- Add return type to RoomApi.sendStateEvent() to retrieve the created event id ([#5855](https://github.com/vector-im/element-android/issues/5855))
- `Room` apis are now available by requesting the service first. For instance `Room.updateAvatar(...)` is now `Room.stateService().updateAvatar(...)` ([#5858](https://github.com/vector-im/element-android/issues/5858))
- Remove unecessary field `eventId` from `EventAnnotationsSummary` and `ReferencesAggregatedSummary` ([#5890](https://github.com/vector-im/element-android/issues/5890))
- Replace usage of `System.currentTimeMillis()` by a `Clock` interface ([#5907](https://github.com/vector-im/element-android/issues/5907))
Other changes
-------------
- Move "Ignored users" setting section into "Security & Privacy" ([#5773](https://github.com/vector-im/element-android/issues/5773))
- Add a picto for ignored users in the room member list screen ([#5774](https://github.com/vector-im/element-android/issues/5774))
- Autoformats entire project ([#5805](https://github.com/vector-im/element-android/issues/5805))
- Add a GH workflow to push ElementX issues to the global board. ([#5832](https://github.com/vector-im/element-android/issues/5832))
- Faster Olm decrypt when there is a lot of existing sessions ([#5872](https://github.com/vector-im/element-android/issues/5872))
Changes in Element 1.4.13 (2022-04-26)
======================================

1
changelog.d/46312.misc Normal file
View File

@ -0,0 +1 @@
Notify the user for each new message

View File

@ -1 +0,0 @@
Fixes crash when accepting or receiving VOIP calls

View File

@ -1,2 +0,0 @@
- Added registrationCustom into RegistrationWizard to send custom auth params for sign up
- Moved terms converter into api package to make it accessible in sdk

View File

@ -1 +0,0 @@
Improve/fix crashes on messages decryption

View File

@ -1 +0,0 @@
Tentative fix of images crashing when being sent or shared from gallery

View File

@ -1 +0,0 @@
Improving deactivation experience along with a crash fix

View File

@ -1 +0,0 @@
Improve management of ignored users

View File

@ -1 +0,0 @@
Move "Ignored users" setting section into "Security & Privacy"

View File

@ -1 +0,0 @@
Add a picto for ignored users in the room member list screen

View File

@ -1 +0,0 @@
Reorders the registration steps to prioritise email, then terms for the FTUE onboarding

View File

@ -1 +0,0 @@
Autoformats entire project

View File

@ -1 +0,0 @@
VoIP Screen Sharing Permission

View File

@ -1 +0,0 @@
Move package `org.matrix.android.sdk.api.pushrules` to `org.matrix.android.sdk.api.session.pushrules`

View File

@ -1 +0,0 @@
Live location sharing: updating beacon state event content structure

View File

@ -1,2 +0,0 @@
Some `Session` apis are now available by requesting the service first. For instance `Session.updateAvatar(...)` is now `Session.profileService().updateAvatar(...)`
The shortcut `Room.search()` has been removed, you have to use `Session.searchService().search()`

View File

@ -1 +0,0 @@
Adds missing suggested tag for rooms in Explore Space

View File

@ -1 +0,0 @@
Add a GH workflow to push ElementX issues to the global board.

View File

@ -1 +0,0 @@
Update the PR process doc with 2 reviewers and a new reviewer team.

View File

@ -1 +0,0 @@
Fixes missing call icons when threads are enabled

View File

@ -1 +0,0 @@
Improve documentation of the project and of the SDK

View File

@ -1 +0,0 @@
- Add return type to RoomApi.sendStateEvent() to retrieve the created event id

View File

@ -1 +0,0 @@
`Room` apis are now available by requesting the service first. For instance `Room.updateAvatar(...)` is now `Room.stateService().updateAvatar(...)`

View File

@ -1 +0,0 @@
[Live location sharing] Improve aggregation process of events

View File

@ -1 +0,0 @@
Fix UX freezing when creating secure backup

View File

@ -1 +0,0 @@
Faster Olm decrypt when there is a lot of existing sessions

View File

@ -1 +0,0 @@
Fixes sign in via other requiring homeserver registration to be enabled

View File

@ -1 +0,0 @@
Don't pause timer when call is held.

View File

@ -1 +0,0 @@
Fix UISIDetector grace period bug

View File

@ -1 +0,0 @@
Remove unecessary field `eventId` from `EventAnnotationsSummary` and `ReferencesAggregatedSummary`

View File

@ -1 +0,0 @@
Replace usage of `System.currentTimeMillis()` by a `Clock` interface

View File

@ -1 +0,0 @@
Fix a crash with space invitations in the space list, and do not display space invitation twice.

View File

@ -1 +0,0 @@
Fixes crash on android api 21/22 devices when opening messages due to Konfetti library

View File

@ -0,0 +1,2 @@
Main changes in this version: Improve management of ignored users. Various bug fixes and stability improvements.
Full changelog: https://github.com/vector-im/element-android/releases

View File

@ -53,7 +53,7 @@ android {
// that the app's state is completely cleared between tests.
testInstrumentationRunnerArguments clearPackageData: 'true'
buildConfigField "String", "SDK_VERSION", "\"1.4.14\""
buildConfigField "String", "SDK_VERSION", "\"1.4.16\""
buildConfigField "String", "GIT_SDK_REVISION", "\"${gitRevision()}\""
buildConfigField "String", "GIT_SDK_REVISION_UNIX_DATE", "\"${gitRevisionUnixDate()}\""

View File

@ -45,6 +45,7 @@ import org.matrix.android.sdk.internal.database.migration.MigrateSessionTo024
import org.matrix.android.sdk.internal.database.migration.MigrateSessionTo025
import org.matrix.android.sdk.internal.database.migration.MigrateSessionTo026
import org.matrix.android.sdk.internal.database.migration.MigrateSessionTo027
import org.matrix.android.sdk.internal.database.migration.MigrateSessionTo028
import org.matrix.android.sdk.internal.util.Normalizer
import timber.log.Timber
import javax.inject.Inject
@ -59,7 +60,7 @@ internal class RealmSessionStoreMigration @Inject constructor(
override fun equals(other: Any?) = other is RealmSessionStoreMigration
override fun hashCode() = 1000
val schemaVersion = 27L
val schemaVersion = 28L
override fun migrate(realm: DynamicRealm, oldVersion: Long, newVersion: Long) {
Timber.d("Migrating Realm Session from $oldVersion to $newVersion")
@ -91,5 +92,6 @@ internal class RealmSessionStoreMigration @Inject constructor(
if (oldVersion < 25) MigrateSessionTo025(realm).perform()
if (oldVersion < 26) MigrateSessionTo026(realm).perform()
if (oldVersion < 27) MigrateSessionTo027(realm).perform()
if (oldVersion < 28) MigrateSessionTo028(realm).perform()
}
}

View File

@ -0,0 +1,34 @@
/*
* Copyright (c) 2022 The Matrix.org Foundation C.I.C.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.matrix.android.sdk.internal.database.migration
import io.realm.DynamicRealm
import org.matrix.android.sdk.internal.database.model.livelocation.LiveLocationShareAggregatedSummaryEntityFields
import org.matrix.android.sdk.internal.util.database.RealmMigrator
/**
* Migrating to:
* Live location sharing aggregated summary
*/
internal class MigrateSessionTo028(realm: DynamicRealm) : RealmMigrator(realm, 28) {
override fun doMigrate(realm: DynamicRealm) {
realm.schema.get("LiveLocationShareAggregatedSummaryEntity")
?.takeIf { !it.hasPrimaryKey() }
?.addPrimaryKey(LiveLocationShareAggregatedSummaryEntityFields.EVENT_ID)
}
}

View File

@ -18,7 +18,7 @@ ext.versionMinor = 4
// Note: even values are reserved for regular release, odd values for hotfix release.
// When creating a hotfix, you should decrease the value, since the current value
// is the value for the next regular release.
ext.versionPatch = 14
ext.versionPatch = 16
static def getGitTimestamp() {
def cmd = 'git show -s --format=%ct'

View File

@ -28,5 +28,6 @@ data class InviteNotifiableEvent(
val type: String?,
val timestamp: Long,
val soundName: String?,
override val isRedacted: Boolean = false
override val isRedacted: Boolean = false,
override val isUpdated: Boolean = false
) : NotifiableEvent

View File

@ -27,4 +27,5 @@ sealed interface NotifiableEvent : Serializable {
// Used to know if event should be replaced with the one coming from eventstream
val canBeReplaced: Boolean
val isRedacted: Boolean
val isUpdated: Boolean
}

View File

@ -38,7 +38,8 @@ data class NotifiableMessageEvent(
// This is used for >N notification, as the result of a smart reply
val outGoingMessage: Boolean = false,
val outGoingMessageFailed: Boolean = false,
override val isRedacted: Boolean = false
override val isRedacted: Boolean = false,
override val isUpdated: Boolean = false
) : NotifiableEvent {
val type: String = EventType.MESSAGE

View File

@ -112,7 +112,13 @@ data class NotificationEventQueue(
private fun replace(replace: NotifiableEvent, with: NotifiableEvent) {
queue.remove(replace)
queue.add(with)
queue.add(
when (with) {
is InviteNotifiableEvent -> with.copy(isUpdated = true)
is NotifiableMessageEvent -> with.copy(isUpdated = true)
is SimpleNotifiableEvent -> with.copy(isUpdated = true)
}
)
}
fun clearMemberShipNotificationForRoom(roomId: String) {

View File

@ -592,7 +592,7 @@ class NotificationUtils @Inject constructor(
val channelID = if (roomInfo.shouldBing) NOISY_NOTIFICATION_CHANNEL_ID else SILENT_NOTIFICATION_CHANNEL_ID
return NotificationCompat.Builder(context, channelID)
.setOnlyAlertOnce(true)
.setOnlyAlertOnce(roomInfo.isUpdated)
.setWhen(lastMessageTimestamp)
// MESSAGING_STYLE sets title and content for API 16 and above devices.
.setStyle(messageStyle)

View File

@ -31,4 +31,5 @@ data class RoomEventGroupInfo(
var shouldBing: Boolean = false
var customSound: String? = null
var hasSmartReplyError: Boolean = false
var isUpdated: Boolean = false
}

View File

@ -72,6 +72,7 @@ class RoomGroupMessageCreator @Inject constructor(
it.hasSmartReplyError = smartReplyErrors.isNotEmpty()
it.shouldBing = meta.shouldBing
it.customSound = events.last().soundName
it.isUpdated = events.last().isUpdated
},
largeIcon = largeBitmap,
lastMessageTimestamp,

View File

@ -26,5 +26,6 @@ data class SimpleNotifiableEvent(
val timestamp: Long,
val soundName: String?,
override var canBeReplaced: Boolean,
override val isRedacted: Boolean = false
override val isRedacted: Boolean = false,
override val isUpdated: Boolean = false
) : NotifiableEvent

View File

@ -145,7 +145,7 @@ class NotificationEventQueueTest {
@Test
fun `given replaceable event when adding event with same id then updates existing event`() {
val replaceableEvent = aSimpleNotifiableEvent(canBeReplaced = true)
val updatedEvent = replaceableEvent.copy(title = "updated title")
val updatedEvent = replaceableEvent.copy(title = "updated title", isUpdated = true)
val queue = givenQueue(listOf(replaceableEvent))
queue.add(updatedEvent)
@ -167,7 +167,7 @@ class NotificationEventQueueTest {
@Test
fun `given event when adding new event with edited event id matching the existing event id then updates existing event`() {
val editedEvent = aSimpleNotifiableEvent(eventId = "id-to-edit")
val updatedEvent = editedEvent.copy(eventId = "1", editedEventId = "id-to-edit", title = "updated title")
val updatedEvent = editedEvent.copy(eventId = "1", editedEventId = "id-to-edit", title = "updated title", isUpdated = true)
val queue = givenQueue(listOf(editedEvent))
queue.add(updatedEvent)
@ -178,7 +178,7 @@ class NotificationEventQueueTest {
@Test
fun `given event when adding new event with edited event id matching the existing event edited id then updates existing event`() {
val editedEvent = aSimpleNotifiableEvent(eventId = "0", editedEventId = "id-to-edit")
val updatedEvent = editedEvent.copy(eventId = "1", editedEventId = "id-to-edit", title = "updated title")
val updatedEvent = editedEvent.copy(eventId = "1", editedEventId = "id-to-edit", title = "updated title", isUpdated = true)
val queue = givenQueue(listOf(editedEvent))
queue.add(updatedEvent)