Commit Graph

2047 Commits

Author SHA1 Message Date
Benoit Marty
968a4d3fd0 Add a View to show the beginning of the timeline (parity with iOS) 2023-11-14 17:31:42 +01:00
jonnyandrew
74b0c341ec Fix merge conflict (#1804) 2023-11-14 16:21:58 +00:00
Benoit Marty
280f6a9c0c Merge pull request #1798 from vector-im/feature/bma/config
Configs object in appconfig and move strings to dedicated modules.
2023-11-14 16:53:46 +01:00
Marco Romano
082631caa5 Allow to seek a voice message before playing it (#1780) 2023-11-14 16:23:51 +01:00
jonnyandrew
638fdf495c Show error dialog when voice message fails to send (#1796)
---------

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2023-11-14 15:05:07 +00:00
jonnyandrew
c7d308f6dd Delay displaying the voice message download indicator (#1793)
---------

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2023-11-14 15:04:43 +00:00
Marco Romano
eca784ce57 Persist state of VoiceMessagePresenter in memory (#1795)
Allows [VoiceMessagePresenter] instances to keep their progress and download states while going in and out of the timeline viewport.

This is implemented by caching each instance of a TimelineItem presenter inside the RoomScope. TimelineItem presenters can move some of their state outside of the `present()` function so that such state will survive scrollings of the timeline.
2023-11-14 14:24:24 +00:00
jonnyandrew
53f03335c3 Update voice message recording button behaviour (#1784)
Changes recording button behaviour so that
- tapping the record button starts a recording and displays the stop button
- tapping the stop button stops the recording
- tapping the delete button cancels the recording
- 'hold to record' tooltip is removed


---------

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2023-11-14 14:05:59 +00:00
Benoit Marty
23129b4c19 Fix rendering of emote when the message contains some formatting. 2023-11-14 14:28:15 +01:00
Benoit Marty
794012c7c5 Cleanup 2023-11-14 14:11:34 +01:00
Benoit Marty
022c5221a8 Localazy: move report_content strings to the :features:messages:impl module. 2023-11-14 11:37:21 +01:00
Benoit Marty
899ffbc351 Localazy: move leave_room_alert_ strings to the :features:leaveroom:api module. 2023-11-14 11:26:40 +01:00
Benoit Marty
2c54a0b0a8 Localazy: move settings_rageshake strings to the :features:rageshake:api module. 2023-11-14 11:16:57 +01:00
Benoit Marty
fff806f270 Localazy: move screen_notification_settings_ strings to the :features:preferences:impl module.
Need to also import `screen_notification_settings_edit_failed_updating_default_mode` to the module `:features:roomdetails:impl`.
2023-11-14 11:12:35 +01:00
Benoit Marty
0cebb0423f Localazy: move emoji_picker_category_ strings to the :features:messages:impl module. 2023-11-14 10:53:30 +01:00
Benoit Marty
3771f7b436 Localazy: move some strings to the :features:analytics:api module. 2023-11-14 10:48:02 +01:00
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
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
14e108b6c4 Simpler code 2023-11-09 15:22:55 +01:00
Benoit Marty
d6258962a3 Use icon from Compound and ensure the size is 20.dp 2023-11-09 15:16:20 +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
bfe484b63c Onboarding iteration #1776 2023-11-09 15:03:45 +01:00
Benoit Marty
68cedbf8ff Merge pull request #1773 from vector-im/feature/bma/recoveryKeyErrorDialog
Feature/bma/recovery key error dialog
2023-11-09 14:30:49 +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
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
e7a6e4039c Add preview for AttachmentThumbnail and fix issue rendering for AttachmentThumbnailType.Location for coherency. 2023-11-08 16:28:07 +01:00
Benoit Marty
ea9b222b0e If media source for thumbnail info is not available for image, use the source image as a fallback. But if it is available, use it. 2023-11-08 15:48:06 +01:00
Benoit Marty
5376abcb0d Improve dialog content when recovery key (or passphrase) is not correct. 2023-11-08 14:35:15 +01:00
ganfra
4d48005f3d Merge pull request #1757 from vector-im/feature/fga/lock_polish
LockScreen polish
2023-11-08 14:02:53 +01:00
Benoit Marty
4c9da30fff Merge pull request #1759 from vector-im/feature/bma/recoveryKeyWithSpaces
Recovery key with spaces
2023-11-08 14:01:30 +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
ganfra
a5e23431a7 Lock screen : fix one more test. 2023-11-08 13:45:28 +01:00
ganfra
f2ae715a07 Update features/ftue/impl/src/test/kotlin/io/element/android/features/ftue/impl/DefaultFtueStateTests.kt
Co-authored-by: Benoit Marty <benoit@matrix.org>
2023-11-08 12:54:25 +01:00
ganfra
dc2e05430b Lockscreen : should fix tests 2023-11-08 12:01:54 +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
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
Marco Romano
d1a9d5e377 Voice messages: Don't crash if mxc uri is invalid (#1756)
<!-- 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

Code now checks whether the mx uri is invalid and handles the error condition properly.

## Motivation and context

https://github.com/vector-im/element-x-android/pull/1748#discussion_r1384557443

## 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-08 07:46:00 +01:00
ganfra
39da7e75a5 Lock screen : fix code quality 2023-11-07 21:08:02 +01:00
ganfra
8b4d3a4bc8 Lock : fix race condition on setup pin 2023-11-07 21:06:26 +01:00
ganfra
41517614c8 LockScreen : fix one more navigation issue 2023-11-07 18:22:40 +01:00
Benoit Marty
a284f5cb03 UTD: Change wording from "Decryption error" to "Waiting for this message" 2023-11-07 17:52:06 +01:00