1
0
mirror of https://github.com/element-hq/element-x-android.git synced 2026-10-23 18:49:00 +03:00

280 Commits

Author SHA1 Message Date
ganfra
239e523d3b Adapt location feature to maplibre.compose 0.20.0 API 2026-10-20 14:31:43 +02:00
Benoit Marty
799f60b955 Generate null MapTiler BuildConfig values when not provided
Remove the default values from the Gradle file, the public MapTiler defaults
are now only defined in MapTilerDefaults. buildConfigFieldStr now accepts a
null value.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-14 10:11:08 +02:00
Benoit Marty
0149e6f65b Do not mix the homeserver MapTiler config with the build time one
The map URL builders now only use the MapTilerConfig they are given, falling
back to the public MapTiler defaults for the missing values, instead of the
values defined at build time. This avoids for instance sending the build time
API key to a tile server provided by the homeserver.

When there is no config, no static map URL builder is created, so no request
is performed.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-14 10:11:07 +02:00
Benoit Marty
4b97d6ab96 Disable location sharing when no MapTiler config is available
LocationService now exposes the MapTiler config to use: the one provided by the
homeserver takes precedence over the build time one, and null means that no map
provider is configured. It is now session scoped, and isServiceAvailable()
returns a StateFlow derived from this config.

When no config is available:
- the location sharing option is hidden from the composer, and location events
  cannot be opened in the location viewer;
- the "Location sharing" entry is hidden from the settings;
- location events in the timeline render a placeholder, without performing any
  request to MapTiler.

The show and share location screens now get the config from LocationService
rather than fetching the homeserver config by themselves.

Closes element-hq/element-android-enterprise#69

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-13 17:15:37 +02:00
bmarty
8100fa6555 Sync Strings from Localazy 2026-10-12 00:37:35 +00:00
ganfra
996e778222 Merge pull request #7845 from element-hq/renovate/maplibre.compose
Update maplibre.compose to v0.18.0
2026-10-06 16:23:45 +02:00
ganfra
604c5438c6 Adapt location feature to maplibre.compose 0.18.0 API 2026-10-06 15:45:40 +02:00
Benoit Marty
954eb731e7 Remove unused Gradle dependencies
Remove dependencies flagged as unused by the Dependency Analysis Gradle Plugin
(`./gradlew buildHealth`) and explicitly declared in module build files.

