Commit Graph

32 Commits

Author SHA1 Message Date
Doug
cda1872b8f Use the UserSession for VoiceMessageMediaManager injection too. 2025-08-27 18:13:03 +01:00
Doug
196fb5d02a Bundle ClientProxy & MediaProvider injections together in UserSession. 2025-08-27 18:13:03 +01:00
Stefan Ceriu
64f0d4cd01 Adopt new canOwnUser* power level methods instead of the throwing ones. 2025-06-25 17:23:22 +03:00
Stefan Ceriu
e5a49c568f Adopt room info power levels (#4245)
* Use the newly RoomInfo published PowerLevels; update permissions at the same time as the room info and avoid unnecessary async calls.

* Introduce a RoomInfoProxyProtocol and associated mock and move away from mocked SDK RoomInfos

* Bump the SDK to v25.06.23

* Expose new non-throwing methods for checking one's own user permissions

* Fix the unit and preview tests (except the TimelineMediaPreviewDetails for which simplified snapshots were generated)

* Converge on one single implementation for computing a room's avatar.

* Fix more unit tests

* Fix the TimelineMediaPreviewDetailsView snapshot tests

This reverts commit 9b6c819e611ad2fa3de2c34a4a7aa556fc9faadd.

---------

Co-authored-by: Doug <douglase@element.io>
2025-06-24 17:48:00 +01:00
Stefan Ceriu
46a066491d Better integrate RoomPowerLevelsProxyMock's own Configuration struct. 2025-06-20 18:10:45 +03:00
Stefan Ceriu
60f4228162 Adopt the lastest SDK APIs and refactor how we deal with user permissions.
This patch introduces a new RoomPowerLevelsProxy and its associated mock and adopts newer Rust APIs to make working with user power levels and permissions easier.
2025-06-20 18:10:45 +03:00
Mauro
0154e10f98 Always open manage member sheet (#4110)
* always open manage member sheet

* Update ElementX/Sources/Screens/ManageRoomMemberSheet/ManageRoomMemberSheetModels.swift

Co-authored-by: Doug <6060466+pixlwave@users.noreply.github.com>

* Update ElementX/Sources/Screens/ManageRoomMemberSheet/ManageRoomMemberSheetModels.swift

Co-authored-by: Doug <6060466+pixlwave@users.noreply.github.com>

* pr suggestions and handled the buttons actions correctly

* Update ElementX/Sources/Screens/ManageRoomMemberSheet/View/ManageRoomMemberSheetView.swift

Co-authored-by: Doug <6060466+pixlwave@users.noreply.github.com>

* fixed some compilation errors

* added some documentation

* using a struct instead of a protocol

* using arguments instead of a struct

---------

Co-authored-by: Doug <6060466+pixlwave@users.noreply.github.com>
2025-05-19 14:17:57 +00:00
Stefan Ceriu
c0de3afa1d Bump the SDK and adopt the new MsgLike timeline item types (#4000)
* Bump the RustSDK to v25.04.09

* Adopt new MsgLike based timeline item structure.

* Move the `replyDetails` and `isThreaded` to the `RoomTimelineItemProperties`

* Restructure the TimelineItemFactory

* Fix line length warning

* Rename `msgLikeContent` to `messageLikeContent` wherever possible.

* Move the `EventTimelineItem` mocks to the SDK mocks folder.
2025-04-10 14:04:16 +03:00
Mauro Romito
b3bff57ed9 refactor: manage member sheet in timeline
better implementation

updated tests

Update ElementX/Sources/Screens/Timeline/TimelineViewModel.swift

Co-authored-by: Doug <6060466+pixlwave@users.noreply.github.com>

fix
2025-04-09 15:03:54 +02:00
Mauro
431828828d Render Room and Message Pills (#3809)
* added a way to render the room and the message

pills, but is WIP

* permalinks now get converted into pills!

* fixed an issue where room address mentions

were not adding a URL properly but a string

* updated tests

* c

* Revert "c"

This reverts commit 5c80252fa23dba7e4d44f2a07fbf1e9500e37c82.

* updated tests

* more tests

* created APIs to get a specific RoomSummary

given the id or the alias

* small mention builder improvement

* pr suggestions
2025-02-25 13:46:01 +00:00
Doug
61ca5c35f7 Refactor Rust timeline identifiers into our own. (#3731)
* Refactor eventOrTransactionID.

* Refactor uniqueID.
2025-02-04 09:50:46 +00:00
Doug
4312a604c1 RoomTimeline… refactor (drop the Room). (#3728)
* Add the timeline controller factory to the timeline view model.

In preparation for building a timeline to swipe through media in QuickLook.

* Refactor RoomTimelineControllerFactory.

* Refactor RoomTimelineController.

* Refactor RoomTimelineProvider.
2025-02-03 14:14:01 +00:00
manuroe
c29f4cc9b4 Dual licensing: AGPL + Element Commercial (#3657)
* New LICENSE-COMMERCIAL file

* Apply dual licenses: AGPL + Element Commercial to file headers

* Update README with dual licensing
2025-01-06 11:27:37 +01:00
Stefan Ceriu
2c69019046 Monthly media gallery separators (#3601)
* Fix the order of the items in the media grid.
* Add media gallery timeline separators.
* Change the `SeparatorRoomTimelineItem` to have it expose a Date timestamp instead of a text string.
2024-12-11 13:32:29 +02:00
Stefan Ceriu
e75c930d8f Media gallery - part 1(#3588)
* Introduce a `MediaEventsTimelineFlowCoordinator`
* Update SDK API and architecture
* Add a feature flag, add translations
* Move the media events timeline presentation under the room flow coordinator state machine
* Rename `TimelineViewState.timelineViewState` of type `TimelineState` to `timelineState`
* Enabled SwiftLint's `trailing_closure` rule and fix the warnings.
2024-12-06 16:58:14 +02:00
Doug
64da80c6cb Use a Date for the timestamp in all timeline items. (#3590)
* Use a Date for the timestamp in all timeline items.

* UI test snapshots.

* Update snapshots

---------

Co-authored-by: Stefan Ceriu <stefanc@matrix.org>
2024-12-06 13:55:29 +00:00
Doug
94daf13135 Replace individual RoomProxy properties with a stored RoomInfo. (#3445)
* Store RoomInfo updates in JoinedRoomProxy and read from them directly.

* Remove all RoomProxy properties that were reading from the RoomInfo.
2024-10-28 12:29:31 +00:00
Stefan Ceriu
6c09884783 Fix #1934 - Hook reaction pickers into the system's recently used keyboard emojis (#3453) 2024-10-25 19:58:56 +03:00
Stefan Ceriu
51751606ca Adopt various rust side Timeline API additions (#3423)
* Adopt new reaction toggling API introduced in matrix-org/matrix-rust-sdk/pull/4127

* Adopt the changes introduced in matrix-org/matrix-rust-sdk/pull/4111: use the new `TimelineUniqueId` type instead of `String` for unique timeline identifiers.

* Bump the RustSDK to v1.0.58.

* Fix unit tests
2024-10-16 19:08:34 +03:00
Stefan Ceriu
2c31885355 Refactor theTimelineItemIdentifier handling; stop relying on optional EventOrTransactionIds and be explicit when setting composer modes from the draft service. 2024-10-16 16:37:47 +03:00
Doug
33c172b0f2 MockMediaProvider → MediaProviderMock. 2024-10-03 10:58:59 +01:00
Stefan Ceriu
45d59c57d6 Bump the RustSDK to v1.0.53: adopt latest record based timeline item APIs (#3356) 2024-10-01 18:50:11 +03:00
Mauro
98d7654a1d Remove message pinning FF (#3318) 2024-09-30 12:32:35 +00:00
Doug
0274cf3cd5 Start fixing flakey tests ❄️ (#3329)
* Wait longer on authentication flow tests.

* Move default perceptualPrecision value into the snapshot preferences.

* Delay snapshots *before* setting up the test.

* Reset the simulators on GitHub before running?

* Remove a test that is now handled by Rust.

* Fix a test that was yielding.
2024-09-26 16:09:01 +01:00
Doug
830f8e9db7 Fix various flakey tests. 2024-09-23 16:25:49 +01:00
Mauro
163e935f65 Added a pin icon (#3257) 2024-09-11 10:40:11 +00:00
Stefan Ceriu
89eae00479 Switch license to AGPL (#3237)
* Switch license file to AGPL

* Update file copyright headers

* Update the default project file header
2024-09-06 16:34:30 +03:00
Mauro
87f8c2eaaf TimelineKind refactor (#3193) 2024-08-22 18:33:21 +00:00
Mauro
bbb462bd83 Pinned Events Timeline actions and differentiation (#3182) 2024-08-22 17:35:44 +02:00
Stefan Ceriu
34eb596c1a Introduce a new RoomProxyType and treat rooms differently based on their membership state 2024-08-21 12:24:20 +03:00
Mauro
803c61e879 PinnedBanner is now managed by the RoomScreenViewModel (#3163) 2024-08-14 12:38:10 +02:00
Mauro
ecddcfcd16 RoomScreenViewModel is now TimelineViewModel (#3157)
Co-authored-by: Stefan Ceriu <stefanc@matrix.org>
2024-08-13 13:36:40 +02:00