Commit Graph

657 Commits

Author SHA1 Message Date
Benoit Marty
69ae145467 Rename processMessageItem to simple format 2023-05-25 14:16:23 +02:00
Benoit Marty
70df081840 Move RoomLastMessageFormatter and related class and resource to the new module eventformatter, in order to prepare rendering of state event in the timeline. 2023-05-25 14:15:35 +02:00
Benoit Marty
7537c3de7c Merge pull request #448 from vector-im/feature/bma/testTimeout
Create the mockked Bitmap outside the test, to remove increased time out
2023-05-25 11:35:31 +02:00
Benoit Marty
a3d25f3096 Merge pull request #455 from vector-im/misc/cjs/preview-names
Fix bad preview name for invite list
2023-05-25 11:35:06 +02:00
Marco Romano
67a8802766 Room list contextual menu (#427)
- Adds `ModalBottomSheet` to our design components (it wraps the homonimous Material3 one).
- Adds  a bottom sheet to the Room list using the aforementioned design component.
- Adds navigation from the room list to a room detail (context menu "Settings" action).
- Consolidates the "leave room flow" into a new `leaveroom` module used by both the room list and the room details.
  - Adds progress indicator to the leave room flow
- Uses new `leaveroom` module in `roomdetails` module too. 

Parent issue:
- https://github.com/vector-im/element-x-android/issues/261
2023-05-25 06:42:44 +00:00
Chris Smith
c74d0a5d6b Fix bad preview name for invite list 2023-05-24 11:12:14 +01:00
Benoit Marty
ed133c8a33 Merge pull request #438 from vector-im/feature/fre/invite_people_action
Handle "Invite people" action in the start a chat flow
2023-05-23 17:03:39 +02:00
Benoit Marty
54489f6b93 Init the mockked Bitmap only once. 2023-05-23 12:46:05 +02:00
Benoit Marty
a9c47d63e3 Create the mockked Bitmap in the constructor, to remove increased time out. 2023-05-23 12:25:07 +02:00
Chris Smith
463b9e0642 Invite users to existing rooms (#441)
Invite users to existing rooms

Scope:

- Allow inviting from the room detail screen and the member list
- Invite option is only shown if the user has the correct power level
- Search flow the same as creating a new room, allowing multi-select
- Existing room members/invitees are disabled with a custom caption
- Sending is asynchronous, an error dialog will appear wherever the
  user is if necessary

Closes #245
2023-05-23 09:23:24 +00:00
Jorge Martin Espinosa
882a155f07 Try to fix flaky test by setting a longer timeout in runTest (#442) 2023-05-22 17:52:31 +02:00
Chris Smith
25eee69bb5 Merge remote-tracking branch 'origin/develop' into feature/fre/invite_people_action 2023-05-22 15:35:25 +01:00
Chris Smith
1eac67bf25 Refactor search related functionality (#436)
Refactor search related functionality

This is a prelude to adding the feature of inviting users to
a room, getting everything in the right place and reusable.

What this does:

## User search refactor

Moves the (global) user search logic (dealing with MXIDs,
minimum lengths, debounces) into a `UserRepository`.

This now sits in a `usersearch` library, which will be
used by the create room flow and the new invite flow.

## SearchBar logic pull-up

Every place we use SearchBar, we're doing the same things
to style placeholders, show back/cancel buttons, etc.

We also have a results type that is duplicated for
basically every feature that uses the search bar.

I've pushed all this common functionality into the
SearchBar itself. This makes the component a bit less
general purpose, but saves a lot of repetition.

## Remove the userlist feature

Almost all the functionality of the userlist feature
is now exclusively used by the create room feature.
Room details uses its own version because the
requirements are different.

Components useful elsewhere (SelectedUsers and
SelectedUser) have gone to matrixui, everything else
has gone to createroom.

## Other bits and pieces

I've fixed everywhere that uses Scaffold to correctly
consume the WindowInsets if the contentPadding is
applied to the contents (which it universally is).
This was a change in the last version of Material3
(I guess previously Scaffold handled the consumption
for us). This fixes weird gaps above search bars.

Added overloads for the MatrixUserRow and
CheckedMatrixUserRow that take the name/subtitle/avatar
separately, so the invites list can pass arbitrary
text like "User has already been invited".

The `blockuser` package was for some reason not
under `impl` but alongside it, I've bumped it into
the right place.
2023-05-22 09:06:54 +00:00
Florian Renaud
aaa5c636ee Handle "Invite people" action in the start a chat flow 2023-05-20 00:56:23 +02:00
Marco Romano
0f8b83d3ba New copy for members search results (#430)
* New copy for members search results

Context: https://matrix.to/#/!dypRwVXIkJaTAACHPd:element.io/$Obt7MbgGtHBqJHpZqcdd6OQ5XgxxNXSJofnFG1NyWWM?via=matrix.org&via=element.io&via=t2l.io

Related to: https://github.com/vector-im/element-x-android/issues/246
2023-05-17 13:21:23 +00:00
Florian Renaud
7206894c0e Sync strings 2023-05-16 16:36:47 +02:00
Florian Renaud
0b7569c578 Remove useless composed call 2023-05-16 16:36:47 +02:00
Florian Renaud
d9d3fc3fa7 change wording for DM creation dialog 2023-05-16 16:36:47 +02:00
Florian Renaud
adc1c37789 restrict room name to single line 2023-05-16 16:36:47 +02:00
Florian Renaud
4fa0329ccd Close keyboard when textfields lose focus 2023-05-16 16:36:47 +02:00
Florian Renaud
52f2a32bf8 Select private privacy by default 2023-05-16 16:36:47 +02:00
Florian Renaud
8c6bf1ba18 Make the configure room screen scrollable 2023-05-16 16:36:46 +02:00
Florian Renaud
9c3a639fec Fix test compilation 2023-05-16 15:37:22 +02:00
Florian Renaud
da57e17dfb Use material3 ListItem 2023-05-16 14:29:18 +02:00
Florian Renaud
029eb876df Merge remote-tracking branch 'origin/develop' into
feature/fre/create_room_select_avatar
2023-05-16 14:18:29 +02:00
Benoit Marty
f62ea2096b Merge pull request #425 from vector-im/feature/bma/material3_update
Use default material3 version again and cleanup `@OptIn` annotations.
2023-05-16 09:51:17 +02:00
Marco Romano
1b84f02073 Show pending invitations in room members list (#385)
Splits a Room's member list in 2 showing pending invitees first and then the actual room member.

This simple user facing change entails a host of under the hood changes:
- It copies the logic from the `userlist` module and merges it into the `roomdetails` module removing all details not related to the member list (e.g. gets rid of multiple selection, debouncing etc.).
- Uncouples the `roomdetails` module from the `userlist` one. Now leaving only the `createroom` module to depend on the `userlist` module. Therefore the `userlist` module could be in the future completely removed and merged into the `createroom` module.
 - Changes the room members count in the room details screen to only show the members who have joined (i.e. don't count those still in the invited state).

Missed ACs:
- This change does not make the member list live update. Discussion is ongoing on how to make this technically feasible.

Parent issue:
- https://github.com/vector-im/element-x-android/issues/246
2023-05-15 14:39:27 +02:00
Benoit Marty
22e86bdfc8 Fix more warning and replace deprecated code. Also use TextField from our components. 2023-05-15 13:43:27 +02:00
Benoit Marty
3704564198 Use default material3 version again and cleanup @OptIn annotations.
Material3 is now 1.1.0
2023-05-15 12:28:31 +02:00
Florian Renaud
bf690c70b4 Merge pull request #400 from vector-im/renovate/kotlin
Update kotlin to v1.7.0
2023-05-12 17:03:41 +02:00
Florian Renaud
d79d00fc45 increase test timeout 2023-05-12 15:34:35 +02:00
Florian Renaud
444a7533d7 Test cleanup 2023-05-12 13:30:06 +02:00
Florian Renaud
463e47c907 Add missing OptIn 2023-05-12 13:28:22 +02:00
Chris Smith
ebac9ef4b4 Fix a few FFI leaks (#405)
Fix a few FFI leaks

These are instances where we obtain an FFIObject and don't call
Close on it to release the underlying reference on the Rust side.

The worst instance here was leaking an object per room member
every time we refreshed the member list
2023-05-12 10:50:39 +00:00
Florian Renaud
c22d181d8c Remove useless OptIn in tests 2023-05-12 10:05:39 +02:00
Florian Renaud
deea472001 Add more tests 2023-05-11 23:03:47 +02:00
Jorge Martin Espinosa
ed16ea5e48 [Media upload] Upload image, video and files (#411)
* Add media upload

* Display media upload error messages using a Snackbar.
2023-05-11 15:56:13 +00:00
Florian Renaud
5e38049e75 Fix test build 2023-05-11 17:34:40 +02:00
Florian Renaud
14fba4c559 Reformat some code 2023-05-11 17:31:56 +02:00
Florian Renaud
1b1dbca96b Clear cached image after room creation 2023-05-11 16:30:38 +02:00
Florian Renaud
5a0665a27a upload avatar within the room creation 2023-05-11 16:30:38 +02:00
Florian Renaud
4a444c24c4 Add missing tests 2023-05-11 16:30:38 +02:00
Florian Renaud
4fd3cb4c0e Add todo and screenshot tests 2023-05-11 16:30:37 +02:00
Florian Renaud
c81e673111 Fix tests after rebase 2023-05-11 16:30:37 +02:00
Florian Renaud
a38fbb3419 Delete cached avatar URI 2023-05-11 16:30:37 +02:00
Florian Renaud
554ce9f650 Rework and add remove button 2023-05-11 16:30:37 +02:00
Florian Renaud
6641afdd17 WIP pick avatar image 2023-05-11 16:30:37 +02:00
Jorge Martin Espinosa
cd298b9359 [Media upload] Media pre-processing (#403)
* Create `mediaupload` module for media pre-processing.

* Split `mediapicker` and `mediaupload` modules.
2023-05-10 10:06:56 +02:00
bmarty
367b659edc Sync Strings from Localazy 2023-05-08 00:08:48 +00:00
Florian Renaud
25adc1cc60 Fix navigation broken 2023-05-05 17:11:45 +02:00