element-hq / element-hq/element-android

Sort invitations by date of invite event

Open
#4,501 1 comment 0 reactions 0 assignees View on GitHub
A-Invite O-Occasional S-Minor T-Enhancement
Dominant language
Kotlin
Stars
3.7k
Forks
917
PR merge metrics
No merged PRs in 30d

Description

Currently the invitations are sorted by date of latest activity (the default sorting of the SDK), which is not correct and may lead to random ordering of invitation

This last activity time should be set to the date of the invite event for room in invitation state.

The code to update is here https://github.com/vector-im/element-android/blob/main/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/room/summary/RoomSummaryUpdater.kt#L134

image

For invites `getLatestPreviewableEvent` should not be used to set `roomSummaryEntity.lastActivityTime` but rather the date of the invite event.

This change should require an initial sync (or a database migratrion), but this is OK, let's just update the RoomSummaryUpdater.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.