Commit Graph

1778 Commits

Author SHA1 Message Date
Jorge Martin Espinosa
d29052eb47 Add active call icon to room list summaries (#1792)
Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2023-11-13 15:35:11 +00:00
Marco Romano
00a750a31a Always ensure media temp dir exists (#1790)
<!-- Please read [CONTRIBUTING.md](https://github.com/vector-im/element-x-android/blob/develop/CONTRIBUTING.md) before submitting your pull request -->
 
## Type of change

- [ ] Feature
- [x] Bugfix
- [ ] Technical
- [ ] Other :

## Content

`RustMediaLoader` creates the "${cacheDir}/temp/media" dir only once at class creation. Unfortunately when clearing an app's cache this directory will be deleted and the app's process won't be killed, so subsequent usages of the same instance of `RustMediaLoader` will not work because `cacheDirectory` does not exists. This fix makes sure that such directory is always checked and created if needed.

## Motivation and context

Fixes https://github.com/vector-im/element-x-android/issues/1788

## Screenshots / GIFs

<!--
We have screenshot tests in the project, so attaching screenshots to a PR is not mandatory, as far as there
is a Composable Preview covering the changes. In this case, the change will appear in the file diff.
Note that all the UI composables should be covered by a Composable Preview.

Providing a video of the change is still very useful for the reviewer and for the history of the project.

You can use a table like this to show screenshots comparison.
Uncomment this markdown table below and edit the last line `|||`:
|copy screenshot of before here|copy screenshot of after here|

|Before|After|
|-|-|
|||
 -->

## Tests

<!-- Explain how you tested your development -->

- Step 1
- Step 2
- Step ...

## Tested devices

- [ ] Physical
- [ ] Emulator
- OS version(s):

## Checklist

<!-- Depending on the Pull Request content, it can be acceptable if some of the following checkboxes stay unchecked. -->

- [ ] Changes have been tested on an Android device or Android emulator with API 23
- [ ] UI change has been tested on both light and dark themes
- [ ] Accessibility has been taken into account. See https://github.com/vector-im/element-x-android/blob/develop/CONTRIBUTING.md#accessibility
- [ ] Pull request is based on the develop branch
- [ ] Pull request includes a new file under ./changelog.d. See https://github.com/vector-im/element-x-android/blob/develop/CONTRIBUTING.md#changelog
- [ ] Pull request includes screenshots or videos if containing UI changes
- [ ] Pull request includes a [sign off](https://matrix-org.github.io/synapse/latest/development/contributing_guide.html#sign-off)
- [ ] You've made a self review of your PR
2023-11-13 15:52:53 +01:00
ElementBot
38f1d9932b Sync Strings (#1789)
Co-authored-by: bmarty <bmarty@users.noreply.github.com>
2023-11-13 12:31:34 +01:00
Benoit Marty
79806852ca Move Knit to Gradle catalog and use alias(libs.plugins.kotlin.serialization). Fix issue with JNA 2023-11-13 09:58:00 +01:00
Benoit Marty
a9995886c0 Move remaining hard-coded dependency to Gradle catalog. We had 2 different version of material3 library. 2023-11-10 16:56:04 +01:00
Benoit Marty
765ede0093 Replace hard-coded value by value from gradle datalog 2023-11-10 16:25:58 +01:00
Marco Romano
e3cfe70ba8 Check for the correct media id when ensuring the MediaPlayer is ready (#1783)
Just forgot to add this further condition.
2023-11-10 09:45:29 +00:00
jonnyandrew
7a4adf3e28 Enable seeking a recorded voice message (#1758) 2023-11-10 09:18:01 +00:00
Benoit Marty
5e2c679a56 Merge pull request #1781 from vector-im/feature/bma/onBoardingIteration
On boarding iteration
2023-11-09 16:54:17 +01:00
Marco Romano
0dd9f23838 Voice message MediaPlayer: wait until player is ready (#1772)
Change to `MediaPlayer` API to allow waiting for the player to be in a ready state.
This is needed in order to perform some tasks (e.g. read the media duration, seek) after changing the media file.
2023-11-09 14:34:38 +00:00
Benoit Marty
8c53dd435b Ensure the size of the icon is 20.dp 2023-11-09 15:22:23 +01:00
Marco Romano
8f1b699271 Don't leak MediaFileHandle when downloading voice messages (#1748)
Uses the new `MediaFile.persist()` [API](https://github.com/matrix-org/matrix-rust-sdk/pull/2789) to cache voice messages.
This allows to close the `MediaFile` handle after use and keeping the file.
Also disables rust sdk caching for voice messages as we'll use the app's cache dir for that purpose.

Fixes: https://github.com/vector-im/element-meta/issues/2175
2023-11-09 14:15:11 +00:00
Benoit Marty
eabc3f82ae Move icons to the design system to reuse them (and use new ic_devices). 2023-11-09 15:09:42 +01:00
Benoit Marty
cba5b1cfd3 Merge pull request #1774 from vector-im/feature/bma/imageThumbnail
Improve rendering of `AttachmentThumbnail` when thumbnailSource is not provided
2023-11-09 14:30:29 +01:00
Benoit Marty
9af275b7cf Revert icon change for location. 2023-11-09 12:31:36 +01:00
Benoit Marty
18ec3ae7c8 Merge pull request #1769 from vector-im/feature/bma/chatBackupWaitingForSync
Ensure BackupState and RecoveryState values are set from the SDK only…
2023-11-09 09:21:51 +01:00
Benoit Marty
344cad5341 Rename file. 2023-11-08 16:47:18 +01:00
Benoit Marty
e7a6e4039c Add preview for AttachmentThumbnail and fix issue rendering for AttachmentThumbnailType.Location for coherency. 2023-11-08 16:28:07 +01:00
Benoit Marty
d2483ea11a Use the blurHash if available, when the thumbnailSource is null, and if not available render the image icon for image file. 2023-11-08 15:34:06 +01:00
Benoit Marty
1026648ee8 Merge pull request #1770 from vector-im/feature/bma/noBannerIfKeyBackIsEnabled
Show full history if key backup is enabled.
2023-11-08 14:00:25 +01:00
renovate[bot]
dd57197f32 Update kotlin (#1697)
* Update kotlin

* Lower Sonar RAM usage, remove redundant `Dkotlin.daemon.jvm.options`

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jorge Martín <jorgem@element.io>
2023-11-08 12:58:14 +00:00
Benoit Marty
cf0e92f7f6 Show full history if key backup is enabled. 2023-11-08 12:41:15 +01:00
Benoit Marty
062567fadc Merge pull request #1767 from vector-im/feature/bma/encryptedMessages
Feature/bma/encrypted messages
2023-11-08 11:58:38 +01:00
Benoit Marty
6874df8875 Fix test after wording change. 2023-11-08 11:44:34 +01:00
Benoit Marty
8d3af2a1fc Ensure BackupState and RecoveryState values are set from the SDK only when the first sync is finished. 2023-11-08 11:33:02 +01:00
Jorge Martin Espinosa
5bb8efb728 Iterate design on Settings screen (#1763)
* Iterate design on Settings screen:

- Set new icons provided by design.
- Replace `PreferenceText` usages with `ListItem`.
- Add missing icons, and a new way to group them for previews.

---------

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2023-11-08 11:31:17 +01:00
Benoit Marty
a284f5cb03 UTD: Change wording from "Decryption error" to "Waiting for this message" 2023-11-07 17:52:06 +01:00
Jorge Martin Espinosa
d21358ed9b Improve confusing text in the 'ready to start verification' screen (#1751)
* Improve confusing text in the 'ready to start verification' screen

---------

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2023-11-07 14:33:26 +01:00
Benoit Marty
e2870442c7 Merge pull request #1737 from vector-im/feature/bma/improvePages
Create UserStoryFlowPage
2023-11-07 14:30:38 +01:00
Jorge Martin Espinosa
6fa785a4a3 Fix crash on logout (#1749) 2023-11-07 14:24:31 +01:00
Benoit Marty
6d8386307b FlowStepPage: make onBackClicked nullable and remove canGoBack. 2023-11-07 10:59:22 +01:00
Benoit Marty
96c81999a3 Rename UserStoryFlowPage to FlowStepPage
Rename UserStoryFlowPage to FlowStepPage
2023-11-07 10:59:22 +01:00
Benoit Marty
f0d1d1f74a Fix issue about modifier. 2023-11-07 10:57:34 +01:00
Benoit Marty
769cafc877 Let SecureBackupEnableView use UserStoryFlowPage. 2023-11-07 10:53:21 +01:00
Benoit Marty
64ca96d502 Create UserStoryFlowPage.
This will reduce some boilerplate and copy pasting we have in the codebase.
2023-11-07 10:53:21 +01:00
renovate[bot]
8b5e8bf6da Update dependency org.matrix.rustcomponents:sdk-android to v0.1.67 (#1747)
* Update dependency org.matrix.rustcomponents:sdk-android to v0.1.67

* Fix breaking change in `RustMediaLoader`.

* Fix breaking change in `DefaultCallWidgetSettingsProvider`

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Marco Romano <marcor@element.io>
2023-11-07 07:53:24 +00:00
Benoit Marty
5777ed0a76 Merge pull request #1742 from vector-im/sync-localazy
Sync Strings
2023-11-06 16:05:01 +01:00
Benoit Marty
f5a6682cd6 Introduce AsyncViewDefaults for ProgressDialog 2023-11-06 10:42:15 +01:00
Benoit Marty
044b6ac018 Use AsyncView in EditUserProfileView 2023-11-06 10:09:41 +01:00
Benoit Marty
59c01b1764 Introduce AsyncView to limit duplicated code. 2023-11-06 10:09:41 +01:00
bmarty
6014858aba Sync Strings from Localazy 2023-11-06 08:23:40 +00:00
Benoit Marty
b907b77733 Convert Data.Audio to data class, and implement equals and hashCode as suggested. 2023-11-03 17:32:38 +01:00
Benoit Marty
8b85aa51e2 Konsist: check that if sealed interface is used in parameter of Composable, it has the @Stable or @Immutable annotation 2023-11-03 15:19:55 +01:00
Benoit Marty
c5f3562454 Konsist: check if sealed class could be sealed interface and fix existing issues. 2023-11-03 15:19:55 +01:00
jonnyandrew
413ec4b5db Display duration of recorded voice message (#1733)
---------

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2023-11-03 12:59:36 +00:00
Jorge Martin Espinosa
0e89080a50 Replace suffixes for @PreviewsDayNight annotation (#1736)
* Replace suffix for PreviewsDayNight annotation

* Rename Preview, since its filename was way too long

* Update screenshots

---------

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2023-11-03 12:19:12 +00:00
Jorge Martin Espinosa
3fc8f1aaec Use Parallel GC and bump RAM usage (#1734)
* Use Parallel GC and bump RAM usage

* Build only `app` project in `Build APKs (debug)` flow.

* Remove redundant JNA dependency
2023-11-03 10:34:49 +01:00
Benoit Marty
b1ee914173 Merge pull request #1730 from vector-im/feature/bma/uselessByLazy
Remove useless by lazy wrapping
2023-11-02 17:07:14 +01:00
Benoit Marty
19bd43186d Merge pull request #1597 from vector-im/renovate/androidx.compose.material3-material3-1.x
Update dependency androidx.compose.material3:material3 to v1.2.0-alpha10
2023-11-02 17:06:11 +01:00
Benoit Marty
aeb4c6eba0 Remove useless wrapping in lazy block, since the value was assigned later during object construction. 2023-11-02 16:14:21 +01:00