Commit Graph

23 Commits

Author SHA1 Message Date
Mauro
173b39a07f Swift Testing for Unit Tests PART 1 (#5119)
* migrated a lot of unit tests to Swift Testing and added a new implementation for deferred fulfillment

more tests migration

Cleaned the code manually to establish some good patterns

more code improvements

some more code improvements

removed empty tests

update project

* more pr suggestions and cleanups

* removed the TestSetup pattern

* fixing claude not reusing tests

* pr suggestion + added indent rule to swiftformat so that we can prevent AIs to change that
2026-02-19 16:20:47 +01:00
Stefan Ceriu
04053ae69b Update files following swiftformat upgrade 2026-01-27 12:50:57 +02:00
Mauro
6160c44d67 Update copyright holding and dates (#4640)
* Update copyright holding and dates

* compound IDE Macros updated

* update copyright

* update copyrights done

* update templates and README
2025-10-21 14:34:56 +02:00
Mauro Romito
dbe5bb35b4 more fixes and preview tests updated 2025-09-26 16:38:55 +03:00
Doug
05fc508632 Use the maxUploadSize in the media upload screen. (#4359)
* Fix a bug where some files sizes were sent as 0.

* Make FileManger.sizeForItem(at:) a UInt.

The docs specifically say that FileAttributeKey.size returns an unsigned long long so I have no idea why we were returning a Double here…

* Add the maxMediaUploadSize property on ClientProxy.

* Use the maxUploadSize to set a target video size and to show a file too big error.

* Refactor media upload parameter order.
2025-07-29 12:18:53 +01:00
Mauro
a02972c9f9 Xcode16.3 support (#4029)
* Xcode16.3 support + updated unit and preview test
2025-04-16 19:12:31 +02:00
Doug
1b68801f66 Update our development assets. (#3783)
* Replace downloaded test assets with original content.

* Replace AI generated assets with original content.

* Update preview tests snapshots

* Update UI test snapshots.

---------

Co-authored-by: Stefan Ceriu <stefan.ceriu@gmail.com>
2025-02-11 11:53:35 +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
Doug
91250784f4 Update the project to use Xcode 16.1 (#3505) 2024-11-12 12:24:08 +00:00
Doug
a141adbd1f Enable the Optimised Media Uploads feature. (#3467)
* Enable the Optimised Media Uploads feature.

(Well move the toggle from Developer Options to Advanced Settings)

* Add OptimizeMediaUploads analytics.

* Final strings.

* Upload reduced quality media by default 😢

Move the setting out of the feature flags section in the file.

* Fix unit tests now the default has changed.

* Pull in updated string, fix snapshots.
2024-10-31 14:14:14 +00:00
Doug
f656b73ac6 Tweak the flow for setting up a recovery key. (#3463)
* Remove unwanted title.

* Update SecureBackupScreen strings.

* Update SecureBackupRecoveryKeyScreen.

* Show the recovery banner when recovery needs setting up.

* Fix SecureBackupScreen title.

* Fix timeout on MP4 encoding tests
2024-10-29 15:59:22 +00:00
Doug
d9d6c066ee Switch to optimised video uploads to 720p (#3462) 2024-10-29 11:44:46 +00:00
Doug
6f00e2c77e Fix an issue calculating the width/height of an image. (#3435) 2024-10-21 15:28:23 +01:00
Doug
e742f8803e 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
Doug
79c0822ef5 Add a toggle in the developer options to optimise the media uploads. (#3408) 2024-10-14 14:48:59 +01:00
Doug
44fb45bef1 Update Unit tests for Xcode 16. 2024-09-23 16:25:49 +01:00
Stefan Ceriu
f25bd5ab31 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
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
Stefan Ceriu
56e124d88f Replace the existing MockClientProxy with a generated one + special configuration options 2024-02-28 17:18:01 +02:00
Stefan Ceriu
1c603ac165 Fixes #980 - Generated thumbnail size when uploading media (#1613) 2023-09-01 14:58:36 +03:00
Stefan Ceriu
db8b89cd40 Fixes #1262 - Compute correct sizes for portrait videos (#1367)
* Fixes #1262 - Compute correct sizes for portrait videos

* Add unit test

* Tweaks following code review
2023-07-20 10:30:43 +00:00
Stefan Ceriu
56530ed55f Add support for the new RoomList API (#1092)
* Add support for the new RoomList API

Squashed commits:
[8c2625a] Re-enable invites
[339e59b5] Add automatic syncing restarts after entering the terminated state for whatever reason
[b5498e96] Reimplemented room list state management and usage
[8154b0cf] Fix visible rooms range setting after scrolling stops
[5155c44d] Hook up initial loading idicator and session verification banner to room list service states
[700a5a2e] Enable back room subscriptions, timeline listeners and unread notifications / counts
[9df383bc] Enable last messages and timestamps, they don't crash on release builds
[7c4da9da] Add back certain fields now that the "full room" is available
[9f6534a7] Adopt interfaces to new RoomList API, untested as requests don't go to the right URL

* Tweaks following code review

* Bump the RustSDK to v1.0.76-alpha
2023-06-16 16:11:45 +03:00
Stefan Ceriu
8d917b0e0e Media uploading preprocessor tests (#820)
* Add sample files to use in the MediaUploadingPreprocessor unit tests
* Add MediaUploadingPreprocessor unit tests
2023-04-21 19:04:02 +03:00