Commit Graph

26 Commits

Author SHA1 Message Date
ganfra
02b3c61edc Fix quality! 2026-03-12 21:12:52 +01:00
Jorge Martin Espinosa
f77098ed47 Add network constraints for fetching notifications with WorkManager (#6305)
* Add `isNetworkBlocked` and `isInAirGappedEnvironment` to `NetworkMonitor`.

* Improve the DI of `SyncPendingNotificationsRequestBuilder` to simplify its usage.

* Only update `isInAirGappedEnvironment` in `DefaultNetworkManager` if the current build is an enterprise one.

* Add network constraints to `DefaultSyncPendingNotificationsRequestBuilder` based on the air-gapped status.

* Add a feature flag to disable the new check, in case it doesn't work as expected.
2026-03-10 12:44:31 +00:00
Jorge Martin Espinosa
fe4554703c Check if network access if blocked when fetching notifications (#6247)
* Add `NetworkMonitor.isNetworkBlocked()`, use it to check if Doze prevented us from loading notifications

* Only check if network is blocked after checking if we have a network available, otherwise it's always `true`

* Extract `NetworkBlockedChecker` to handle deprecations more carefully
2026-02-25 12:04:07 +00:00
Benoit Marty
1292da2a72 Copyright: Add Element Creations Ltd. copyright 2025-11-10 11:05:05 +01:00
Benoit Marty
b748fcc631 Copyright: Add final period 2025-11-10 10:13:41 +01:00
Benoit Marty
0a0224b586 Copyright: run command uv run license-editor --repository ../element-x-android 2025-11-10 10:09:26 +01:00
Benoit Marty
826cacf209 Remove @Inject, not necessary anymore when class is annotated with @ContributesBinding 2025-10-22 18:52:37 +02:00
Jorge Martín
dca1c5b516 Remove dagger and anvil dependencies, try to simplify gradle build scripts a bit 2025-09-04 16:49:21 +02:00
Jorge Martín
e06bacbff3 Redo DI gradle setup code 2025-09-04 16:49:20 +02:00
Jorge Martín
fc3153bd26 Fix lint issues and restore commented out code 2025-09-04 16:49:18 +02:00
Jorge Martín
92a4b8b66b Start migrating Anvil KSP to Metro 2025-09-04 16:48:34 +02:00
Benoit Marty
03e23477b7 Fix coroutine scope (#4820)
* 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.
2025-06-04 15:33:51 +00:00
Jorge Martin Espinosa
c040cec108 Create SyncOrchestrator (#4176)
* 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
2025-02-06 16:36:57 +01:00
Benoit Marty
05fc76822a Apply dual licenses: AGPL + Element Commercial to file headers.
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."
2025-01-07 10:05:04 +01:00
Jorge Martin Espinosa
2efdb3ae45 Centralise the DI code generation logic (#3562)
* Create Anvil extension helper

* Use the helper everywhere
2024-09-30 12:20:28 +00:00
Benoit Marty
62a6e916a6 Migrate license to AGPL - XML files. 2024-09-06 17:43:35 +02:00
Benoit Marty
2b016227e9 Migrate license to AGPL.
Run script `uv run license-editor --repository ../element-x-android`
2024-09-06 17:19:19 +02:00
Benoit Marty
9367f58216 Rename some class from Impl to Default 2024-05-31 09:47:27 +02:00
Benoit Marty
378692f743 Fix moar ktlint issues 2024-01-11 10:02:10 +01:00
ganfra
3765df9c39 NetworkMonitor: new strategy, looks like it works. 2023-06-27 17:58:45 +02:00
ganfra
bb4f61fe12 RoomList: try syncing when network is back and inError state 2023-06-23 17:07:27 +02:00
ganfra
1185dbd276 Network monitor : try to make it more reliable... 2023-06-23 16:48:31 +02:00
ganfra
37174cf53c API: simplify NetworkMonitor api 2023-06-22 15:47:15 +02:00
Jorge Martin Espinosa
e2b2dbf59f [Room list] Search & menu improvements (#356)
* Remove settings menu item, start splitting search UI. Also, add `applyIf` and `circularReveal` modifiers.

* Split UI & logic for room list search

* Suppress `composed` warning, improve its debuggability

* Add content description to the user's avatar, fix window insets. Also, remove unused `SearchRoomListTopBar`.
2023-04-25 11:35:36 +00:00
Jorge Martin Espinosa
e651d2f9c5 Fix: improve offline indicator designs (#341)
* Use the right font weight for the offline indicator title.

* Remove unneeded suppression in some build files.
2023-04-19 15:58:56 +02:00
Jorge Martin Espinosa
798bedcaed [Room List] Show offline indicator when the device is offline (#239)
* Implement the network status indicator.

* Add `networkmonitor` feature.
2023-04-17 17:01:16 +02:00