750 Commits

Author SHA1 Message Date
Alfonso Grillo
078799c1e2
Add invites badges (#819) 2023-04-21 11:14:27 +00:00
Alfonso Grillo
4db6e68d79
Refactor UserSetting property wrapper to support Codable (#814)
* Add UserPreference property wrapper

* Delete UserSetting property wrapper

* Add PlistRepresentable support

* Add more convenience inits

* Add documentation

* Add UTs

* Fix flaky tests

* Fix more flaky tests

* Fix double optional problem in UserPreference

* Refine UTs

* Delete cache in UserPreference

* Conform Date to PlistRepresentable
2023-04-21 10:46:04 +00:00
Stefan Ceriu
1815b0a7ac Remove unused ScreenshotDetector 2023-04-21 13:27:19 +03:00
Stefan Ceriu
7a1cbdf6b1 Fix IS_RUNNING_UNIT_TESTS not being set in the right place 2023-04-21 13:27:19 +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
Flescio
88d3faf77d
Move search users into a dedicated service (#789)
* add users provider with test

* add ui test for search users

* add changelog

* Update ElementX/Sources/Services/Users/UsersProvider.swift

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

* add error handling in usersprovider

* remove empty section

* add search in invite users

* add CancellableTask, add setup App Settings in UnitTest, screenshots

* rename of UserDiscoveryService

* Update ElementX/Sources/Other/Extensions/Publisher.swift

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

* new error management for User Discovery Service

* Update ElementX/Sources/Other/CancellableTask.swift

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

* Update ElementX/Sources/Services/Users/UserDiscoveryService.swift

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

* fix invite users and start chat errors

* use only one task to fetch user profile

---------

Co-authored-by: Alfonso Grillo <alfogrillo@gmail.com>
Co-authored-by: Doug <6060466+pixlwave@users.noreply.github.com>
2023-04-21 09:11:15 +01:00
Stefan Ceriu
b564036b68 Fixes #641 - Room previews failing to load because of incorrect sliding sync view ranges 2023-04-20 19:41:16 +03:00
Stefan Ceriu
0ed69d5649 Add integration tests support for password saving, notifications and the analytics screen 2023-04-20 16:12:01 +03:00
Stefan Ceriu
59a4e0ac7c
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
Stefan Ceriu
df2784114a Bump the RustSDK in Package.resolved 2023-04-19 18:06:41 +03:00
Stefan Ceriu
d63436abf9 Fixes #809 - Start using a timeline limit on the room subscriptions 2023-04-19 18:06:41 +03:00
Alfonso Grillo
9921b315b3
Accept and decline invites (#806)
* Add accept/decline invite api

* Fix isDirect logic

* Add logic for accepting/decling invites

* Add error handling structure

* Add decline alert

* Add navigation to joined room

* Add generic error

* Add changelog.d file

* Cleanup

* Fix failing UTs

* Add UTs

* Add UI tests

* Cleanup

* Update ref screenshots

* Refactor invitesScreen state

* Improve switch handling in UserSessionFlowCoordinator

* Fix build error
2023-04-19 17:05:24 +02:00
Stefan Ceriu
616b8453b5 Fixes #785 - Speed up restoring the room list from the cold cache 2023-04-19 16:48:38 +03:00
Alfonso Grillo
c9a004ef05
Update rust sdk to 1.0.54-alpha (#810)
* Update rust sdk to 1.0.54-alpha

* Amend SS builder
2023-04-19 10:43:30 +00:00
Mauro
debdd08fc1
Disable animations when tapping on a notifications while the app is backgrounded (#808)
* tapping on notifications will display the animation only if the app is active and foregrounded

* changelog
2023-04-18 13:08:39 +00:00
Alfonso Grillo
9fe69acd20
Remove CurrentValueSubject as protocol requirement (#807)
* Add CurrentValuePublisher

* Refactor to use CurrentValuePublisher

* Add comment
2023-04-18 10:52:08 +00:00
Mauro
44def2277f
Navigations can now have their animations controlled with a parameter (#805)
* we disabled animations everywhere

* fixed a possible reference cycle

* pr suggestions
2023-04-18 10:26:57 +00:00
Nicolas Mauri
5b7ec6c9e2
Set up Analytics to track data per session (#780) 2023-04-18 07:33:32 +00:00
Doug
d01349a60e
Use iOS localization handling for strings. (#803) 2023-04-17 14:58:39 +00:00
Velin92
6efae84c04 Translations update 2023-04-17 15:57:15 +02:00
Flescio
2b6392e635
Select members before creating a room (UI for selection) (#766)
* add invite users in room flow

* add selectable user cell

* add screenshoots

* add unit test

* add button style

* add scroll to bottom when added user

* rebase screenshot from develop

* add changelog

* rename invite users files

* fix static viewModel

* fix buttonStyle, fix unit test

* UI test for selected user

* remove fixed height size

* fix saled width for horizontal cell

* add usersSection, screenshots

* use publishers pattern

* add selectable form button style

* add comment

* improve readability

* some rename on InviteUsers

* fix compile issues

* add search content
2023-04-17 08:29:30 +00: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
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
manuroe
69e696afca
Display the room list even if the room count is not exact (#800)
* Add log to know why HomeScreenViewModel.roomListMode is .skeletons

To better understand issue #796

* Display the room list even if the room count is not exact

This is a workaround for #796
2023-04-13 20:46:44 +02:00
Velin92
1b5dfad607 Translations update 2023-04-12 19:35:16 +02:00
Mauro Romito
84972a462e Element Bot will now open the PR 2023-04-12 19:07:16 +02:00
Velin92
a4aa8d3f77 Translations update 2023-04-12 15:18:31 +02:00
Mauro
0ca3e991fe
Add Strings.swift to Translations workflow (#794)
* fixing locheck

* fixing locheck tool

* Revert "fixing locheck tool"

This reverts commit 9bb3dbcd70d1ecbc62b4289623b5f9e584929997.

* locheck install

* using the original code to get the directory

* setup project on ci

* removed unneeded code

* removed useless code
2023-04-12 11:06:45 +00:00
Mauro
8403b07874
Fixing locheck tool (#788)
* fixing locheck

* fixing locheck tool

* Revert "fixing locheck tool"

This reverts commit 9bb3dbcd70d1ecbc62b4289623b5f9e584929997.

* locheck install

* using the original code to get the directory

* adding swiftgen to download strings

* setup project on ci

* added Strings.swift to the path

* adding String.swift
2023-04-12 10:03:11 +00:00
Doug
30a3efcf51
Fix project warnings (#791)
- Swift 5.8 warnings
- Run SwiftFormat 0.51.5
- Fix SwiftLint blanket_disable_command warnings. (Assets.swift will be fixed by SwiftGen).
2023-04-12 09:33:38 +00:00
Mauro
f02a5c7ac0
Removing the about section title + Fix notification tap crash (#778)
* Removing the about section title

updated tests

* fixed a bug that made the app crash when tapping

a notification in an unhandled state

* missing screenshots
2023-04-06 16:40:27 +00:00
Stefan Ceriu
cabb8e5442
Sliding sync v2 (#775)
* Adopt latest rust Sliding Sync changes

* Bump SDK, converge on similar to configure both sliding sync lists

* Adopt latest SDK version, fix breaking changes

* Fix unit tests
2023-04-06 18:43:08 +03:00
Johannes Marbach
f368da3485
Guard user suggestions behind feature flag so that they don't impact releasability of other room creation features (#770) 2023-04-06 15:32:49 +02:00
Doug
0911f9ba89
A few small tweaks. (#774)
- Use ShareLink instead of InviteFriendsCoordinator.
- Fix a string in the user menu
- Show the word Notification as the notification's body.

---------

Co-authored-by: Mauro <34335419+Velin92@users.noreply.github.com>
2023-04-06 12:44:16 +01:00
Mauro Romito
fae6602797 removed strings references from the UI Tests 2023-04-06 12:13:03 +02:00
Mauro
0bce9918e6
Notifications Enabled (#760)
* Notifications Enabled with default static text

notifications enabled with default static text

code improvement

added the share key

* added the changelog

* notification ID is added to the json only if it exists

* renamed Bundle.mainApp to app and updated the strings from localazy

* made a struct for the APNSPayload

* APNS Payload fix
2023-04-05 20:16:30 +02:00
Mauro
8a56649289
Translations workflow and tools (#768)
* Translations workflow and tools

* improved the name of the workflow

* need this commit to trigger the workflow for the first time

* swift tools can now run on CI

* only strings and stringsdict will be committed

* fixed a workflow issue

* starting the workflow to save it

* fixing downgrade issues

* fixing URL usage

* install localazy

* fixing add-paths typo

* downloaded strings

* removing on push trigger

* Update Tools/Sources/DownloadTranslations.swift

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

* Added locheck for string verification

* code formatting improvement

* Update Tools/Sources/Locheck.swift

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

* pr suggestion

---------

Co-authored-by: Doug <6060466+pixlwave@users.noreply.github.com>
2023-04-05 19:36:51 +02:00
Alfonso Grillo
9998fadd3b
Refactor vm context (#769) 2023-04-05 17:19:05 +00:00
Johannes Marbach
063665d05c Remove styling for developer toggles 2023-04-05 18:41:05 +03:00
Alfonso Grillo
2439431287
Improve tests' reliability (#763)
* Create publisher extension into the unit test target

* Add ViewModelContext test extension

* Refactor BugReportViewModelTests

* Fix failing UTs

* Idea PublishedClosure

* Refactor RoomDetailsViewModelTests

* Replace more Task.yield/Task.sleep

* Move leaveRoom/ignore/unignore under the @MainActor

* Revert "Idea PublishedClosure"

This reverts commit 4ab25291041f0dbd99083baf9d95bc6647f1fd97.

* Make process(viewAction:) sync

* Refactor BugReportViewModel callback to a publisher

* Fix UTs

* Refactor ReportContentViewModel

* Fix ui test build error

* Try make sonar happy

* Empty commit

* Revert "Try make sonar happy"

This reverts commit 97804b19373a8f55f12174ccbf27f1fd8db583b7.

* Rename ui test identifier

* Cleanup

* Callback -> actions refactor

* Update template

* Add publisher in TemplateCoordinator

* Add env variable in IntegrationTests.xctestplan

* Add async sequence extension

* Amend integration test plan

* Remove env variable from target.yml

* Cleanup

* Fix failing UI tests
2023-04-05 17:07:12 +02:00
Mauro
d24ee73d15
Fixed translation bug when the locale contained the region (#765)
* Fixed the issue, added tests and italian translation

* changelog

* improved translation handling code and added more tests

* Update UnitTests/Sources/LocalizationTests.swift

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

---------

Co-authored-by: Stefan Ceriu <stefanc@matrix.org>
2023-04-05 10:36:02 +02:00
Mauro
df92eed1a0
m.room.join_rules added as a required state (#762)
* join_rules added as a required state

* removed the m.room.join_rules requirement from the builder (for now)
2023-04-04 09:47:06 +00:00
Alfonso Grillo
ea979d6515
Improve user search using the GET profile (#754)
* Add getProfile in ClientProxyProtocol

* Add fetchProfileIfNeeded

* Refactor search

* Update StartChatSuggestedUserCell UI

* Add showProfilePopover action

* Remove popover code

* Add UTs in StartChatViewModelTests

* Add UI tests

* Cleanup code

* Refine design

* Fix design

* Localise StartChatSuggestedUserCell

* Update localisations

* Update StartChatSuggestedUserCell design

* Fix UT

* Fix PR comments

* Apply suggestions

* Fix typo
2023-04-04 10:47:41 +02:00
Flescio
b089cd6b62
change name to nil in direct room parameters (#758)
* change name to nil in direct room parameters
2023-04-03 18:34:55 +01:00
Mauro
0f858d977f
DM Details View (#744)
* Basic implementation completed but it requires some bug fixing and polishing (+4 squashed commits)
Squashed commits:
[43f0064e] now the content of the room details reflects the expected dm details content when the conditions are met
[fe6f2b5e] replaced existing headers with a composable and reusable HeaderView
[3c00120a] now the members are fetched every time the room is opened
[421d539b] refactored the members fetching to be immediate in case the room could be a direct chat

* polished the code and fixed some bugs that prevented the updated state of the members to be displayed in the room details view (+1 squashed commit)
Squashed commits:
[6bf98473] fix for the button not being destructive in room details screen

* removed copy button and updated copy

* moved a file and renamed header view

* addressed all PR comments

* sdk bump

* UI tests

* unit tests

* changelog

* updated mocks

* removed a duplicated signature in a mock
2023-04-03 13:18:19 +02:00
Doug
220138d492
Add Block user to Report Content screen. (#742) 2023-04-03 10:21:24 +01:00
Stefan Ceriu
7d1ab997ce Bump Rust SDK again after botched release 2023-03-31 21:15:07 +03:00
Stefan Ceriu
8b11727f19 Various tweaks following code review 2023-03-31 17:00:36 +03:00
Stefan Ceriu
5f6edacc1a Implements #745, #746, #747 - Initial media uploading flows
- room composer contextual menu for selecting source
- coordinator for presenting the different sources
- system picker handling and URL passback
- file preview after selection
- feature flag
2023-03-31 17:00:36 +03:00
Stefan Ceriu
2359910857 Bump the RustSDK, bump the app minor version and force user logout 2023-03-31 15:05:22 +03:00