600 Commits

Author SHA1 Message Date
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
Stefan Ceriu
7a47e37d38
Fix #1934 - Hook reaction pickers into the system's recently used keyboard emojis (#3453) 2024-10-25 19:58:56 +03:00
Mauro
2511c98090
Knocked Preview implementation (#3426)
* JoinRoomScreen ui for knocking

* code improvement

* updated previews

* added knocked state with tests

* send knock request

* Apply suggestions from code review

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

* pr comments

* update tests

* new API

* knock implementation and cancel knock

* update strings

* added a knocked cell in the home screen

* design update

* updated SDK

* simplified the invite case code

* pr comments

* updated previews

* added message as reason

* updated strings

* fixing tests

---------

Co-authored-by: Doug <6060466+pixlwave@users.noreply.github.com>
2024-10-24 17:23:06 +02:00
Doug
a4ea552a83
Show a verification badge on the Room Member/User Profile screens. (#3427)
* Add a badge for verified users/room members.

* Reorder subviews.

* Add a (disabled) button to verify other users.

* PR comments.

* Update the SDK.

* Adopt the SDK changes introduced in matrix-rust-sdk/pull/4100

---------

Co-authored-by: Stefan Ceriu <stefan.ceriu@gmail.com>
2024-10-21 16:07:19 +01:00
Doug
201e3b0c9c
Fix an issue calculating the width/height of an image. (#3435) 2024-10-21 15:28:23 +01:00
Mauro
bd4ecdd060
Knock and knocked state for the join room screen (#3424)
* JoinRoomScreen ui for knocking

* code improvement

* updated previews

* added knocked state with tests

* send knock request

* Apply suggestions from code review

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

* pr comments

---------

Co-authored-by: Doug <6060466+pixlwave@users.noreply.github.com>
2024-10-17 14:00:51 +00:00
Stefan Ceriu
0651314e3e
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
Doug
6078398ad3
Allow image uploads to be optimised to reduce bandwidth. (#3412)
* Use typed throws for intermediate media upload preprocessing steps.

* Remove unnecessary async/await usages.

* Resize images when optimizedMediaUploads is enabled.

* Reduce the JPEG quality.

* Add tests for PNG and HEIC, fix mimetypes for these.

* Add special handling for GIFs.

* Test the files to make sure their mime types match the info.

* Update the filename when converting formats.

* Extend test timeout for video encoding.
2024-10-16 14:50:24 +01:00
Stefan Ceriu
35d49c4d85 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
98a5ee5b48
Add a toggle in the developer options to optimise the media uploads. (#3408) 2024-10-14 14:48:59 +01:00
Mauro
a16e1346fe
Create Room with knock rule (#3397)
* create knock room implementation (without SDK)

* Apply suggestions from code review

pr suggestions

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

* pr suggestions

---------

Co-authored-by: Doug <6060466+pixlwave@users.noreply.github.com>
2024-10-14 11:52:38 +02:00
Doug
6e51969d27
Update the SDK and use media filename and caption internally. (#3375)
Doesn't render captions (other than in fallback places).
2024-10-08 11:00:58 +01: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
Stefan Ceriu
c79dbe85a0
Bump the RustSDK to v1.0.53: adopt latest record based timeline item APIs (#3356) 2024-10-01 18:50:11 +03:00
Doug
268d9f7479
Move the core logic in LoginScreenCoordinator into the ViewModel. (#3348) 2024-10-01 13:09:45 +01:00
Mauro
5f4c2890f6
Remove message pinning FF (#3318) 2024-09-30 12:32:35 +00:00
Doug
17dfe1359a
Selecting a server that doesn't support login now fails instead of letting you continue to a failure later. (#3342)
* Fail configuration of the authentication service if the homeserver doesn't support login.

* Move the ServerSelectionCoordinator logic into the ViewModel.

- Handle the new login alert.
- Add more tests
2024-09-27 13:58:05 +01:00
Stefan Ceriu
9d23dec2e9
Tracing and integration test tweaks (#3336)
* Disable image and document picker integration tests as they randomly fail to load and are flakey.

* Delete any pre-existing log files

* Various tracing tweaks and fixes:
- delete the custom tracing log levels as we can't control their ouput
- implement comparable on them
- change default levels only if the new chosen level increases their verbosity

* Make logging targets mandatory and fix their logging levels

* Switch back to using the `run_tests` reset simulator flag as `fastlane snapshot reset_simulators` was too generic and slow

* Switch all integration test taps to `tapCenter` (nee forceTap) after noticing missed taps on CI.

* Make the logging file prefix explicit, let the main app not use one.

* Rename tracing configuration `target` to `currentTarget`
2024-09-27 15:08:47 +03:00
Doug
4d7d687954
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
a8dbda90d9
Configure the AuthenticationService later now that we have 2 flows on the start screen. (#3316)
* Don't query the homeserver until confirming it (or selecting a different one).

* Setup the infrastructure to test AuthenticationService.

Implement basic tests for configuration & password login.

* Use the real AuthenticationService with a mock Client in all of the tests.

* Add tests for the ServerConfirmationScreenViewModel.

* Remove redundant view state and test for it.
2024-09-25 14:40:18 +01:00
Doug
af8c16150b
Upgrade Kingfisher to fix a bug that prevented GIFs from being tapped. (#3326)
* Upgrade Kingfisher to fix a bug the prevented GIFs from being tapped.

https://github.com/onevcat/Kingfisher/issues/2295

* Fix tests.
2024-09-25 13:10:02 +01:00
Doug
4996137006 Fix various flakey tests. 2024-09-23 16:25:49 +01:00
Doug
7bfd73de5f Update Unit tests for Xcode 16. 2024-09-23 16:25:49 +01:00
Doug
e4736b12bb
A bunch of random tweaks. (#3317)
- Fix warning on single case enum.
- Remove unused subjects.
- Fix a lint warning.
- Remove unused success value.
- Fix warning about position of try await.
- Add a note about the common tracing configuration.
- Show an indicator when resolving a send failure fails.
- Make sure the whole row is clickable in the GlobalSearchScreen.
2024-09-23 13:00:40 +01:00
Doug
5078f571ed
Push the deactivate account screen. (#3297) 2024-09-18 10:21:48 +01:00
Doug
5625e78fc9
Add support for account deactivation when not using OIDC. (#3295) 2024-09-17 20:08:35 +01:00
Doug
6efbf6117f
Allow registration on matrix.org using a custom helper URL. (#3282) 2024-09-16 13:05:22 +01:00
Doug
6cfe09b96d
Add a WebRegistrationScreen (not included in the flow yet). (#3281) 2024-09-16 11:03:29 +01:00
Doug
b85bd602f5 Tidy-up useless directories at the end of a test run. 2024-09-11 14:54:28 +01:00
Doug
af3a6ccbed
Make the SessionDirectories type responsible for cleaning up data. (#3261) 2024-09-11 14:32:03 +01:00
Mauro
ed67a29277
Added a pin icon (#3257) 2024-09-11 10:40:11 +00:00
Doug
cc4942fb78
Require acknowledgement to send to verified users who have unsigned devices or have changed their identity. (#3215)
* Refactor HeroImage style.

* Add a screen to resolve (crypto-related) timeline item send failures.

* Refactor send failures.

* Update the SDK.
2024-09-10 09:56:11 +01:00
Stefan Ceriu
c2b9a7f170 Fix wrong durations for uploaded media
At some point Uniffi introduced [automatic conversions](35140607dc/uniffi_bindgen/src/bindings/swift/templates/DurationHelper.swift (L19)) from Rust's `Duration` to `TimeInterval`s but the original implementation for media uploading was using milliseconds. When the conversion happened there were no breaking changes and iOS kept sending millis instead of seconds, resulting in **very** wrong values.
2024-09-10 11:11:34 +03:00
Stefan Ceriu
a4166de502 Add support for showing media playback controls on the lock screen 2024-09-09 14:42:32 +03:00
Stefan Ceriu
a0eafe26c3 Fixes #3147 - Remove the sliding sync proxy wait list 2024-09-09 12:41:28 +03: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
Doug
c9603dce55 Adopt sliding sync versions for client Restoration. 2024-08-30 14:45:54 +03:00
Doug
812c5d5c61
Update the SDK (#3196)
* Update the SDK.

* Fix API breaks on send failures and propagate the new type.

* Handle new SDK ShieldState.

* Set up the ClientBuilder's `cachePath` option.

* Delete the cacheDirectory during logout/clearCache.

* Add unit tests for RestorationToken decoding and SessionDirectories generation.
2024-08-27 11:06:26 +01:00
Mauro
993fe8cd36
TimelineKind refactor (#3193) 2024-08-22 18:33:21 +00: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
e0ba9925e7
Remove GenericCallLinkCoordinator, merging it into CallScreen. (#3181)
* Remove incorrect message send call and fix typo.

* Add overlay coordinator presentation to the NavigationRootCoordinator.

* Remove GenericCallLinkCoordinator, merging it into CallScreen.

This will allow for picture in picture on call links when available.
2024-08-19 17:21:25 +01:00
Doug
6616d1799f
Remove encryption authenticity feature flag. (#3180) 2024-08-19 09:49:10 +01: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