33 Commits

Author SHA1 Message Date
Stefan Ceriu
8bfd802793 Add support for showing the native OS incoming call screen when starting new Element Calls 2024-05-24 15:32:56 +03:00
Stefan Ceriu
8ba544bc44
Cleanup following the AppMediator introduction (#2723)
- stop using multiple background task, the appCoordinator sync one is enough for the whole app
- move the AppMeditor to the MainActor
- expose the WindowManager through the AppMediator
- hide sensitive WindowManager API behind a different protocol
- remove the now unnecessary `BackgroundTaskService`
2024-04-22 18:10:24 +03:00
Stefan Ceriu
9a172df7fd Introduce an AppMediator which will:
- combine multiple services to handle app wide requests
- remove direct UIApplication access from everywhere
- fix #2703 by combining UIApplication.applicationState with the WindowManager's main window appearance
- leave the door open for more app control in the future (especiall for the mac)
2024-04-19 15:43:56 +03:00
Stefan Ceriu
fcc25dd441 Adop the new SDK permalink detector and user builder 2024-04-12 18:04:41 +03:00
Doug
eda7d59518
Update strings and add productionAppName value for the new placeholder. (#2677)
* Update strings and add productionAppName value for the new placeholder.

* Fix snapshots.

* Fix more snapshots.
2024-04-10 16:58:00 +01:00
Stefan Ceriu
7a9e4819c1 Add .xcprivacy info files to the main app and the notification service extension 2024-03-18 17:31:46 +02:00
Mauro
a4bc7b8e36
Custom copy for notifications that contain mentions (#2050) 2023-11-09 18:12:11 +00:00
Mauro
ad0b2f114f
@room in user suggestions (#1880)
* for now I am using a local RTE solution, need to fix one test

* fixed a test

* new rte version

* pr suggestions

* @room added to the suggestions

* removed empty space

* revert

* code improvement

* project updated

* package
2023-10-12 16:15:47 +00:00
Doug
2c5662a278
Remove DesignKit package (#1886)
- Move button styles to Compound
- Rename text style to AuthenticationTextStyle as its only in the auth flow.
- Add the brand colour locally for now until its included in Compound.

* Update snapshots.

---------

Co-authored-by: Stefan Ceriu <stefan.ceriu@gmail.com>
2023-10-12 15:45:27 +01:00
Mauro
6bc5a440b2
Fixed a bug that prevented the mentions to be shown as plain text in the room list cell (#1835)
* fix a bug that made the room list not render mentions as plain text

* better naming
2023-09-29 14:49:20 +00:00
Mauro
b5ff6bb93e
Fix for reversed placeholder on notifications on iOS 17 (#1785)
* fix

* invalidating cached images only for iOS 17

* removed paranthesis

* better code

* fix
2023-09-25 09:46:43 +02:00
Mauro
9d91cd4fc0
Preview Tests (#1768)
* preview testing

* removed some views that are not really testabl in UnitTests and improved other tests
2023-09-20 17:33:31 +02:00
Stefan Ceriu
97aa930852
Parse markdown and html from push notifications (#1688)
* Extract notification content building outside of the NotificationItemProxy. First step in a bigger refactoring of the NSE

* Import the attributed string buider into the NSE, sort `sources` imports

* Extract message event string building into the RoomMessageEventStringBuilder and reuse it building content for push notifications

* Cleanup

* Add changelog
2023-09-13 12:30:41 +03:00
Mauro
8188fd2d2a
NSE user agent support (#1507) 2023-08-17 13:11:34 +00:00
Alfonso Grillo
1529b5b8ca
Update SDK to 1.0.102-alpha (#1408)
* Update SDK to 1.0.102-alpha

* Log error

* Notification Improvements API part 1 (#1410)

* changes

* WIP

* progress

* updated test

* removed unused

* code improvement

* Process diffs as batches provided by the SDK.

---------

Co-authored-by: Mauro <34335419+Velin92@users.noreply.github.com>
Co-authored-by: Doug <douglase@element.io>
2023-07-27 09:48:56 +00:00
Mauro
544d928287
Placeholders added in push notifications (#1176)
* placeholders added in push notifications

* this code is a bit easier to read

* code improvement
2023-06-27 11:44:19 +00:00
Mauro
afc4332716
Two sync loop experimental solution to decrypt push notifications (#1082)
* Experimental two sync loop solution

* better logging

* improved the code and handled invite notifications display better

* improved invite notifications

* new exerimental branch

* new sync loop

* code updated

* code improvements

* code improvements

* fix typo

* code improvements

* removed some unused code and added a respawn

* fixing some NSE issues

* code improvements

* new version of the branch

* more logging

* running the nse process ONLY IF necessary

* finally works! made also the feature flag

* also the encryption value of the room list api will depend on the flag now

* changelog

* code improvements

* code improvement

* updated proj

* fixing some compilation error after the rebase

* opt-in for the encryption sync

* fix
2023-06-22 17:23:33 +00:00
Stefan Ceriu
c7ee69d75d Change the bundle display name to Element X, keep the rest as ElementX 2023-06-08 12:49:09 +03:00
Mauro
ce6d68614a
Showing the iOS default silhoutte when the user/room avatar is missing (#965)
* fix

* Element X app name

* project update

* improvement
2023-05-29 08:41:01 +00:00
Mauro
f679c0ca2a
Remote Push Notifications can now be decrypted (#854)
* refactored the NSE to use the client function

* removed unused imports in the target.yml

* some code improvements

* changelog

* code improvement

* code improvement

* more code improvements

* separated the client and the media provider in a dedicated NSEUserSession

* Update ElementX/Sources/Services/Client/ClientProxy.swift

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

* pr suggestions

* logging the error

---------

Co-authored-by: Doug <6060466+pixlwave@users.noreply.github.com>
2023-05-05 15:29:46 +00:00
Mauro
95492d7e10
Avoid race and duplication conditions between local and remote notifications (#848)
* added timestamp control of the local notification

* improved the code, and implemented the solution, just needs some testing

* sdk bump

* UserPreference init with initialValue instead of defaultValue

* pr suggestions

* changelog

* notifications sliding sync view added
2023-05-03 14:28:07 +00:00
Mauro
ccccdce0fc
Notification Handler to handle notifications in foreground (#837)
* changed how the notifications are handled

* local notifications can be decrypted and shown!

* Improved the handling for the mock and for the normal messages

* Avatar images are also displayed

* pr ready, commented some code that is not supposed to be releaaed yet, adjusted some tests and added some source code in the targets

* fixing some swiftlint complaints and removed an unused function

* better swiftlint disable

* addressing PR comments
2023-04-28 12:36:16 +00: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
6700d4301d
#748 - Implement methods for processing various media types and prepa… (#772)
* #748 - Implement methods for processing various media types and preparing them for upload

* Various tweaks following code review:
- added blurhash generation
- changed thumbnails to jpeg
- throwing if file size cannot be retrieved
- move MediaProvider files to separate folder so they can cleanly be imported in the NSE
- added audio file processing
- switched all image resizing methods to ImageIO
- various renames

* Fix blurhash formatting issues, `swift-format-ignore-file` doesn't work

* Processing all media within unique folders to avoid conflicts

* Fix various warnings

* Rename `sizeForItemAt(_ url: URL)` to `sizeForItem(at url: URL)`

* Remove unnecessary resizeImage(UIImage) method, start by copying not moving the file to the unique location

* Add back warning for roomDetails.avatarURL
2023-04-21 12:13:36 +03:00
Mauro
3d0d883637
Notifications are now handled when the app is in a killed state (#801)
* WIP, added support for receiver id and managed a way to store the app router state

* WIP, added support for receiver id and managed a way to store the app router state

* Notification Manager is now becoming the UNUserNotificationDelegate ASAP

* code improvements + changelog

* fixed Unit Tests

* pr suggestions
2023-04-14 14:24:48 +02:00
Doug
efdb47a98a
Move media file loading logic to the SDK. (#702)
* Adopt getMediaFile for media previewing.
2023-03-20 14:51:33 +00:00
Stefan Ceriu
bd4c0b72cb
Media loading flow changes (#483)
* Use an imageProvider directly from the view in the home screen

* Add support for media request coalescing

* Rename MediaProxy to MediaLoader

* Add new image loading mechanism to the room details screen avatar.

* Use the `SettingsScreen` prefix for all settings screen related components

* Add new image loading mechanism to the room header

* Add new image loading mechanism to the room member details screen

* Introduce a LoadableImage SwiftUI view that will automatically handle image loading

* Adopt the new LoadableImage where possible

* Fix LoadableImage not using/storing loaded images properly

* Simplify media loader enqueueing

* Made LodableImage load content after mediaSource updates. Adopt it on the home and settings screens

* Introduce a LoadableAvatarImage component and reuse it throughout the app

* Small logging tweaks, made some LoadableImage properties private

* Fix redacted skeletons avatar background color

* Fix placeholder avatars changing when backgrounding the app

* PR comments.

- Trim the @ sign off of mxid placeholders.
- Only expose AvatarSize on the avatar image, use CGSize elsewhere.

Co-authored-by: Doug <douglase@element.io>
2023-01-25 17:45:01 +00:00
Doug
b8e2d6f823
Show the date on a room when the last message is older than today. (#484)
* Format the last message date correctly.
* Update room cell layout - fixes an issue where the longer the date got the smaller the last message width was.
2023-01-24 11:02:51 +00:00
Stefan Ceriu
ae8009d040
Various performance tweaks (#474)
* Store and reuse room list placeholder avatars and last messages

* Cache and reuse HomeScreenRooms

* Reduce RoomSummaryProvider diff collection time

* Promote more logs to info

* Slighty tweak RustTracing to make it easier to configure

* Move TimelineProvider and RoomTimelineController item processing to background queues

* Prevent the timeline from stopping an ogoing decelerating scroll when starting backpaginating
2023-01-20 14:40:23 +00:00
Stefan Ceriu
8f3f83167b
Timeline item sender profiles (#463)
* Adopt timeline item sender profiles for displaying user avatars and display names
* Prevent images from automatically being evicted from the in-memory cache when entering background
* Get rid of all the `urlString: String`s and start using proper URLs
* Add back manual display name loading as the sender profiles aren't working properly yet
* Implement a sender profile.
* Bump the RustSDK to v1.0.32-alpha

Co-authored-by: Doug <douglase@element.io>
2023-01-18 14:29:44 +00:00
Doug
b97e6f7a98
Fix keychain access on macOS. (#354) 2022-12-06 17:39:15 +00:00
Stefan Ceriu
83410aa660 Add missing NSE bundle display name
- ITMS-90360: Missing Info.plist value - A value for the key 'CFBundleDisplayName' in bundle ElementX.app/PlugIns/NSE.appex is required.
2022-11-24 10:35:53 +02:00
ismailgulek
d389ce7ad7
Notifications (#275) 2022-11-21 19:37:13 +03:00