Commit Graph

70 Commits

Author SHA1 Message Date
Nicolas Mauri
ca7637f84b Fix a crash that can occur when updating timeline items in a background thread (#2268) 2023-12-19 15:05:21 +00:00
Mauro
bc97bdeea5 Removing dead code part 3 (#2264) 2023-12-19 12:12:16 +01:00
Nicolas Mauri
7a66c05319 Polls history (#2244) 2023-12-18 15:38:39 +00:00
Mauro
38fe44a50e Send html in plain text mode (#2246) 2023-12-15 10:04:51 +01:00
Alfonso Grillo
c9c429e159 Add TimelineProxy (update sdk to 0.0.7-november23) (#2178)
* Refactor RoomProxy

* Refactor paginateBackwards

* Refactor sendReadReceipt

* Refactor messageEventContent APIs

* Refactor sendMessage

* Refactor toggleReaction

* Refactor send attachments

* Refactor sendLocation

* Refactor cancel/retry send

* ⚠️ Fix encryption build errors

* Refactor editMessage

* Refactor retryDecryption

* Refactor fetchDetails

* Refactor polls APIs

* Refactor fetchMembers

* Refactor RoomTimelineProviderProtocol

* Update sdk to 0.0.7-november23

* Fix UTs

* Fix comment

* Delete old workaround

* Move TimelineProxyError

* Delete queue warnings

* Fix key listener

* Add pollHistory timeline property

* Refactor room/timeline subscriptions

* Delete unused code
2023-11-28 19:01:35 +00:00
Stefan Ceriu
644412a748 Extract room screen action handling into separate component (#2045)
* Extract room screen action handling into separate component

* Fix tracing configuration unit tests

* Move the custom reactionsCollapsedBinding to the TimelineReactionsView

* Move voice message playback handling from the timelineController to the room view model

* Reorder methods

* Remove the need for a media player provider in the timeline controller

* Move room attachments opening to the view model, remove the need for a media provider in the timeline controller

* Rename RoomScreenActionsHandler -> RoomScreenInteractionHandler

* Move message sending retry and cancellation to the timeline controller.

* Move audio playback, attachment loading and  user tapping handling into the InteractionHandler

* Fix unit tests

* Switch back swiftlint file_length rule error to 1000 lines
2023-11-08 18:31:39 +02:00
Alfonso Grillo
00994dc3d7 Add deferred spinner for voice messages (#2018)
* Add  delayedLoaderPlaybackState

* Add more tests

* Fix Xcode 14 build error

* Refactor  delayedLoaderPlaybackState -> playerButtonPlaybackState

* Fix runtime issue
2023-11-03 10:39:22 +00:00
Nicolas Mauri
dbc1704751 Fix the delay when switching between voice messages (#1985) 2023-10-30 19:44:59 +00:00
Nicolas Mauri
2f7382fbf0 Fix: Keep the progress indicator visible after pausing or scrubbing a voice message. (#1969) 2023-10-27 15:24:22 +00:00
Nicolas Mauri
d07532da6f Fix: Always detach voice message audio player state before playing another one (#1965) 2023-10-26 14:12:21 +02:00
Nicolas Mauri
ec78d43acd Fix playback and recording of voice messages (#1948) 2023-10-24 16:49:42 +00:00
Stefan Ceriu
2f5ffd43f8 Key backup returns (#1951)
* Converge on UserSessionFlowCoordinator logout confirmation

* Add logout confirmation screen strings to untranslated.

* Fix chat backup learn more URl fragment.

* Implement logout flows that check recovery and key backup for the last session

* Move logout confirmation screen strings to localazy

* Change encrypted timeline item copy to "Waiting for decryption key"

* Use different encrypted history banner based on key backup states

* Introduce a SettingsFlowCoordinator and implement navigation directly to the secure backup screen from the logout flows.

* Fix **mocked** secure backup controller flows

* Simplify encrypted history banner logic

* Address PR comments
2023-10-24 18:38:41 +03:00
Nicolas Mauri
54be55e4af Allow to record a voice message (#1926) 2023-10-23 15:47:36 +00:00
Mauro
04cce54c40 Send Intentional Mentions (#1929)
* updated sdks

* fix waveform

* implementation completed

* intentional mentions test

* removed unused var

* suggestion
2023-10-20 16:51:25 +03:00
Nicolas Mauri
64f5122d32 Add UI to record a voice message from the composer toolbar (#1892) 2023-10-16 15:18:51 +00:00
Alfonso Grillo
a8de32c034 Stop audio on redaction (#1893) 2023-10-16 10:22:09 +02:00
Nicolas Mauri
23768d141b Add voice message playback from the timeline (#1844) 2023-10-04 16:32:45 +00:00
Nicolas Mauri
ec76c2973f Add voice message rendering to the timeline (#1776) 2023-09-21 14:36:21 +00:00
Stefan Ceriu
10c08bcf3a #1246 - Prevent timeline items from being computed on the main thread when instantiating the RoomTimelineController; speed up the room selection animation. 2023-09-20 15:12:35 +03:00
aringenbach
cddacbc146 Initial integration of RTE (#1464)
* Initial integration of RTE

* Fix `clipped`, `focused` and composer view type

* Remove horizontal padding

* Add `ComposerToolbar` mock

* Restore `composerFocusedSubject`

* Allow using HTML from RTE on message sent

* Fix new message content API

* Add feature flag for Rich Text Editor
2023-08-29 12:37:13 +00:00
Stefan Ceriu
fcb4a22079 Fixes #1455 - Use the stable timeline id to match timeline items in between local echo and remote echo states 2023-08-08 11:48:40 +03:00
Doug
404af0763a Send read receipts as messages are displayed. (#1426) 2023-08-01 11:53:02 +01:00
Doug
f47ccc1ae1 Tweaks for macOS (#1383)
* Fix constant Create Room button animation on macOS.

* Allow right-clicking on timeline items to work again on macOS.

* Use inline media upload previews on macOS

This comes with the caveat that the previews are no longer interactive.
2023-07-24 12:08:50 +00:00
Mauro
76b0cede77 Flipping the tableView (#1366)
* I can't believe this works so well.

* code improvements

* we probably just need to change the TODO

* better naming

* done, there is only one small bug to fix

* fix

* this needs to be decided

* fixed the backpagination issue and improved the scroll to top gesture triggered by tapping on the clock (but won't work when I am at the bottom)

* fix
2023-07-20 11:29:45 +00:00
Mauro
529779968f Better identification system for virtual items (#1361)
* better identification system

* better handling for unknown
2023-07-19 14:29:56 +00:00
Mauro
8e39102daa Diffable fade animations (#1343)
* animate only 2 seconds after the appearence

* scrolling is stable

* code improvement

* comment and removing code that is not necessary anymore

* feature flag

* comment

* better code

* the day divider ID is the timestamp itself as ISO

* Apply suggestions from code review

Co-authored-by: Alfonso Grillo <alfogrillo@gmail.com>

* format fix

---------

Co-authored-by: Alfonso Grillo <alfogrillo@gmail.com>
2023-07-18 14:18:11 +00:00
Mauro
a3671e9685 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
Flescio
e93af88ea5 Send current user location (#1272)
* add new asset for location, add logic for sharing user current location

* work on default zoom and auth for location

* add attribution button

* fix attribution button position, fix isSharingUserLocation

* Add NSLocationWhenInUseUsageDescription back

* Fix initial animation

* change map logo and attribution position

* Add annotation just in the setup

* add errors and alert for map vies

* location unit test

* add unit test for location sharing

* add changelog

* Update ElementX/Sources/Other/MapLibre/MapLibreMapView.swift

Co-authored-by: Alfonso Grillo <alfogrillo@gmail.com>

* add comments and minor parameters refactor

* Update ElementX/Sources/Screens/LocationSharing/StaticLocationScreenCoordinator.swift

Co-authored-by: Mauro <34335419+Velin92@users.noreply.github.com>

* Update ElementX/Sources/Screens/LocationSharing/StaticLocationScreenViewModel.swift

Co-authored-by: Mauro <34335419+Velin92@users.noreply.github.com>

* Sort assets

* Cleanup

* Cleanup

* Fix error localizations

* Fix tests

---------

Co-authored-by: Alfonso Grillo <alfogrillo@gmail.com>
Co-authored-by: Mauro <34335419+Velin92@users.noreply.github.com>
2023-07-11 10:42:59 +00:00
Mauro
0e5ba1fa6f SDK Bump + Back pagination state listener (#1274)
* backPagination improved

* sdk bump

* removed unused line

* Update ElementX/Sources/Services/Timeline/TimelineController/RoomTimelineController.swift

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

* cancelling the TaskHandle on deallocation

---------

Co-authored-by: Doug <6060466+pixlwave@users.noreply.github.com>
2023-07-07 07:54:40 +00:00
Doug
aa011acdc4 Add encryption history banner and update session verification banner strings. (#1250)
* Add a hard wall on back-pagination in encrypted rooms.
Until the app supports key backup, the history will never be decryptable.

* Fix initial display of the timeline table view.

* Update session verification banner strings.
2023-07-05 14:08:31 +01:00
Alfonso Grillo
5cf41347ca Update SDK to 1.0.94-alpha (#1232)
* Update SDK

* Map new location fields

* Add LocationRoomTimelineItemContent.AssetType
2023-07-04 06:39:32 +00:00
Mauro
66c91dde2a Editing a failed echo, just cancels and resends it (#1207)
* editing a failed message means cancelling and resending it

* changelog
2023-06-29 14:37:52 +00:00
Alfonso Grillo
eb65619979 Open map from timeline (#1199)
* Add navigation to expaneded map

* Add MapLibreMapView.Options

* Add AppActivityView

* Add ShareToMapsAppActivity

* Add share sheet presentation

* Add localisations

* Cleanup

* Fix UT build errors

* Revert breaking change

* Fix UIView setup

* Add support for location’s description

* Show popover on iPad

* Restore assets

* More cleanup
2023-06-29 09:12:42 +00:00
Stefan Ceriu
abe1df2524 Removed unused swipe gesture (+3 squashed commits)
Squashed commits:
[d64bb3bb] Stop using the ServiceLocator directly in the ScreenTrackerViewModifier
[37c46ab9] Rename Analytics to AnalyticsService
[8852a371] #920 - Cleanup ServiceLocator usages
2023-06-28 11:33:41 +03:00
Mauro
c67e79c423 Filter out some actions for failed local echoes (#1184)
* done

* pr suggestion
2023-06-27 16:41:18 +00:00
aringenbach
ec4a916951 Rename sendReaction as toggleReaction 2023-06-26 20:25:55 +03:00
Stefan Ceriu
839fec5e2c Fixes #978 - Message forwarding support
* Add support for message forwarding

* Move the TimelineProvider within the RoomProxy to avoid it going out of sync and have it automatically register for timeline updates on init

* Implement single selection form button style for message forwarding

* Add searching and filter out the source room from the list

* Fixed emoji screen initial search bar height

* Add view models tests

* Add changelog

* Update strings

* Tweaks following code review
2023-06-21 12:10:14 +03:00
Stefan Ceriu
ada4fb81a4 Start fetching timeline item details directly on creation 2023-05-17 16:17:48 +03:00
Stefan Ceriu
bc62f230d6 Low effort fix for timeline date separator glitches 2023-05-09 18:19:33 +03:00
Stefan Ceriu
b8ad1af172 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
8c19e66185 Pass attachment bodies when loading media 2023-05-04 11:32:44 +03:00
Stefan Ceriu
9061389858 Adopt new timeline item debug info and overhaul the timeline item deb… (#781)
* Adopt new timeline item debug info and overhaul the timeline item debug menu
2023-04-19 18:07:51 +03:00
Doug
e572bb226d Move media file loading logic to the SDK. (#702)
* Adopt getMediaFile for media previewing.
2023-03-20 14:51:33 +00:00
Mauro
0690a96e13 Report Content v2 (#659)
* created the empty files

* set up the view content

* connected the Room Coordinator to the ReportContent Coordinator

* added the loading indicators and the dismiss behaviour

* almost completed but I need to display the success indicator when the report is sent succesfully

* completed

* added an untranslated string

* tests

* Update ElementX/Sources/Screens/RoomScreen/RoomScreenCoordinator.swift

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

* Update ElementX/Sources/Screens/ReportContent/View/ReportContentScreen.swift

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

* pr comment

* pr suggestion

* removing unused identifiers

* fixing compilation error

* added a form text editor view

* changelog

---------

Co-authored-by: Doug <6060466+pixlwave@users.noreply.github.com>
2023-03-02 18:24:10 +00:00
Stefan Ceriu
833d586adb Collapsible timeline item tweaks (#646)
* Fix collapsible timeline items grouping just one item, remove duplicate timeline item checking, clean up the logic

* Cleanup collapsible, separator and state room timeline view paddings

* Add changelog
2023-02-27 17:57:41 +02:00
Stefan Ceriu
bf19e3e00b 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
Mauro
949b9c7d55 Audio Timeline Item support (#612)
* audio timeline item support

* improved the code to reduce cognitive complexity

* no need anymore for this swiftlint disabling of a rule

* pr comments
2023-02-23 11:06:31 +00:00
Mauro
5d5f788a77 Report Content (#587)
* ui for reporting content has been implemented

* implementation done, will only work withe a mx rust sdk that supports report content

* fix

* code improvements

* code improvement

* fix typo

Co-authored-by: Stefan Ceriu <stefanc@matrix.org>

* removing unneeded task

* code improvement

* changelog

---------

Co-authored-by: Stefan Ceriu <stefanc@matrix.org>
2023-02-22 17:14:43 +00:00
Stefan Ceriu
1cac46b11e 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
d41600cc0b Revert decryption banner & try fix context menu crash. (#525) 2023-02-03 18:24:28 +02:00