-
Notifications
You must be signed in to change notification settings - Fork 186
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adapt to changes in SDK #2836
Adapt to changes in SDK #2836
Conversation
- Remove `name` from `MatrixRoom`, we should use `displayName` instead. - Remove separate `invites` room list.
📱 Scan the QR code below to install the build (arm64 only) for this PR. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #2836 +/- ##
===========================================
- Coverage 73.95% 73.95% -0.01%
===========================================
Files 1530 1531 +1
Lines 36541 36535 -6
Branches 7074 7074
===========================================
- Hits 27025 27020 -5
- Misses 5811 5812 +1
+ Partials 3705 3703 -2 ☔ View full report in Codecov by Sentry. |
Technically it's the same as `AppMigration01`.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think there is no blocking remarks, thanks!
private val logFilesRemover: LogFilesRemover, | ||
) : AppMigration01(logFilesRemover) { | ||
override val order: Int = 3 | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's OK, but maybe it will be clearer using composition.
What do you think about:
@ContributesMultibinding(AppScope::class)
class AppMigration03 @Inject constructor(
private val appMigration01: AppMigration01,
) : AppMigration {
override val order: Int = 3
override suspend fun migrate() {
appMigration01.migrate()
}
}
Consequently, AppMigration01
does not need to be open
@@ -65,7 +65,7 @@ class RoomDetailsEditPresenter @Inject constructor( | |||
// just erase the local value when the room field has changed | |||
var roomAvatarUri by rememberSaveable(room.avatarUrl) { mutableStateOf(room.avatarUrl?.toUri()) } | |||
|
|||
var roomName by rememberSaveable { mutableStateOf((room.name ?: room.displayName).trim()) } | |||
var roomName by rememberSaveable { mutableStateOf(room.displayName.trim()) } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to use the new field RoomInfo.rawName
here, but this can be handled separately.
It will fix the form per-filled with a computed room name like "Alice, Bob and 3 others".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using RoomInfo.rawName
needs some other changes so I think it's probably better to do it on a separate PR.
* | ||
* To apply some dynamic filtering on top of that, use [DynamicRoomList]. | ||
*/ | ||
enum class Source { | ||
All, | ||
Invites, | ||
All |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is becoming a bit useless if there is only one value, but I think we could keep this enum for clarity?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I wanted to keep it in case we'd need separate lists in the future again for some reason.
@@ -465,7 +461,7 @@ class RustMatrixClient( | |||
|
|||
override suspend fun resolveRoomAlias(roomAlias: RoomAlias): Result<RoomId> = withContext(sessionDispatcher) { | |||
runCatching { | |||
client.resolveRoomAlias(roomAlias.value).let(::RoomId) | |||
client.resolveRoomAlias(roomAlias.value).roomId.let(::RoomId) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will improve this and use the returned servers
list in a separate PR.
private val notificationClient = client.notificationClient(notificationProcessSetup) | ||
.use { builder -> | ||
builder | ||
.filterByPushRules() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This API has vanished, I guess this is OK
|
Type of change
Content
Changes to generate the new app version:
0.4.12
so we can replace the existing one in the store due toCVE-2024-34353 / GHSA-9ggc-845v-gcgv
.AppMigration01
.0.2.18
, which contains a security fix.name
fromMatrixRoom
, we should usedisplayName
instead.invites
room list.runBlocking
to get the now asyncNotificationClient
from the Rust SDK.suspend
.Client.resolveRoomAlias
now returns aroomId
andvia
parameters, we pass theroomId
.Motivation and context
New release.
Tests
You can test the general use of the app.
Tested devices
Checklist