Commit graph

9836 commits

Author SHA1 Message Date
Colin S
251c873672 messages: separate custom tab links from normal links
Some links in the `MessagesView` are part of Element X itself,
such as the help pages in `LearnMoreConfig` [1]. These links
should open in an "in-app" Chrome Custom Tab, because they are
basically part of the app.

Web links from chat messages, on the other hand, should open in
the user's preferred web browser as regular tabs.

Separate "regular" links from "custom tab" links with a new
parameter `onLinkClick(..., customTab)`. If true, the link
opens in a custom tab.

Links within `TimelineView` are always opened in a normal tab.

[1]: appconfig/src/main/kotlin/io/element/android/appconfig/LearnMoreConfig.kt
2025-01-28 20:53:22 -06:00
Colin S
e37e43bf79 messages: open web links in full web browser
In [1], all hyperlinks within `MessagesNode` switched to using

    activity.openUrlInChromeCustomTab()

instead of with `openUrlInExternalApp()`.

This causes web links in chat messages to open in an "in-app"
Chrome Custom Tab [2] instead of the user's configured "full"
web browser. This is a UX nuisance. Open web links in a full
browser instead.

Closes #3885 [3].

[1]: 57e45aa834 (Identity change: handle click on "learn more")

[2]: https://developer.chrome.com/docs/android/custom-tabs/guide-get-started#opening_a_custom_tab

[3]: https://github.com/element-hq/element-x-android/issues/3885
2025-01-25 21:07:22 -06:00
Benoit Marty
26e2172edd Merge pull request #4161 from element-hq/feature/bma/mediaNavigation
Media navigation with swipe gesture
2025-01-23 18:33:52 +01:00
Benoit Marty
31a7d3f3bb Fix pagination restart issue and cover by unit test. 2025-01-23 17:49:42 +01:00
ElementBot
4ae773cfd6 Update screenshots 2025-01-23 14:56:31 +00:00
Benoit Marty
c20a9d011c Improve code clarity 2025-01-23 15:43:33 +01:00
Benoit Marty
dbf511ee2a Cleanup 2025-01-23 15:42:00 +01:00
Benoit Marty
8d049e134f Fix color for media viewer according to Figma. 2025-01-23 15:37:09 +01:00
Benoit Marty
ed80ca9899 Use Black for code clarity. 2025-01-23 15:08:40 +01:00
Benoit Marty
c3ec11dec5 Add name to argument for clarity. 2025-01-23 15:06:10 +01:00
Benoit Marty
0b5ad29391 Add documentation on buildMediaViewerPageList. 2025-01-23 15:03:40 +01:00
Benoit Marty
d1d323424d Simplify 2025-01-23 14:57:59 +01:00
Benoit Marty
fae1c0800d Simplify with code coerceAtLeast(0)` 2025-01-23 14:57:05 +01:00
Benoit Marty
b967c877a6 Remove useless parameter 2025-01-23 14:49:18 +01:00
Benoit Marty
6713bdbdd2 Merge pull request #4187 from element-hq/feature/bma/calver
Migrate to CalVer like versioning
2025-01-23 14:46:52 +01:00
Benoit Marty
09f44df677 Merge pull request #4186 from element-hq/renovate/wysiwyg
Update wysiwyg to v2.38.2
2025-01-23 12:48:28 +01:00
Benoit Marty
aa0ee1b568 Migrate to CalVer-like versioning - update release script. 2025-01-23 11:30:27 +01:00
renovate[bot]
e9f9d5e762 Update wysiwyg to v2.38.2 2025-01-23 10:29:27 +00:00
Benoit Marty
ecfd449950 Migrate to CalVer-like versioning 2025-01-23 11:10:53 +01:00
Benoit Marty
3dcf921c1a Fix formatting. 2025-01-23 09:56:51 +01:00
Benoit Marty
4c6f46e46c Ensure gallery is paginating to get new items. 2025-01-23 09:29:37 +01:00
ElementBot
cb5988935f Update screenshots 2025-01-22 16:24:36 +01:00
Benoit Marty
c817112bf2 Fix tests. 2025-01-22 16:24:35 +01:00
Benoit Marty
40a44cae75 Add timestamp to trigger back pagination. 2025-01-22 16:24:34 +01:00
Benoit Marty
5e506be062 Restore overlay when user cancel the dragging 2025-01-22 16:24:34 +01:00
Benoit Marty
f55da9027b Introduce MediaViewerFlickToDismiss and extract to its own file 2025-01-22 16:24:32 +01:00
Benoit Marty
2267a4b787 MediaViewer: add error case in the UI. 2025-01-22 16:24:32 +01:00
Benoit Marty
b0bfea9cc4 Add test on MediaViewerDataSource 2025-01-22 16:24:31 +01:00
Benoit Marty
36924070df Add test on SingleMediaGalleryDataSource 2025-01-22 16:24:30 +01:00
Benoit Marty
eb9676294b Small cleanup 2025-01-22 16:24:30 +01:00
Benoit Marty
8137c68154 Restore caption rendering 2025-01-22 16:24:29 +01:00
Benoit Marty
03c508cea0 sync strings 2025-01-22 16:24:29 +01:00
Benoit Marty
a1b027a8ab Add exception for Konsist 2025-01-22 16:24:28 +01:00
Benoit Marty
7689219732 Improve loading state and add preview. 2025-01-22 16:24:27 +01:00
Benoit Marty
f21aeea980 Fix and write tests 2025-01-22 16:23:46 +01:00
ganfra
13defbbcc0 media viewer : use collectAsState in the DataSource 2025-01-22 16:22:19 +01:00
Benoit Marty
40ef05b6e6 Remove unused import 2025-01-22 16:22:18 +01:00
Benoit Marty
03523c9567 Provide duration 2025-01-22 16:22:18 +01:00
ganfra
24a2458e4a media viewer : create MediaViewerDataSource 2025-01-22 16:22:17 +01:00
Benoit Marty
b02c12d92a If not displayed, make sure to pause the audio / video 2025-01-22 16:22:17 +01:00
Benoit Marty
3e9528fa93 Open in SingleMedia mode when coming from the timeline 2025-01-22 16:22:16 +01:00
Benoit Marty
7397dde87d Add support for files navigation (when coming from the gallery) 2025-01-22 16:22:15 +01:00
Benoit Marty
901ad85ee6 Suppress Detekt false positive (?) 2025-01-22 16:22:15 +01:00
Benoit Marty
84d603d31f Remove RetryLoading (use LoadMedia) 2025-01-22 16:22:14 +01:00
Benoit Marty
d691a3f6a2 Let MediaGalleryDataSource be an interface 2025-01-22 16:22:11 +01:00
Benoit Marty
c8ca4d7425 Create MediaGalleryDataSource and extract logic from MediaGalleryPresenter. 2025-01-22 16:21:37 +01:00
Benoit Marty
925db81ca5 Merge pull request #4183 from element-hq/renovate/org.matrix.rustcomponents-sdk-android-0.x
Update dependency org.matrix.rustcomponents:sdk-android to v0.2.76
2025-01-22 16:16:07 +01:00
Benoit Marty
3b3301021b Merge pull request #4184 from element-hq/feature/bma/removeFirstIfSingle
Replace our firstIfSingle extension with singleOrNull from the Kotlin library
2025-01-22 16:14:11 +01:00
Benoit Marty
f7a4c999f7 Replace our firstIfSingle extension with singleOrNull from the Kotlin library. 2025-01-22 15:49:41 +01:00
Benoit Marty
9d6994bc99 Fix API break 2025-01-22 15:42:08 +01:00