* Handle preference stores corruption by clearing them:
- Use the centralised `PreferenceDataStoreFactory` instead of `preferences by`.
- Add `DefaultPreferencesCorruptionHandlerFactory.replaceWithEmpty` to its `create(name)` method so all preference stores are cleared if they're corrupted.
* Add detekt rule to make sure we use `PreferenceDataStoreFactory` instead of `by preferencesDataStore`
* Remove `@SingleIn` annotations as the annotated class no longer have to be singletons
* Initial threads support: parse `ThreadSummary`.
Replace several `isThreaded` values with `EventThreadInfo`, which contains the info about the event either being the root of a thread or part of it.
* Add `Threaded` timeline mode
* Add a `liveTimeline` parameter to `TimelineController`'s constructor. This way we can customise which timeline will be used as the 'live' one. Also add `@LiveTimeline` DI qualifier for the actual live timeline of the room.
* Create `ThreadedMessagesNode`. Allow opening a thread in a separate screen.
* Add the callbacks for the list menu actions - even if they're the wrong ones and will send the data to the room instead
* Send attachments and location in threads
* Fix polls in threads, add support for sending voice messages in threads
* Display thread summaries only when the feature flag is enabled
* Use 'Reply' instead of 'Reply in thread' when in threaded timeline mode
* Remove incorrect usage of `Timeline` in `MessageComposerPresenter`. This led to replies to threaded events not appearing as actual replies.
---------
Co-authored-by: ElementBot <android@element.io>
* Inject the session scope instead of the application scope where it's possible.
* Create AppCoroutineScope annotation to let developers explicitly choose the appropriate CoroutineScope when injecting one.
* Make sure lambdaError() make the test fail in all circumstances.
* Fix existing errors on tests.
* Uniformize the way we are creating class under test.
* Cleanup
* Fix typo
* Fix failing test after rebase.
* Update target link for "Learn more".
* Rename VerifySelfSession* to OutgoingVerification*
* Optimize import
* Refactor to avoid long line
* Update screenshots
---------
Co-authored-by: ElementBot <android@element.io>
* Fix ringing calls not being automatically canceled
This will keep the sync active while the user is screening an incoming call, allowing receiving a call cancellation event, which will terminate the incoming call ringing early.
* Add extra logs to help debugging ringing call issues.
* Add Konsist test to ensure that the result of a function returning a flow is remembered.
* Remember flows before they are collected by state.
* Fix compilation issue
* Make isOnline a val.
* Make selectedUsers() a val.
* Make flow() a val.
* Make getUserConsent(), didAskUserConsent() and getAnalyticsId() some val.
* Remove Timeline.paginationStatus() and replace by direct access to the underlined flow.
* Simplify test
* userConsentFlow must be initialized before because it's used in observeUserConsent
* Fix test compilation
* Add handy extension "VariantDimension.buildConfigFieldStr"
* Update configuration for MapTiler.
* Update configuration for Sentry.
* Build AnalyticsConfig depending on analytics configuration.
* Configure analytics policy url.
* Add handy extension "VariantDimension.buildConfigFieldBoolean"
* Configure legal urls.
* Add a way to disable rageshake / reporting bugs.
* Update screenshots
* Quality
* Fix test
* Use `ifBlank` extension
* Add missing configuration for PostHog
* Update configuration for Rageshake.
* Add build log.
* Disable crash detection if rageshake feature is not available.
Disabled twice.
* Hide link to analytics policy if the link is missing.
* Fix test when run in enterprise context.
* Use RageshakeFeatureAvailability where appropriate.
* Rename file.
* Move some classes to their correct module.
* Update screenshots
---------
Co-authored-by: ElementBot <android@element.io>
* Use embedded version of Element Call: for in-app room calls, the app will use an embedded version of Element Call shipped with the app instead of using an external service.
* Remove `ElementCallBaseUrlProvider` so we don't use the Element well known file to get the base URL anymore
* Remove `ElementCallConfig.DEFAULT_BASE_URL` since it's not used anymore
* Restore the usage of the custom EC base URL in developer settings as the actual base URL, it present
* Add a way to customise the embedded EC analytic credentials
* Update CI to use the EC analytic credentials as secrets
* Improve the custom URL placeholder to include the `/room` suffix
* Let element enterprise configure the ids for maptiler service.
* Disable location sharing and location viewer is the service is not available.
* Fix compilation issue on connected test
* Do not allow to reload the map if the mapId is not available.
* Update screenshots
* Rename file.
* Better to inject a string provider here, so we can unit test DefaultLocationService.
---------
Co-authored-by: ElementBot <android@element.io>
* Create `SyncOrchestrator` to centralise the sync start/stop flow through the whole app: the decision is based on several inputs: sync state, network available, app in foreground, app in call, app needing to sync an event for a notification.
* Make network monitor return network connectivity status, not internet connectivity
* Don't stop the `SyncService` when network connection is lost, let it fail instead. This prevents an issue when using the offline mode of the SDK, which made the wrong UI states to be shown when the `SyncState` is `Idle` (that is, after the service being manually stopped).
* Rename `NetworkStatus.Online/Offline` to `Connected/Disconnected` so they're not easily mistaken with internet connectivity instead
* Use secret Sentry DSN value.
We realised our DSN entry has been shipped along with the code and it was being used in several forks as is, resulting in wrong bug reports coming into our Sentry dashboard and making it very hard to debug actual issues in the app.
2 replace all actions have been performed:
- "SPDX-License-Identifier: AGPL-3.0-only" to "SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial"
- "Please see LICENSE in the repository root for full details." to "Please see LICENSE files in the repository root for full details."
* Use Anvil KSP instead of the Square KAPT one
* Fix several configuration cache, lint and test issues
* Allow incremental kotlin compilation in the CI
* Workaround Robolectric + Compose issue that caused `AppNotIdleException`
* Update the `enterprise` commit hash
* Update screenshots
---------
Co-authored-by: ElementBot <android@element.io>
* Add `MatrixClient.isSlidingSyncProxySupported` function
* Update localazy strings
* Modify `ErrorDialog` to have an `onSubmit` call, which will be used for the submit action.
Also make the title text optional and dismissing the dialog by tapping outside/going back configurable.
* Check if a forced migration to SSS is needed because the proxy is no longer available.
In that case, display the non-dismissable dialog and force the user to log out after enabling SSS.
* Enable native/simplified sliding sync by default.
* Refactor the login to make sure we:
1. Always try native/simplified sliding sync login first, if available.
2. Then, if it wasn't available or failed with an sliding sync not supported error, try with the proxy instead (either discovered proxy or forced custom one).
* Move logic to `LoggedInPresenter` and the UI to `LoggedInView`
* Update screenshots
---------
Co-authored-by: ElementBot <benoitm+elementbot@element.io>
* Use ComposablePreviewScanner to rework how screenshot testing works
* Add test sharding
* Update screenshots
* Fixes for Element Gallery
---------
Co-authored-by: ElementBot <benoitm+elementbot@element.io>
Co-authored-by: Benoit Marty <benoit@matrix.org>
* Add full screen intent permissions banner, creating `:libraries:fullscreenintent` modules.
* Add it to notification settings too:
- Create `libraries:fullscreenintent` modules for the permission presenter and associated data.
- Add the presenter and states to `NotificationSettingsPresenter` and `NotificationSettingsView`.
* Use the right API to check for full screen intent permissions.
- Use the right package name for `:libraries:permission` contents.
* Fix broken tests (flaky?)
* Ignore coverage verification for fake and small presenters
---------
Co-authored-by: ElementBot <benoitm+elementbot@element.io>