Commit eeb7da7
[compose] Improved reliability of attribution list updates on source change. (#9965)
Fixes https://mapbox.atlassian.net/browse/MAPSAND-2527
## Problem
Before mapbox/mapbox-sdk#9411, there was no
reliable way to detect when map attributions changed. This affected
scenarios where:
- Sources are added at runtime.
- Standard styles are loaded with dynamic sources.
- Style imports modify attributions.
Since internal style source details are not exposed through public APIs,
the attribution UI could become stale and show incorrect licensing
information.
## Solution
This PR utilizes the new `StyleAttributionsChangedCallback` introduced
in mapbox/mapbox-sdk#9411 as the source of truth
for attribution changes. This ensures the attribution list UI updates
correctly in all scenarios, including edge cases not covered by the
previous implementation.
## Changes
- Integrated `StyleAttributionsChangedCallback` to listen for
attribution changes.
- Updated attribution list refresh logic to trigger on callback events.
- Improved reliability of attribution display in the Compose extension.
GitOrigin-RevId: adebb9f8aa3174c3bfc6bfe53e5e793a6e9f66fb1 parent 01ff918 commit eeb7da7
2 files changed
Lines changed: 16 additions & 11 deletions
File tree
- extension-compose/src/main/java/com/mapbox/maps/extension/compose/ornaments/attribution
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| |||
Lines changed: 15 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| 55 | + | |
55 | 56 | | |
56 | 57 | | |
57 | 58 | | |
| |||
656 | 657 | | |
657 | 658 | | |
658 | 659 | | |
659 | | - | |
| 660 | + | |
660 | 661 | | |
661 | 662 | | |
662 | 663 | | |
663 | | - | |
664 | | - | |
665 | | - | |
666 | | - | |
667 | | - | |
668 | | - | |
669 | | - | |
670 | | - | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
671 | 675 | | |
672 | 676 | | |
673 | | - | |
674 | | - | |
| 677 | + | |
| 678 | + | |
675 | 679 | | |
676 | 680 | | |
677 | 681 | | |
| |||
0 commit comments