Removals were skipped when the dependency provides transitively something the
module (or a consumer of an `api` dependency) uses directly, as well as for
runtime-only dependencies (element-call-embedded, sentry-android,
rustls-platform-verifier). Dependencies added by the convention plugin helpers
(composeDependencies, testCommonDependencies) are left untouched.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-02 15:47:48 +02:00
ganfra
397c19ecfa Merge branch 'develop' into renovate/maplibre.compose 2026-09-28 17:42:16 +02:00
ElementBot
c8c242476b Sync Strings (#7787)
* Sync Strings from Localazy

* Update screenshots

---------

Co-authored-by: bmarty <3940906+bmarty@users.noreply.github.com>
2026-09-28 11:32:40 +02:00
ganfra
789e02fe0b Update MapBottomSheetScaffold KDoc 2026-09-21 16:18:25 +02:00
ganfra
4cdb72d2fa Adapt location feature to maplibre-compose 0.17.0 API 2026-09-18 18:08:20 +02:00
Benoit Marty
ed250320b3 Close the threaded timelines created by ShareLocationPresenter and DefaultMediaSender
Both created a dedicated timeline for each operation performed in a thread, and
never closed it, leaking SDK resources. Apply the same treatment as PollRepository:
replace getTimeline() with a scoped withTimeline() helper, which closes the created
timeline once the operation completes, whether it succeeds, fails or gets cancelled.

In DefaultMediaSender.sendGallery(), waiting for the upload handler is now done
inside the block, so that the timeline stays open until the upload completes.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-14 15:21:14 +02:00
ganfra
9a4beb4278 Fix stability on UserLocationState 2026-09-08 10:15:03 +02:00
ganfra
6c01ad1364 Fix formating 2026-09-07 19:04:13 +02:00
ganfra
7773ead79b Prevent location bottomsheet from being hidden 2026-09-07 18:56:25 +02:00
ganfra
f72e1ad2cc Support Google Play Services fused location backend 2026-09-07 18:11:38 +02:00
ganfra
3754258d88 Adapt location feature to updated maplibre-compose API 2026-09-07 15:25:39 +02:00
ganfra
7507475afd Use vulkan runtime 2026-09-07 15:25:39 +02:00
jmartinesp
dfccde93c6 Sync Strings from Localazy 2026-09-02 10:07:17 +00:00
Benoit Marty
e07099f116 PermissionsEvents -> PermissionsEvent 2026-08-25 09:59:31 +02:00
hayaksi1
23005317cf Merge develop into the PreviewParam rename
The 174 commits develop gained since this branch was cut touch preview data
in three ways, and each is resolved so the flipped konsist rule still holds
across the merged tree.

Two screens the branch had renamed were deleted upstream by "Remove the
account provider search screen and homeserver resolver": the
changeaccountprovider and searchaccountprovider packages. Their deletion
wins, so ChangeAccountProviderStatePreviewParam, SearchAccountProviderStatePreviewParam
and the two views that used them go with them rather than coming back
under the new name.

Two preview classes develop added still carried the old suffix and are
renamed here, along with the `@PreviewParameter` reference in each view:
GlobalSearchStateProvider -> GlobalSearchStatePreviewParam and
SendFailureDialogStateProvider -> SendFailureDialogStatePreviewParam.

Everything else merged textually. No production class extending
PreviewParameterProvider is left with a `Provider` name, and no reference
to any of the 194 renamed names survives outside the CHANGES.md entry that
records a past pull request title.
2026-08-24 10:55:40 +03:00
hayaksi1
03c330ee07 Rename PreviewParameterProvider subclasses to the PreviewParam suffix
The `Provider` suffix reads as a dependency provider rather than as preview
data, and it collides with the real providers in the codebase — `StringProvider`,
`PickerProvider`, the login feature's `AccountProvider` — so the name says
nothing about which of the two a class is. `PreviewParam` says it.

195 classes are renamed, along with the 185 files named after them, the konsist
rule that enforces the convention, the presentation-class file templates and the
onboarding documentation.

This cannot be split. `Konsist.scopeFromProduction()` scans the whole project, so
flipping the assertion before every class has moved leaves the rule red, and a
rule that accepted either suffix during a transition would be exactly the kind of
compatibility layer this convention change is meant to remove.

Two judgement calls in the rule itself. The `name.endsWith("PreviewProvider")`
exclusion is dropped: its only job was to reject a redundant `Preview` before
`Provider`, and the new suffix already contains it; no class currently ends with
`PreviewProvider`, so removing it changes nothing today. And
`EditableAvatarViewUriProvider` is renamed rather than deleted from the exclusion
list even though no such class exists in this repository, since it presumably
comes from the modules overlaid for the enterprise build.

Nothing keyed off the old suffix: no snapshot filename contains a provider class
name, so no Paparazzi image changes, and the Kover variants match on `*Presenter`,
`*State` and `*ViewKt`, so coverage bounds are unaffected.
2026-08-17 17:40:33 +03:00
Jorge Martin Espinosa
8b2c207728 Move the :libraries:wellknown logic into enterprise modules (#7429)
* Extract `IsEnterpriseBuild` use case

Having it inside `EnterpriseService` made having DI cycles with the `BuildMeta` provider too easy

* Rename `EnterpriseService.defaultHomeserverList()` to `homeserverAllowList()`

This seems more aligned with the way this list works

* Move most of the logic from `:libraries:wellknown` to `:enterprise:feature:enterprise`, both `shared` and `impl` modules

Ideally I would have added everything into `impl`, but some of the classes needed to be shared between the different `:enterprise:features` modules, and those are in the `shared` module, lacking a better name/strategy

* Add `EnterpriseService.isElementProEnforced`

With this, we don't need to provide the `RemoteEnterpriseConfig` anymore to any consumers, everything goes through `EnterpriseService` or other providers

* Remove `EnterpriseService.overriddenElementWellKnown`

This leaks the remote enterprise config/element well known contents to the app in a public interface.

* Create `CustomMapTilerConfigProvider` to avoid leaking the `RemoteEnterpriseConfig` in public APIs

This commit also starts moving some of the well-known related values to the enterprise modules

* Add missing docs to `EnterpriseService` and `SessionEnterpriseService`

* Fix tests

* Fix lint issues

* Bump enterprise module
2026-08-17 13:21:47 +00:00
Benoit Marty
a740423343 Sync strings. 2026-08-17 11:34:52 +02:00
Benoit Marty
23b75c3423 Fix outdated documentation. (#7430) 2026-08-15 11:05:43 +02:00
Benoit Marty
9e32801d02 Merge pull request #7426 from element-hq/feature/bma/documentation
Add KDoc to all the interfaces of the api modules
2026-08-14 13:46:28 +02:00
Benoit Marty
1ab401482a Fix formatting issues 2026-08-14 12:20:49 +02:00
Benoit Marty
57658640e1 Add KDoc to the features/location API interfaces
Document LocationService, StaticMapUrlBuilder, TileServerStyleUriBuilder and the
members of ActiveLiveLocationShareManager that had none.

The two URL builders now say what happens when no map provider is configured for
the build, which is the case LocationService.isServiceAvailable exists to guard.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-14 11:48:58 +02:00
Jorge Martin Espinosa
22195a47f2 Move the custom tile server URL config to the Element wellknown content (#7416)
* Move the custom tile server URL config to the Element wellknown content

* Iteration: use whole `MapTilerConfig` in the remote config
2026-08-14 08:20:37 +02:00
Benoit Marty
18e76b569f Merge pull request #7340 from hayaksi1/fix/7289-custom-map-style-url
Do not append the application MapTiler key to a custom map style url
2026-08-11 16:53:53 +02:00
bmarty
17c5d7db59 Sync Strings from Localazy 2026-08-11 09:27:29 +02:00
hayaksi1
7ebcb86ee1 Drop the comment on the custom map style branch
Review feedback: the branch already reads as "use the custom url as it
is", so the explanation belongs in the commit rather than the source.
2026-08-09 14:44:30 +03:00
hayaksi1
c7d8973507 Do not append the application MapTiler key to a custom map style url
When a homeserver publishes a map_style_url in its .well-known file, the
app appended its own MapTiler API key to it, producing a URL with two
query strings that the tile server rejects. The map then failed to load
for every user of that homeserver, with no way for the operator to opt
out.

MapTilerTileServerStyleUriBuilder.build() now appends ?key= only to the
URL it composes itself from the bundled base url and map ids. A non
blank customMapStyleUrl is returned verbatim, so the operator's own
credentials survive. This matches Element Web and the self-hosted tile
server documentation, both of which treat map_style_url as complete.

The two existing tests that pinned the old behaviour are updated, and
cases are added for a custom URL that already carries a key, one that
carries an unrelated query string, and a blank url falling back to the
built-in style.

Relates to https://github.com/element-hq/element-x-android/issues/7289
2026-08-09 01:59:25 +03:00
Benoit Marty
d1cf1aa09f Fix deprecation warning on androidx.compose.material3.ListItem 2026-08-06 18:35:17 +02:00
bmarty
892b384f07 Sync Strings from Localazy 2026-07-27 01:07:51 +00:00
ganfra
56cf00560e Merge pull request #7184 from element-hq/feature/fga/lls_fix_timeout
Live location sharing timeout
2026-07-16 09:33:02 +02:00
ganfra
a6b5eb4dce Extract expired-share handling into a helper method 2026-07-15 21:22:23 +02:00
ElementBot
03304b3ece Sync Strings (#7192)
* Sync Strings from Localazy

* Update screenshots

---------

Co-authored-by: jmartinesp <480955+jmartinesp@users.noreply.github.com>
2026-07-13 12:21:55 +02:00
ganfra
9d76f0c920 Test location-tick stops live location share past expiry 2026-07-10 12:46:26 +02:00
ganfra
ac0ad510c8 Stop live location share on location tick when past expiry 2026-07-10 12:44:51 +02:00
Benoit Marty
1ddb32645c Merge pull request #7007 from element-hq/renovate/androidx.compose.material3-material3-1.x
Update dependency androidx.compose.material3:material3 to v1.5.0-alpha21
2026-07-06 18:31:45 +02:00
ElementBot
932fdaeb2c Sync Strings (#7071)
* Sync Strings from Localazy

* Sync strings again.
Restore `screen_notification_settings_sound_system_default`

---------

Co-authored-by: bmarty <3940906+bmarty@users.noreply.github.com>
Co-authored-by: Benoit Marty <benoit@matrix.org>
2026-06-22 15:37:33 +02:00
Benoit Marty
e98cbdfce1 BottomSheet for maps must be Expanded 2026-06-19 11:26:20 +02:00
Benoit Marty
82c6167441 Bottom sheet: initial state must be Hidden else there is no animation when opening the bottom sheet. 2026-06-19 10:38:20 +02:00
Benoit Marty
5e30f94ccc Fix deprecation warning 2026-06-18 18:46:58 +02:00
Benoit Marty
c430877d87 Ensure Robolectric test are run using API 36 until the library support API 37. 2026-06-18 12:18:32 +02:00
ElementBot
d39b208099 Sync Strings from Localazy (#7021)
Co-authored-by: bmarty <3940906+bmarty@users.noreply.github.com>
2026-06-16 12:59:45 +02:00
Benoit Marty
99b7c758f2 Merge pull request #6954 from element-hq/fix/try-fixing-flaky-location-timeline-item-screenshots
Try fixing flaky screenshots for location timeline items
2026-06-10 14:44:39 +02:00
Benoit Marty
703f2b22ed Improve static map preview / screenshots. 2026-06-09 13:00:30 +02:00