Skip to content

Commit 6ee0b62

Browse files
authored
Merge branch 'develop' into feature/bma/sdk_doc_update
2 parents 4af883f + f863bde commit 6ee0b62

File tree

15 files changed

+58
-81
lines changed

15 files changed

+58
-81
lines changed

.github/workflows/update-gradle-wrapper.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ jobs:
1313

1414
- name: Update Gradle Wrapper
1515
uses: gradle-update/update-gradle-wrapper-action@v1
16+
# Skip in forks
17+
if: github.repository == 'vector-im/element-android'
1618
with:
1719
repo-token: ${{ secrets.GITHUB_TOKEN }}
1820
target-branch: develop

CHANGES.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
Changes in Element 1.4.13 (2022-04-26)
2+
======================================
3+
4+
Bugfixes 🐛
5+
----------
6+
- Fix UI freeze observed after each incremental sync ([#5835](https://github.com/vector-im/element-android/issues/5835))
7+
8+
19
Changes in Element v1.4.12 (2022-04-20)
210
=======================================
311

build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ buildscript {
2121
classpath 'org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:3.3'
2222
classpath 'com.google.android.gms:oss-licenses-plugin:0.10.5'
2323
classpath "com.likethesalad.android:stem-plugin:2.0.0"
24-
classpath 'org.owasp:dependency-check-gradle:7.0.4.1'
25-
classpath "org.jetbrains.dokka:dokka-gradle-plugin:1.6.20"
24+
classpath 'org.owasp:dependency-check-gradle:7.1.0.1'
25+
classpath "org.jetbrains.dokka:dokka-gradle-plugin:1.6.21"
2626
// NOTE: Do not place your application dependencies here; they belong
2727
// in the individual module build.gradle files
2828
}

changelog.d/5814.feature

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Live location sharing: updating beacon state event content structure
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Main changes in this version: Allows users to appear offline and adds an audio player for audio attachments
2+
Full changelog: https://github.com/vector-im/element-android/releases

matrix-sdk-android/src/androidTest/java/org/matrix/android/sdk/session/space/SpaceHierarchyTest.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -478,7 +478,9 @@ class SpaceHierarchyTest : InstrumentedTest {
478478
// + C
479479
// + c1, c2
480480

481-
val rootSpaces = session.spaceService().getRootSpaceSummaries()
481+
val rootSpaces = commonTestHelper.runBlockingTest {
482+
session.spaceService().getRootSpaceSummaries()
483+
}
482484

483485
assertEquals("Unexpected number of root spaces ${rootSpaces.map { it.name }}", 2, rootSpaces.size)
484486

matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/room/model/livelocation/BeaconInfo.kt

Lines changed: 0 additions & 33 deletions
This file was deleted.

matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/room/model/livelocation/LiveLocationBeaconContent.kt

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,18 @@ data class LiveLocationBeaconContent(
3939
@Json(name = "m.new_content") override val newContent: Content? = null,
4040

4141
/**
42-
* Indicates user's intent to share ephemeral location.
42+
* Optional description of the beacon.
4343
*/
44-
@Json(name = "org.matrix.msc3672.beacon_info") val unstableBeaconInfo: BeaconInfo? = null,
45-
@Json(name = "m.beacon_info") val beaconInfo: BeaconInfo? = null,
44+
@Json(name = "description") val description: String? = null,
45+
/**
46+
* Beacon should be considered as inactive after this timeout as milliseconds.
47+
*/
48+
@Json(name = "timeout") val timeout: Long? = null,
49+
/**
50+
* Should be set true to start sharing beacon.
51+
*/
52+
@Json(name = "live") val isLive: Boolean? = null,
53+
4654
/**
4755
* Beacon creation timestamp.
4856
*/
@@ -65,8 +73,6 @@ data class LiveLocationBeaconContent(
6573
var hasTimedOut: Boolean = false
6674
) : MessageContent {
6775

68-
fun getBestBeaconInfo() = beaconInfo ?: unstableBeaconInfo
69-
7076
fun getBestTimestampAsMilliseconds() = timestampAsMilliseconds ?: unstableTimestampAsMilliseconds
7177

7278
fun getBestLocationAsset() = locationAsset ?: unstableLocationAsset

matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/space/SpaceService.kt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,5 +106,8 @@ interface SpaceService {
106106

107107
suspend fun removeSpaceParent(childRoomId: String, parentSpaceId: String)
108108

109-
fun getRootSpaceSummaries(): List<RoomSummary>
109+
/**
110+
* Get the root spaces, i.e. all the spaces which do not have a parent space.
111+
*/
112+
suspend fun getRootSpaceSummaries(): List<RoomSummary>
110113
}

matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/room/aggregation/livelocation/DefaultLiveLocationAggregationProcessor.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ internal class DefaultLiveLocationAggregationProcessor @Inject constructor() : L
5959
}
6060

6161
// Check if live location is ended
62-
if (!beaconInfoContent.getBestBeaconInfo()?.isLive.orFalse()) {
62+
if (!beaconInfoContent.isLive.orFalse()) {
6363
Timber.v("## LIVE LOCATION. Beacon info is not live anymore")
6464
return
6565
}
@@ -79,7 +79,7 @@ internal class DefaultLiveLocationAggregationProcessor @Inject constructor() : L
7979
liveLocationContent: MessageLiveLocationContent): Boolean {
8080
val beaconInfoStartTime = beaconInfoContent.getBestTimestampAsMilliseconds() ?: 0
8181
val liveLocationEventTime = liveLocationContent.getBestTimestampAsMilliseconds() ?: 0
82-
val timeout = beaconInfoContent.getBestBeaconInfo()?.timeout ?: 0
82+
val timeout = beaconInfoContent.timeout ?: 0
8383
return liveLocationEventTime - beaconInfoStartTime > timeout
8484
}
8585
}

0 commit comments

Comments
 (0)