3180 Commits

Author SHA1 Message Date
Stefan Ceriu cf44ffb454 Removed now unused loadDisplayName room proxy method 2022-11-29 12:43:29 +02:00
Stefan Ceriu 849e126eb0 Move room user avatar and display name fetching to a serial queue 2022-11-29 12:43:29 +02:00
ismailgulek cb5db22b7f Fix state machine crashes & background tasks (#343)
* Fix `UIApplication.shared` after moving to SwiftUI app

* Do not autoplay videos on background

* Move app state changes into the app coordinator

* Add application background task, move into the suspended state more accurately

* Add changelog

* Fix most of the linter errors

* Strip suspended state from state machine

* Fix build

* Clear audio session warning

* Update AppCoordinator.swift

* Update AppCoordinator.swift

* Swift format
2022-11-28 18:42:49 +03:00
Doug bd530333df Match reaction alignment to message alignment. (#344)
* Match reaction alignment to message alignment.

* Add extra padding for clearer bubble alignment.
2022-11-28 11:54:00 +00:00
ismailgulek 232430ac95 Image viewer (#338)
* Resume other app's music when video playback finished

* Remove old media player

* Add `isModallyPresented` into the video player screen

* Create image viewer screen

* Add test screen identifier

* Display image viewer when message tapped

* Fix template script unit test path

* Tweaks on scaling

* Commit project file

* Add changelog

* Ignore safe areas on the file preview screen

* Display images in preview

* Remove image viewer screen

Co-authored-by: Stefan Ceriu <stefanc@matrix.org>
2022-11-28 11:19:40 +00:00
Stefan Ceriu 9589c689c3 Remove unnecessary marks, they bring little value 2022-11-28 12:46:06 +02:00
Doug 5762dc3037 Setup tracing with a typed configuration. 2022-11-28 09:31:33 +02:00
Doug f776575c81 Stop making previews for light & dark colour schemes. (#345)
Xcode 14 now has preview variants for this.
2022-11-25 17:49:13 +00:00
Stefan Ceriu 00cd2ab707 Set visible ranges on the home screen sliding sync view (#342)
* Set visible ranges on the home screen sliding sync view
* Prevent the visible items from being updated while in search mode
* Enable diffs on invalidations as they seem to fix duplicated events in the home screen room list
* Promoted some diffing logs to info from verbose
2022-11-25 17:50:43 +02:00
Stefan Ceriu 1781f92882 Switch back to the old room instead of the slidingSyncRoom for dealing with the timeline 2022-11-24 17:54:05 +02:00
Stefan Ceriu 0f7c1fc581 Remove sliding sync .live state check as it doesn't happen for selective ranged syncs 2022-11-24 17:54:05 +02:00
Stefan Ceriu 00876e02f8 Add hard limit of 50 rooms to sliding sync and the home screen 2022-11-24 17:54:05 +02:00
Stefan Ceriu 03130f41fb Fix rooms not showing up as placeholders after switching from the skeletons state 2022-11-24 17:54:05 +02:00
Stefan Ceriu 7d8e94d3a7 Crash fixes (#337)
* Add diffing logs and be more aggresive about unexpected states
* Move diff collection on a serial queue
* Handle now optional `addTimelineListener` result
* Treat RoomSummaryProvider invalidations separately
* Bump RustSDK to v0.0.9-demo
2022-11-24 15:32:23 +02:00
Stefan Ceriu 729e7608d8 Fix app wide accent color 2022-11-24 10:35:53 +02:00
Stefan Ceriu d89782a8b2 Reduce automatic back pagination delay to 0.25 seconds 2022-11-24 10:35:53 +02:00
Stefan Ceriu 8647152980 Reduced RoomSummaryProvider and RoomTimelineProvider throttle delay
Reduced RoomSummaryProvider throttle delay and disable the RoomTimelineProvider one entirely
2022-11-24 10:35:53 +02:00
Stefan Ceriu e928df8664 Remove session restoration loading indicator as it's faster now 2022-11-24 10:35:53 +02:00
Stefan Ceriu 1db49a4600 Fix incorrect diffing behavior on replacement in both the timelineProvider and the roomSummaryProvider 2022-11-24 10:35:53 +02:00
Stefan Ceriu cee628e651 Switch to the sliding sync room for working with the timeline 2022-11-24 10:35:53 +02:00
Stefan Ceriu 92b22e19e2 Add support for sliding sync cold cache 2022-11-24 10:35:53 +02:00
Stefan Ceriu 1102580d6c UI test fixes (#335)
* Remove status bars when running UITests
* Remove simulator OS versions from screenshot names, be less lenient with image diffing
* Rename UITests splash screen to onboarding
* Switch tests to Xcode 14.1, remove version names for used simulators and switched from iPhone 13 Pro Max to iPhone 14
* Fix ServiceLocator and fallbackLaguage for UI tests
* Drop snapshot diffing precision to 0.99 as 0.999 triggers false negatives
* Fix server selection UI tests after exposing the sliding sync proxy configuration
* Update reference screenshots
2022-11-24 10:35:00 +02:00
paleksandrs 193c97de6d Timeline scrolling performance issues 2022-11-22 18:47:53 +02:00
Doug 5c4ca74426 Use a VStack on the timeline (#332)
* Use a VStack for the timeline.

Replace edge publishers with a binding.

* Allow both top and bottom edges to be detected.

* Fix scrolling with frame changes.
2022-11-22 13:28:35 +00:00
Doug 6c2ea61585 #305: Fix message composer padding with multiple lines. 2022-11-22 09:46:02 +00:00
ismailgulek d389ce7ad7 Notifications (#275) 2022-11-21 19:37:13 +03:00
Stefan Ceriu 9f3ed6ca7b Revert "Force the timeline to stay at the bottom when first loading"
This reverts commit ef8d230328.
2022-11-21 15:02:28 +02:00
Stefan Ceriu ef8d230328 Force the timeline to stay at the bottom when first loading 2022-11-21 11:11:58 +02:00
Stefan Ceriu 3e1fde6442 Switch the roomSummaryProvider and roomTimelineProvider to collect on the default global queue instead of background 2022-11-21 11:11:58 +02:00
Stefan Ceriu 711c16cc2a Decrease timeline back pagination size from 50 to 20 2022-11-21 11:11:58 +02:00
Aleksandrs Proskurins 9d6495d14a Send messages on return (#325)
* Send messages on return

* Formating

* Changelog
2022-11-18 15:43:03 +00:00
Doug ba684d8efb #166: Re-write MXLogger in Swift
* Add logging tests that cover file rotation.

* Re-write MXLogger in Swift.
2022-11-18 15:02:01 +00:00
Aleksandrs Proskurins 77a0d5a58f Introduce sending and sent state for timeline messages (#319)
* Updated md files

* Changelog

* Update CONTRIBUTING.md

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

* PR fixes

* Sending state in the timeline

* Changelog

* Formating

* Project file

* Make MessageTimelineItemDeliveryStatus Equatable

* Renamed seconds ago to elepsed time

* Moved show/hide logic into TimelineDeliveryStatusView

* Hide view when unknown status

* Added delivery status for other items

* Cleanup

Co-authored-by: Stefan Ceriu <stefanc@matrix.org>
2022-11-17 15:47:28 +00:00
Stefan Ceriu 276daf0355 Expose sliding sync proxy URL on the server selection screen; make app more resilient to slidinc sync configuration errors, remove fatal errors 2022-11-17 14:04:24 +02:00
Stefan Ceriu 2fd0491a18 SwiftUI NavigationController and UserNotificationControllers (#309)
* Fixes #286 - Adopted the new SwiftUI NavigationStack based NavigationController throughout the application
* Fixes #315 - Implemented new user notification components on top of SwiftUI and the new navigation flows
* Add home screen fade animation between skeletons and real rooms
* Bump the danger-swift version used on the CI and swiftlint with it
* Renamed Splash to Onboarding, Empty to Splash
2022-11-16 13:37:34 +00:00
ismailgulek 287fa4cad5 File messages on timeline (#311)
* Create media player screen

* Introduce `FileCache` to cache message attachments

* Add file loading functionality into the media provider

* Process tap action on timeline items

* Pass item taps to view model

* Navigate to media player on view model callback

* Commit project file

* Add changelog

* Add file messages into the timeline

* Create file preview screen

* Display files in the preview screen

* Commit project file

* Update Rust SDK to 1.0.19-alpha

* Add changelog

* Bump the RustSDK to `v1.0.20-alpha`

* Configure audio session on video playback

Co-authored-by: Stefan Ceriu <stefanc@matrix.org>
2022-11-16 11:34:37 +00:00
Stefan Ceriu ce6b0041d2 Fixes #296 - Improved bubble timeline item corner radii 2022-11-16 11:22:57 +02:00
Stefan Ceriu 2bce779206 Revert timeline item scrolling change in 3401d7a that seems to have introduced regressions. 2022-11-15 15:42:20 +02:00
ismailgulek 2e56fe9380 Video playback (#308)
* Create media player screen

* Introduce `FileCache` to cache message attachments

* Add file loading functionality into the media provider

* Process tap action on timeline items

* Pass item taps to view model

* Navigate to media player on view model callback

* Commit project file

* Add changelog

* Rename media to video

* Add a loader when large videos being processed

* Add back button explicitly on video screen, fixes for light scheme

* Handle right swipe to dismiss video
2022-11-14 08:58:18 +00:00
ismailgulek 3401d7a7e2 Message editing (#298)
* Add translation for editing mode

* Add `is_editable` flag to timeline item

* Add edit api implementation

* Add edit context menu action

* Add changelog

* Update Rust package

* Add isEditable into video timeline item

* Fix cyclomatic complexity

* Fix video item thumbnail loading

* Fix not updating timeline layout
2022-11-10 11:41:38 +00:00
ismailgulek 9f12b34a98 Video messages on timeline (#304)
* Create timeline item and view for video

* Create video timeline items in factory, do not bubble them

* Add changelog

* Update packages

* Revert DTCoreText update
2022-11-10 13:45:35 +03:00
ismailgulek 6c6c188f73 Regex: Fixes Permalink action on timeline (#303) 2022-11-09 11:20:19 +00:00
Stefan Ceriu 89742ceb53 Non-decryptable timeline items and debug menu (#300)
* Fixes #292 - Added a timeline item context menu option for printing and showing their debug description
* Fixes #291 - Add support for non-decryptable timeline items
2022-11-08 11:17:38 +00:00
ismailgulek 7a7680b165 Reset keyboard after message sent (#299) 2022-11-08 13:04:18 +03:00
Stefan Ceriu fcd94fca31 Fixes #271 - Allow bubbles to horizontally fill the available space (#290)
* Fixes #271 - Allow bubbles to horizontally fill the available space
* Set the existing timelineItems on the timeline when appearing. This fixes UI tests in which items exists without the need for backpagination. It also presumably will fix the timeline when having cached data.
2022-11-04 17:16:39 +02:00
Stefan Ceriu 162830086f Fixes #273 - Remove home screen animations 2022-11-04 15:51:18 +02:00
Stefan Ceriu 37cfb8f50e Fixes #239 - Use new restoration token format, pass stored homeserver url to the client builder when restoring, dropping the need for a network request
- bumped the rust sdk to v1.0.17-alpha
- move all UserSession related files to Services/UserSession
2022-11-04 15:44:18 +02:00
ismailgulek f6a599a51b Concurrency Fixes (#283)
* Review places where MainActor used

* Adapt to MainActor changes, avoid redundant task detachments

* Move Rust client operations into a dedicated concurrent queue, make init async

* Add changelog

* Fixed small working for awaiting non-async method

* Remove some redundant tasks

* Put back some main actors

* Fix tests

* Fixed timeline updates when the number of items doesn't change. Keeps more previous home screen room data between reloads

Co-authored-by: Stefan Ceriu <stefanc@matrix.org>
2022-11-02 18:25:46 +03:00
Stefan Ceriu 965569aae2 Fixes #279 - Fix plain timeline style layout, fix various TimelineViews' previews (#284) 2022-11-02 12:06:10 +00:00
Stefan Ceriu fabb0bc95f New timeline (#276) (#280)
* Fixes #276 - Rebuilt room timeline:
    - Removed the need for the ListCollectionViewAdapter
    - Rewrote the TimelineItemList without using introspection
    - Added ReversedScrollView for laying out items at the bottom/trailing
    - Rewrote TimelineProvider diffing through CollectionDifference (similar to the RoomSummaryProvider)
    - Added back `scrollDismissesKeyboard`  behavior
    - Various other tweaks and fixes
- Fixed various warnings:
    - removed async AttributedStringBuilder as AttributedString is non-sendable, made the RoomTimelineItemFactory synchronous
    - removed unused virtual timeline items
    - removed unused isOutgoing property from the FormattedBodyText
* Make TimelineItemContextMenuActions indentifiable and specify contextMenu identifiers
* Bump the matrix-rust-components-swift to v1.0.16-alpha
* Add changes file and changelog contribution guide
* Fix attributed string builder unit tests
2022-11-02 13:03:34 +02:00