Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Neil Alexander
element-android
Commits
525cd3ed
Unverified
Commit
525cd3ed
authored
May 10, 2021
by
ganfra
Committed by
GitHub
May 10, 2021
Browse files
Merge branch 'develop' into feature/fga/fix_timeline_read_marker
parents
581847e5
711ee24c
Changes
6
Hide whitespace changes
Inline
Side-by-side
CHANGES.md
View file @
525cd3ed
...
...
@@ -25,6 +25,7 @@ Bugfix 🐛:
-
Sent video does not contains duration (#3272)
-
Properly clean the back stack if the user cancel registration when waiting for email validation
-
Fix read marker visibility/position when filtering some events
-
Fix user invitation in case of restricted profile api (#3306)
Translations 🗣:
-
...
...
@@ -35,6 +36,7 @@ SDK API changes ⚠️:
Build 🧱:
-
Upgrade to gradle 7
-
https://github.com/Piasy/BigImageViewer is now hosted on mavenCentral()
-
Upgrade Realm to version 10.4.0
Test:
-
...
...
matrix-sdk-android/build.gradle
View file @
525cd3ed
...
...
@@ -6,13 +6,10 @@ apply plugin: 'realm-android'
buildscript
{
repositories
{
// mavenCentral()
//noinspection GrDeprecatedAPIUsage
jcenter
()
mavenCentral
()
}
dependencies
{
// Stick to this version until https://github.com/realm/realm-java/issues/7402 is fixed
classpath
"io.realm:realm-gradle-plugin:10.3.1"
classpath
"io.realm:realm-gradle-plugin:10.4.0"
}
}
...
...
matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/profile/ProfileService.kt
View file @
525cd3ed
...
...
@@ -66,6 +66,7 @@ interface ProfileService {
/**
* Get the combined profile information for this user.
* This may return keys which are not limited to displayname or avatar_url.
* If server is configured as limit_profile_requests_to_users_who_share_rooms: true then response can be HTTP 403.
* @param userId the userId param to look for
*
*/
...
...
matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/database/RealmSessionStoreMigration.kt
View file @
525cd3ed
...
...
@@ -144,10 +144,6 @@ class RealmSessionStoreMigration @Inject constructor() : RealmMigration {
Timber
.
d
(
"Step 7 -> 8"
)
val
editionOfEventSchema
=
realm
.
schema
.
create
(
"EditionOfEvent"
)
.
apply
{
// setEmbedded does not return `this`...
isEmbedded
=
true
}
.
addField
(
EditionOfEventFields
.
CONTENT
,
String
::
class
.
java
)
.
addField
(
EditionOfEventFields
.
EVENT_ID
,
String
::
class
.
java
)
.
setRequired
(
EditionOfEventFields
.
EVENT_ID
,
true
)
...
...
@@ -162,6 +158,10 @@ class RealmSessionStoreMigration @Inject constructor() : RealmMigration {
?.
removeField
(
"lastEditTs"
)
?.
removeField
(
"sourceLocalEchoEvents"
)
?.
addRealmListField
(
EditAggregatedSummaryEntityFields
.
EDITIONS
.
`$`
,
editionOfEventSchema
)
// This has to be done once a parent use the model as a child
// See https://github.com/realm/realm-java/issues/7402
editionOfEventSchema
.
isEmbedded
=
true
}
private
fun
migrateTo9
(
realm
:
DynamicRealm
)
{
...
...
matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/profile/ProfileAPI.kt
View file @
525cd3ed
...
...
@@ -33,6 +33,7 @@ internal interface ProfileAPI {
* Get the combined profile information for this user.
* This API may be used to fetch the user's own profile information or other users; either locally or on remote homeservers.
* This API may return keys which are not limited to displayname or avatar_url.
* If server is configured as limit_profile_requests_to_users_who_share_rooms: true then response can be HTTP 403.
* @param userId the user id to fetch profile info
*/
@GET
(
NetworkConstants
.
URI_API_PREFIX_PATH_R0
+
"profile/{userId}"
)
...
...
vector/src/main/java/im/vector/app/features/userdirectory/UserListViewModel.kt
View file @
525cd3ed
...
...
@@ -33,7 +33,6 @@ import org.matrix.android.sdk.api.MatrixPatterns
import
org.matrix.android.sdk.api.session.Session
import
org.matrix.android.sdk.api.session.profile.ProfileService
import
org.matrix.android.sdk.api.session.user.model.User
import
org.matrix.android.sdk.api.util.Optional
import
org.matrix.android.sdk.api.util.toMatrixItem
import
org.matrix.android.sdk.api.util.toOptional
import
org.matrix.android.sdk.rx.rx
...
...
@@ -137,7 +136,15 @@ class UserListViewModel @AssistedInject constructor(@Assisted initialState: User
avatarUrl
=
json
[
ProfileService
.
AVATAR_URL_KEY
]
as
?
String
).
toOptional
()
}
.
onErrorReturn
{
Optional
.
empty
()
}
.
onErrorReturn
{
// Profile API can be restricted and doesn't have to return result.
// In this case allow inviting valid user ids.
User
(
userId
=
search
,
displayName
=
null
,
avatarUrl
=
null
).
toOptional
()
}
Single
.
zip
(
searchObservable
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment