element-hq / element-hq/element-x-android
Publish room shortcuts
- Dominant language
- Kotlin
- Stars
- 2.4k
- Forks
- 624
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 149
Description
### Your use case
#### What would you like to do?
Publish room shortcuts -- the links to rooms that appear when you long press an app icon, or that appear in the sharing menu (sharing shortcuts).


#### Why would you like to do it?
Feature parity with the old Element Android, and would fix #1547 since notifications must be associated with a shortcut to be considered conversations (see https://developer.android.com/develop/ui/views/notifications/conversations).
#### How would you like to achieve it?
Shortcut creation in the old Element Android is handled in [this class](https://github.com/vector-im/element-android/blob/develop/vector/src/main/java/im/vector/app/features/home/ShortcutsHandler.kt). On initialization, the app pushes the entire list of rooms as shortcuts as ordered on the room list screen.
The [Android docs](https://developer.android.com/training/sharing/direct-share-targets) recommend re-pushing the shortcut on every incoming/outgoing message.
I put together a [quick implementation](https://github.com/dkter/element-x-android/commit/5609de631620b2315a81e2bd946df61607d37475) just to see if this would fix #1547 -- it just pushes a room shortcut every time a notification is sent. Probably not an ideal/permanent solution (though this does seem to be how Discord handles things) but it does work and does fix #1547
### Have you considered any alternatives?
_No response_
### Additional context
_No response_
### Are you willing to provide a PR?
No
Contributor guide
Assessment
This issue has not been assessed yet.