element-x-ada/libraries
Marco Romano 58e05d139c
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
..
androidutils Konsist: check if sealed class could be sealed interface and fix existing issues. 2023-11-03 15:19:55 +01:00
architecture Add missing screenshots in TimelineView (#1660) 2023-10-27 12:18:28 +00:00
core Record and send voice messages (#1596) 2023-10-23 17:28:00 +00:00
coroutines
cryptography Feature/fga/biometric unlock (#1702) 2023-10-31 19:22:43 +01:00
dateformatter Enable detekt rules AlsoCouldBeApply and fix existing issues. 2023-07-26 11:10:46 +02:00
deeplink Make the functions in SystemUtils extensions (#899) 2023-07-18 13:11:11 +00:00
designsystem Ensure the size of the icon is 20.dp 2023-11-09 15:22:23 +01:00
di Add global context.cacheDir provider. (#1606) 2023-10-19 14:07:45 +02:00
encrypted-db Other fixes as per https://cashapp.github.io/sqldelight/2.0.0/upgrading-2.0/ 2023-10-13 15:17:12 +02:00
eventformatter Fix test after wording change. 2023-11-08 11:44:34 +01:00
featureflag Secure backup: create a feature flag (disabled) 2023-10-31 21:52:33 +01:00
indicator Avoid runBlocking. Start with a nullable boolean. 2023-10-31 21:52:33 +01:00
maplibre-compose Konsist: add test Data class state MUST not have default value, and fix existing issues 2023-10-10 17:31:04 +02:00
matrix Always ensure media temp dir exists (#1790) 2023-11-13 15:52:53 +01:00
matrixui Revert icon change for location. 2023-11-09 12:31:36 +01:00
mediapickers 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
mediaplayer Check for the correct media id when ensuring the MediaPlayer is ready (#1783) 2023-11-10 09:45:29 +00:00
mediaupload Always treat waveform as List<Float> (#1663) 2023-10-27 12:49:58 +00:00
network
permissions Record and send voice messages (#1596) 2023-10-23 17:28:00 +00:00
preferences Integrate Element Call with widget API (#1581) 2023-10-19 15:38:43 +00:00
push Sync Strings (#1789) 2023-11-13 12:31:34 +01:00
pushproviders Move Knit to Gradle catalog and use alias(libs.plugins.kotlin.serialization). Fix issue with JNA 2023-11-13 09:58:00 +01:00
pushstore Include desugaring lib also in library modules (#1604) 2023-10-19 09:00:32 +00:00
rustsdk
session-storage Include desugaring lib also in library modules (#1604) 2023-10-19 09:00:32 +00:00
testtags Add TestTags to dialog buttons. 2023-11-02 11:55:56 +01:00
textcomposer Enable seeking a recorded voice message (#1758) 2023-11-10 09:18:01 +00:00
theme Fix wrong CompoundColors mapping (#1692) 2023-10-30 18:22:42 +01:00
ui-strings Sync Strings (#1789) 2023-11-13 12:31:34 +01:00
ui-utils Add voice message recording duration indicator and limit (#1628) 2023-10-24 11:44:53 +00:00
usersearch
voicerecorder Enable seeking a recorded voice message (#1758) 2023-11-10 09:18:01 +00:00