<!-- 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
* Add link functionality to rich text editor
* Add 'list dialog' component compound design library
* Add 'text field list item' component to compound design library
- Make sure we propagate `CancellationException`.
- Make sure we do a cleanup of temp files.
- Make sure we don't re-compress any lingering temp files.
- Don't stop the upload process if we were able to upload some log files, even if we failed to read some others.
* Align TracingConfiguration with iOS
* Create TracingTree from rust sdk
* tracing: create a working configuration with RustTracingTree
* Tracing: WIP implementation of new api
* Tracing: clean up
* Tracing: use the latest api
* Tracing: some more clean up
* Remove generated logcat file after compressing it
---------
Co-authored-by: ganfra <francoisg@element.io>
Co-authored-by: Jorge Martín <jorgem@element.io>
* Create `CompoundButton`
* Some fixes
* Lint fixes
* Start replacing existing `Button` usages
* Replace button usages
* Remove previous Button composable
* Rename `CompoundButton` to `Button`
* Fix emphasized button being displayed as Text
* Fix cancel button in `WaitListView`
* Update screenshots
* Add shorthand functions for `OutlinedButton` and `TextButton`
* Add changelog
* Fix wrong size used for emphasized button in dialog
* Create a private `ButtonInternal` implementation with the shared logic.
- Make `ButtonStyle` private.
- Rename `title` to `text`.
- Rename `buttonStyle` and `buttonSize` to just `style` and `size`.
* Fix several warnings and lint issues.
* Update screenshots
---------
Co-authored-by: ElementBot <benoitm+elementbot@element.io>
With this change, composable previews and screenshots should be created with just:
```
@ElementPreviews@Composable
fun MyViewPreview() {
ElementPreview {
MyView()
}
}
```
- Adds `@ElementPreviews` which is a shorthand for:
```
@Preview(name = "D")
@Preview(name = "N", uiMode = Configuration.UI_MODE_NIGHT_YES)
```
Should be used in connection with the now public `fun ElementPreview()` composable.
- Adds ElementPreviews to previewAnnotations in dangerfile
- Screenshots of night mode previews are now rendered with night mode
- Replaces `ElementPreviewLight` and `ElementThemedPreview` with `ElementPreview`
- Deprecates `ElementPreviewDark` which should be removed.
- Remaining usages of `ElementPreviewDark` are now ignored during screenshot tests