Commit Graph

258 Commits

Author SHA1 Message Date
Doug cfaa1b455a Use the new preview screen when tapping media on the room and pinned events screens. (#3736)
* Use the new TimelineMediaPreview modifier on the room and pinned timeline screens.

* Use the same presentation logic for all timeline media previews.

* Fix a bug with the detection of the timeline end.

* Send pagination requests from the media preview screen.

* Add SwiftLint to the Danger workflow (it is no longer installed on the runner).

* Put SwiftLint back on all of the GitHub runners too.

* Set the function_parameter_count lint rule to 10.

* Make sure to clean-up any previews when the coordinator is done.

* Handle the viewInRoomTimeline action more appropriately.
2025-02-05 13:27:23 +00:00
Doug d195e603c9 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
Valere f20847f62b Warn and block sending on verification violation (#3679)
* feat(crypto): Warn and block sending on verification violation

* fixup: Fix ComposerToolbar previews

* fixup! add ComposerToolBarViewModelTests for canSend

* add new preview tests for verification violations

* Use `deferFulfillment`s in the unit tests.

---------

Co-authored-by: Stefan Ceriu <stefanc@matrix.org>
2025-01-20 18:29:34 +02:00
manuroe 3950cac085 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 435dfb8e46 Automatically retry decryptions in the active room when the app becomes active again just in case the NSE received keys we're not aware of (#3628) 2024-12-18 11:10:56 +02:00
Mauro 45a630dd85 Implement Knock Logic (#3573)
* WIP RequestToJoin struct

* implemented the logic to display the cells

* knock request banner accept flow

* mark all knocks as seen implemented

* details logic

* implemented accept, decline and ban in the list

* added a loader and modified the stacked view

of the banner

* pr suggestions

* updated naming and loading strings

* added the initial loading state

improved code and the tests

* updated a string that has changed

* code improvement

* tests for the room screen view model

* room details tests

and improved the knock requests tests for the room screen

* knock requests list tests

* added error state alerts with retry

* struct has been renamed on the sdk

so I renamed it also on the app side

* update SDK
2024-12-16 15:32:45 +01:00
Mauro 89b9259b76 Design Tweaks (#3606)
* updated the order of the room details

also...
- removed the bloom bg from the join room screen
- now DMs do not necessarily need to be encrypted rooms
- changed bg of the knock banner

* removed unnecessary disabled

* updated join room screen tests
2024-12-11 17:42:33 +00:00
Mauro fe984a1301 Knock Requests navigation flows (#3555)
* implemented navigations

* better naming for the enum

* removed list to banned users navigation

* polished the code

* avatarURL
2024-11-26 11:47:34 +00:00
Mauro 26e07f2457 Knock Requests banner display logic (#3550)
* added the join rule to the info

* update SDK and added logic to display the banner

in the room screen

* added the logic to display the banner
2024-11-25 13:14:02 +01:00
Doug 7c75498b4d 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
Andy Balaam 4e812f72b9 Enable identity pinning violation notifications unconditionally (#3457)
(Remove the feature flag we added when this feature seemed unstable.)
2024-10-28 12:16:38 +00:00
Stefan Ceriu 4d697a3a49 Introduce a feature flag for the new identity pinning violation notifications feature. 2024-10-10 16:13:34 +03:00
Stefan Ceriu 794d0eead1 Fixes element-hq/element-meta/issues/2525 - Display a warning when a user's pinned identity changes 2024-10-07 20:47:31 +03:00
Doug 5522871dd9 MockMediaProvider → MediaProviderMock. 2024-10-03 10:58:59 +01:00
Doug 77e4fae2fb Use the new @Entry macro everywhere.
Fix analytics service optionality.
2024-10-03 10:58:59 +01:00
Mauro 5f4c2890f6 Remove message pinning FF (#3318) 2024-09-30 12:32:35 +00:00
Mauro efe352c319 Added analytics for message pinning (#3284) 2024-09-17 10:02:26 +02:00
Stefan Ceriu 664e87fe87 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 4eb1ed5d09 Pinned Events Timeline actions and differentiation (#3182) 2024-08-22 17:35:44 +02:00
Doug 304070e8cc Use native video call picture in picture! (#3190)
* Use native video call picture in picture!

* Handle isSupported, isPossible and web view errors.

* Use new canEnterPip method.

* Hide a room's Call button when already joined to the call.

* Tweak feature flag description.

* PR comments.
2024-08-21 17:48:57 +01:00
Stefan Ceriu e281a3f242 Introduce a new RoomProxyType and treat rooms differently based on their membership state 2024-08-21 12:24:20 +03:00
Doug ebf7c00eeb Navigation support for upcoming Element Call Picture in Picture mode. (#3174) 2024-08-16 11:25:36 +01:00
Stefan Ceriu f89c3e54b4 Automatically try reloading failed images on network changes (#3170)
* Add the networkMonitor to the NSE and delete the old MockMediaLoader

* Generate a MediaLoaderMock through AutoMockable and use it in the MediaProviderTests

* Implement an ImageProvider mechanism that automatically tries reloading images when connectivity is established again and use it for LoadableImages

* Merge the ImageProvider protocol back into the MediaProvider

* Address PR review comments

* Provide a default sdk client request configuration

* Address tasks not automatically cancelling themselves when views get deallocated
2024-08-15 18:20:19 +03:00
Mauro 0bbdb05220 RoomScreenViewModel refactor part 2 (#3169) 2024-08-14 18:03:46 +02:00
Mauro c71da91d54 PinnedBanner is now managed by the RoomScreenViewModel (#3163) 2024-08-14 12:38:10 +02:00
Mauro 1ad361a6e8 RoomScreenViewModel is now TimelineViewModel (#3157)
Co-authored-by: Stefan Ceriu <stefanc@matrix.org>
2024-08-13 13:36:40 +02:00
Mauro b84c436551 Fix for a memory leak (#3143) 2024-08-08 19:04:02 +02:00
Mauro ed7d3b0b13 Navigate to the Pinned events timeline (#3139) 2024-08-08 18:29:39 +02:00
Mauro 91a42538ac Pinned events banner goes backwards (#3128) 2024-08-07 14:01:01 +00:00
Mauro 08347e15a5 Pinned events banner loading state (#3118) 2024-08-06 15:46:56 +02:00
Doug e667be0f43 Add Encryption Authenticity explanations. (#3116) 2024-08-06 10:45:46 +01:00
Mauro ff2c42d53b Pinned items timeline implementation for the banner (#3099) 2024-08-05 14:09:05 +02:00
Mauro 0da2d4917b Pin/Unpin Logic (#3084) 2024-07-26 20:41:00 +02:00
Mauro 37786b8fad Hide/Show pin banner based on scroll direction (#3080) 2024-07-24 12:15:36 +02:00
Mauro 5cb44ee60c Pinned Items Banner UI (#3072) 2024-07-22 12:57:04 +00:00
Mauro d437e1f3ed Pinning items Feature Flag (#3063) 2024-07-18 18:28:30 +02:00
Doug 6339fe2bf0 Fix a potential race condition when redacting a message. (#3061)
* Refactor the timeline item menu action provider.

- Move it into its own struct.
- Use an item, not an ID so it doesn't randomly change.
- Move permissions into the room screen view model.

* Use the stable ID when redacting/editing/forwarding a message.

Just like we do when fetching the item in the actions menu.
2024-07-18 15:14:38 +01:00
Stefan Ceriu b7fcb76094 Remove redundant remove failed sent message menu 2024-06-28 14:28:33 +03:00
Mauro 342cfc0d3f Hide timeline style selection (#2968) 2024-06-26 12:42:12 +02:00
Mauro 6655833719 Enable draft restore (#2943) 2024-06-19 16:05:38 +02:00
Doug 834260c144 Use the room heroes when computing a DM avatar. (#2900)
* Use room heroes for DM avatar content ID.

* Use RoomAvatar.heroes for the DM Details stack.
2024-06-19 10:27:10 +00:00
Stefan Ceriu 63524bff62 Bring back failed message state rendering and a redaction option. Bump the RustSDK to 1.0.15 2024-06-18 13:07:16 +03:00
Mauro cefa38049f Store and restore drafts (#2898) 2024-06-13 12:19:38 +00:00
Stefan Ceriu b2afa04832 Cleanup dead code after Periphery run 2024-06-11 14:38:08 +03:00
Stefan Ceriu 6c1647b851 Fixes #2842, fixes #2841 - Adopt new message sending queue API
- automatically retry failed requests as soon as the network is availble again
- remove manual retry options
2024-06-06 12:59:03 +03:00
Stefan Ceriu c3571f4f4e Track when the user starts a room call and when they enable formatting options on the message composer 2024-05-30 15:42:26 +03:00
Stefan Ceriu 3a904ebc9d Replace the old MockUserSession with the generated UserSessionMock 2024-05-27 17:05:01 +03:00
Doug 178797a178 Fix macOS timeline context menu missing the Remove item. (#2830)
The necessary permissions were only being checked when presenting the long press menu.
2024-05-10 21:38:11 +01:00
Stefan Ceriu d8845303fd Fixes #2805 - Fixes animation artifacts when focusing on in-reply-to messages 2024-05-10 16:28:46 +03:00
Stefan Ceriu 905b21e0a8 Fixes #2808 - Switch the message sending failure options from a dialog to an alert
* Fixes #2808 - Switch the message sending failure options from a dialog to an alert
- this prevents it from showing up as a popup on the room list on an iPad
- it used to be set on the timeline and not on the timeline item because of our use of a UITableView
* Cleanup room screen action names
2024-05-09 14:35:47 +03:00