59 Commits

Author SHA1 Message Date
Doug
d325adb4fc
Hide the unread dot after previewing an invite. (#3800)
* Hide the unread dot when previewing an invite.

* Remove an invited room ID when accepting/rejecting.

* Remove the unread badge from knocked room cells.

* Update snapshots.

* Address PR comments.

Refactor KnockRequestType to JoinRequestType.
2025-02-18 12:22:13 +00:00
Doug
bad4a8f9c8
Refactor Rust timeline identifiers into our own. (#3731)
* Refactor eventOrTransactionID.

* Refactor uniqueID.
2025-02-04 09:50:46 +00:00
Stefan Ceriu
57b85d2650 Move tracing configuration to the rust side. 2025-01-10 19:09:52 +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
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
Doug
a9e4837b62
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
03aaf849ee
Update how file captions are rendered (#3554)
* Update the File/Audio captions layout to match Figma.

* Fix caption sizing issues.

The send info label was being added incorrectly.

* Update icon size and regenerate snapshots.

* Fix a regression in the location timeline item layout.
2024-11-26 10:36:46 +00:00
Stefan Ceriu
ef288a9662
Group image and video metadata in specialised structs (#3518) 2024-11-15 15:00:27 +02:00
Stefan Ceriu
79473ef2e9
Bump the RustSDK to v1.0.67 (#3512)
* Bump the RustSDK to v1.0.67

* PR comments

---------

Co-authored-by: Doug <douglase@element.io>
2024-11-13 18:03:30 +00: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
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
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
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
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
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
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
Stefan Ceriu
d71c8c4e83
Use local room list sorting from Rust. (#2978)
* Switch to the new local room list sorting API

* Get rid of the RoomSummary enum, replace it by the inner RoomSummaryDetails

* And finally, rename RoomSummaryDetails to RoomSummary

* Fix a bunch of warnings

* Small tidy up post rebase/review.

- Remove unused invalidated property.
- Rename some RoomSummary instances to summary instead of details.
- Fix tests with missing roomListItem's.

* Update snapshots

---------

Co-authored-by: Doug <douglase@element.io>
2024-07-05 10:10:53 +01: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
Doug
c51593476c
SwiftLint fixes. (#2899)
non_optional_string_data_conversion and static_over_final_class

* Revert Data -> String changes for upcoming rule change.
2024-06-05 07:31:49 +01:00
Stefan Ceriu
064626fbbe element-hq/element-x-ios/issues/2670 - Show invites as part of the room list 2024-04-09 18:18:11 +03:00
Stefan Ceriu
97d9189077 Fixes #2624, fixes #2625 - Add user suggestions in the create room flows. 2024-04-04 16:45:10 +03:00
Mauro
7611123ae1
Send UTD occurences to Posthog (#2575)
Co-authored-by: Stefan Ceriu <stefan.ceriu@gmail.com>
2024-03-15 00:42:44 +01:00
Doug
ff35688088
Handover log file management to Rust. (#2495)
* Handover log file management to Rust.

Fix all the tests, disabling the logging ones for now.

* Merge logging tests into a single case 😬

Not ideal but at least they're now running.

* Move TracingConfiguration into its own file.

* Split up the tests into smaller functions instead of writing code like a caveman.
2024-02-23 18:29:13 +00:00
Stefan Ceriu
6d9271ce59 Fixes #2320 - Implement support for (un)marking rooms as favourite from the room list and room detail screens 2024-02-19 17:51:43 +02:00
Stefan Ceriu
9915a33964
Fixes #2360 - Add support for manually marking rooms as unread (#2408)
* Fixes #2360 - Add support for manually marking rooms as unread

* Add analytics for marking rooms as (un)read

* Remove unnecessary analytics abstraction levels

* Fix breaking API changes following SDK bump

* Add changelog

* Handle PR comments

* Fix unit tests
2024-02-05 18:06:50 +02:00
Mauro
550db5e377
Fix: Grey dot appears when you have unread messages that do not trigger a notification (#2371) 2024-01-23 15:14:53 +00:00
Mauro
dd28261e1f
Bump SDK + Mention Badge fix (#2367) 2024-01-22 17:43:39 +00:00
Mauro
f844cd1a2f
MentionBadge FF (#2281) 2023-12-22 17:57:07 +01:00
Mauro
b4538b759f
Revert "Mention badge + badge behaviour redesign" (#2283) 2023-12-22 09:44:10 +00:00
Mauro
d148827eae
Mention badge + badge behaviour redesign (#2276) 2023-12-21 15:05:39 +00:00
Stefan Ceriu
5c4e0bd76d Display whether a call is ongoing in any particular room on the room list 2023-11-13 17:02:02 +02:00
Stefan Ceriu
325ac63d66
Unit test fixes (#1846)
* Prevent notification manager tests from failing during randomised testing

* Fix flakey logging tests

* Fix flakey room notification muting tests
2023-10-03 10:25:58 +03:00
Stefan Ceriu
8e43e66115 Fix unit tests after the introduction of canBeRepliedTo on timeline items 2023-09-27 12:22:23 +03:00
Mauro
7642508135
Thread Decorator (#1686)
* just added the isThreaded property to message based events

* done but I should add a bunch of tests for images and videos and locations

* handling for image and videos, but locations might need to be double checked

* code improvement

* better tests and removed code that is not used, we need to fix first the appearence of replies

* bubble style is solved, we now need plain style

* also added plain style

* better handling for bubble style

* rounded corner only for bubbles in location

* fix for wrong aspect ratio in replies

* all changes done

* better testing

* swift format

* changelog

* PR comments and rebase.

* Simplify corner radius on location timeline view.

---------

Co-authored-by: Doug <douglase@element.io>
2023-09-15 11:58:30 +01:00
Nicolas Mauri
3ab7b1b1c7
Display the notification mode for each room in the the room list (#1595)
Co-authored-by: Stefan Ceriu <stefan.ceriu@gmail.com>
2023-08-31 11:15:38 +00:00
Stefan Ceriu
a19f5a4186 Expose the log level in developer settings 2023-08-23 16:17:49 +03:00
Stefan Ceriu
a14c995686 Fixes #1282 - Switch composer text vield to a @FocusState 2023-08-18 14:22:24 +03:00
Stefan Ceriu
dd6d1f6e63 Tweak swiftlint settings 2023-08-08 11:48:40 +03:00
Mauro
caeb86e178
Better identification system for virtual items (#1361)
* better identification system

* better handling for unknown
2023-07-19 14:29:56 +00:00
Mauro
76506752b4
SDK Changes Refactor (#1312)
* internal id

* notification refactor

* client proxy refactor

* required self

* better identifier system

* using the event id when required

* tests fixed

* tested some stuff

* fixed merge conflict

* improved the test wait

* animation disabled

* Bump Rust SDK version to 1.0.98-alpha (#1310)

* code improvement

* pause sync

* pr suggestions

* result

* Apply suggestions from code review

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

* enum based debug identifier

---------

Co-authored-by: aringenbach <80891108+aringenbach@users.noreply.github.com>
Co-authored-by: Doug <6060466+pixlwave@users.noreply.github.com>
2023-07-12 10:28:41 +00:00
Stefan Ceriu
d2d626f724
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
Doug
ea4aa943e0
Improved bug report error handling (#1018)
* Improve rageshake error handling.

* Add a max file size and exclude older files one the limit is hit.

* Zip log files as smaller chunks.
2023-06-06 11:24:01 +03:00
Stefan Ceriu
1bd6e461ed
Reply rendering (#861)
* Cleanup how we use message timeline items in preparation for rich reply rendering

* Expose reply details up to the UI level

* Render replies in the timeline (textual for now). Remove now unused AttributedStringBuilderComponent isReply flag.

* Move reply detail loading to when the item appears instead of when it's created.

* Fix unit tests

* Fetch event details also when the reply details are in the error state

* Tweaks following code review

* Localise emote bodies

* Fix replies not loading sometimes, use the current event identifier instead of the one being replied to
2023-05-09 16:09:38 +03:00
Stefan Ceriu
be8adb19b5
Structured logging (#831)
* Structured logging support

* Bump the SDK, fix breaking changes

* Enabled more logging of timeline diffs

* Keep only source file last path components in logs

* Bump the SDK, tweaks following code review
2023-04-25 14:48:20 +03:00
Stefan Ceriu
5a14c700cc
Add animated gif support (#825) 2023-04-24 17:44:58 +03:00
Alfonso Grillo
41994baa4f
Invites list (#787)
* Setup invites SS window

* Add invites label in the home screen

* Add empty invtes list

* Setup navigation to invites list

* Inject invitesSummaryProvider

* Show invites

* Add InviteCell

* Refine InviteCell UI

* Push invites

* Amend SS configuration

* Add inviter in RoomProxyProtocol

* Add Invite model type

* Improve InviteCell

* Fix media provider injection

* Refine InviteCell

* Refine invite cell

* Add invites feature flag

* Try different SS config for invites

* Regiester invites view in configureViewsPostInitialSync

* Cleanup

* Start tests

* Cleanup code

* Add changelog.d file

* Add tests

* Handle canonical alias

* Add InvitesListScreen previews

* Add localisations and improve UI tests

* Add reference screenshots

* Cleanup code

* Fix UT build errors

* Refactor InvitesList -> Invites

* Apply pr comments

* Remove reduntant @MainActor

* Naming cleanup

* Fix InvitesScreenCell.title

* Add accept/decline InvitesViewAction

* Revert Package.resolved

* Add warning in InvitesScreenCell

* Improve PlaceholderAvatarImage

* Record snapshots again

* Refactor Invite -> InvitesRoomDeatils

* Rename identifier in PlaceholderAvatarImage
2023-04-14 10:49:57 +00:00
Stefan Ceriu
a3c7c47a69 Made room state event collapsing configurable, expose it in the developer menu. Allow the UserSetting property wrappers to only store values in memory (+11 squashed commits)
Squashed commits:
[42e45fc] Even more tweaks following code review
[5dcd5be] Add swift-algoritms and switch bubbling detection to its `chunked` method
[4ac70ed] Move the groupBy implementation to Collection instead of Array
[6aeffc3] Tweaks following code review
[0ca5ac2] Bubbles working again, grouping computed closer to the UI level
[3a66030] Refactor how timeline items are built in the RoomTimelineController
[57d51e9] Remove grouping from timeline items
[8608950] Remove the RoomTimelineViewFactory, update the GroupRoomTimelineView
[9e52e61] Add array grouping extension, unit tests and switched the timeline controller to it
[7d213a1] First attempt
[90bb1d7] Remove now unused `RoomTimelineController` `updatedTimelineItem` calback
2023-02-24 07:34:07 +02:00
Stefan Ceriu
f8e6179933
Add permalink detection and custom attributed string attributes (#536)
* Pass full attributed string to TimelineItems and let the UI level handle blockquote coalescing
* Add permalink detection and attribute embedding within the attributed string
2023-02-06 14:59:32 +00:00
Doug
2aaeb576d2
Further design updates to the timeline. (#524)
- Decryption banner on the timeline
- Bubble colours
- Background insets
- Multiline composer corner radius
- Read marker
- GIF indicator
- Reactions shape
- Use RoomTimelineViewLabelStyle everywhere possible
- Only set a line limit on reply quotes, allow all the lines for regular quotes.
- Message label icons
- Yes/No button casing
- Make sender profiles immutable.
- Enable copy link and invite buttons.
- Fix layout loop detecting multiline composer text.
- Add animation to the encryption banner.
2023-02-03 14:09:48 +00:00