Commit Graph

82 Commits

Author SHA1 Message Date
Chris Smith
b6e45c976f Use member count instead of counting members (#530)
Use member count instead of counting members

For the room details screen, use the member count as supplied by
matrix instead of waiting for the entire member list to be
retrieved and then manually adding up all the relevant users.

This removes the loading state of the member count, relying on
a spinner on the member list itself if the user actually wants
to see the members. (The performance of that will be improved
separately on the rust side in the future)

Closes #505
2023-06-06 10:40:17 +00:00
Chris Smith
e3fb510af4 Typo and minor formatting 2023-06-05 10:23:39 +01:00
Chris Smith
ecf7e291b7 SelectedUsers: Remember the layout calculations 2023-06-02 15:19:43 +01:00
Chris Smith
8c3b01e9f2 Add a handle to the avatar bottom sheet 2023-06-02 14:24:16 +01:00
Chris Smith
83add736c5 User row tweaks
- Make the checkbox non-clickable (the parent handles the clicks,
  and this stops the m3 lib padding it out to be a sensible touch
  target)
- Align and spread the text properly
- Change the default avatar size to match designs
2023-06-02 11:57:43 +01:00
Chris Smith
3e2612dd9c Avatar actions: larger font 2023-06-01 16:55:23 +01:00
Chris Smith
6f7200c59a Merge remote-tracking branch 'origin/develop' into misc/cjs/create-join-design-feedback 2023-06-01 16:50:34 +01:00
Florian Renaud
04d4b6369a Update room properties from room details (#439)
-  Add the edit action in the room details
-  Add "Add topic" button in room details
-  Add the screen behind that action to edit some room properties: avatar, name, topic
   -  Handle the save button action
      - enable the button only if changes are detected
      - display a loader "updating room"
      - display an error dialog if any request has failed
- Check user has the right power level to change various attributes
   - "Add topic" is only shown if there's no topic and they are able to set on
   - Edit menu is only shown if they can change topic, name or avatar
   - On the edit page, any fields they can't change are uneditable

Co-authored-by: Chris Smith <csmith@lunarian.uk>
2023-06-01 15:10:29 +00:00
Chris Smith
fb147f78b0 Merge remote-tracking branch 'origin/develop' into misc/cjs/create-join-design-feedback 2023-06-01 13:26:27 +01:00
Jorge Martin Espinosa
72fcd1e946 Merge pull request #497 from vector-im/feature/jme/enable-gif-support
Enable gif support for Coil
2023-06-01 12:07:16 +02:00
Jorge Martin Espinosa
b50350aaa0 [Room details] Open room member details when clicking on user data in timeline (#482) 2023-06-01 12:03:27 +02:00
Chris Smith
f0a3981df5 Selected users: if scrollable, make last one peek
If there are enough selected users that they can't all be displayed,
add extra padding in between the users to ensure that the last
visible one is half visible to provide some scroll affordance.
2023-06-01 10:17:28 +01:00
Chris Smith
9515435102 Selected user: scale and align cross properly
IconButton makes assumptions about the size of icons, which
we're not abiding by here. That makes it semeingly impossible
to properly center our icon. Instead, rewrite it as a surface
to ensure it's laid out properly
2023-06-01 10:15:56 +01:00
Chris Smith
e8c4387bef Matrix user row: typography and alignment 2023-06-01 10:15:27 +01:00
Chris Smith
d6d273992d Checkable user row: fix uneven padding 2023-06-01 10:15:09 +01:00
Chris Smith
36d372e1eb Display a notice if Matrix ID isn't resolved (#461)
Display a notice if Matrix ID isn't resolved

If we can't get the profile of a user after an mxid was
searched for, show a warning under their ID to say the
invite probably won't be delivered.

Closes #424
2023-06-01 08:40:45 +00:00
Jorge Martín
91e3511cb0 Enable gif support for Coil 2023-05-31 16:46:58 +02:00
ganfra
c89d9dd8e6 Media: handle PR review remarks 2023-05-26 19:09:51 +02:00
ganfra
2c3fb8a549 Merge branch 'develop' into feature/fga/image_loading 2023-05-22 20:59:37 +02: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
ganfra
ac1531390e Media: fix encrypted media 2023-05-16 11:51:11 +02:00
ganfra
72dea2f817 Introduce MatrixMediaSource 2023-05-05 19:47:10 +02:00
ganfra
affb928801 Merge develop into feature/fga/image_loading 2023-05-05 12:51:00 +02:00
Chris Smith
5c935818c6 Move and refactor MatrixUser (#381)
Move and refactor MatrixUser

Instead of living in matrixui and having an AvatarData, this can
reside in the matrix module and just have the URL. An extension
method in matrixui can then provide the AvatarData when required.

This removes some small duplication, and pushes the UI-specific
information (i.e., what size of avatar is going to be rendered)
further down the stack. It also aligns the field names with those
used by the rust SDK (e.g. "displayName" instead of "userName").
2023-05-03 16:30:19 +00:00
ganfra
d55d5a801b Merge branch 'develop' into feature/fga/image_loading 2023-05-02 16:23:47 +02:00
ganfra
e73d92124e Update tests and avoid useless recomposition 2023-05-02 13:04:00 +02:00
ganfra
d7cd8a2915 RoomMembers: change the API again.. 2023-04-28 15:04:33 +02:00
ganfra
d64660237a Media: change the API 2023-04-27 12:06:01 +02:00
ganfra
f99a29ef6d MediaResolver: exposes Result instead of Nullable 2023-04-26 16:13:09 +02:00
ganfra
c9370315ad Some clean up 2023-04-25 11:17:05 +02:00
Jorge Martin Espinosa
afd58f1634 Update Gradle to 8.1 and AGP to v8.0 (#329)
* Update AGP to 8.0.0.

* Set JAVA_HOME to JDK17

* Update lint version.

* Use right JDK for dependency analysis, replace deprecated env var.

* Upgrade to Gradle 8.1.

* Remove `@Supress(DSL_SCOPE_VIOLATION)` as it's no longer needed.

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-04-17 08:49:52 +00:00
Florian Renaud
5364bbd2cb Update screenshots 2023-04-13 16:19:55 +02:00
Florian Renaud
97ade693f5 Add fake list of matrix users 2023-04-13 15:44:45 +02:00
Florian Renaud
0a926bd05a Navigate from people view to configuration view 2023-04-13 15:44:44 +02:00
Florian Renaud
546a795c21 Remove default onClick from MatrixUserRow 2023-03-23 11:46:56 +01:00
Maxime NATUREL
87e96d7ac9 Reuse fillMaxWidth on MatrixUserRow 2023-03-22 12:26:01 +01:00
Maxime NATUREL
080f3dc266 Using nullable onClick to avoid passing a new parameter 2023-03-22 12:26:01 +01:00
Maxime NATUREL
875b0f8f1f Present the last added user first 2023-03-22 12:25:59 +01:00
Maxime NATUREL
bc47691733 Adding checkbox in result when multi selection of users is enabled 2023-03-22 12:25:59 +01:00
Florian Renaud
02f2ace1e4 Merge pull request #211 from vector-im/feature/fre/start_chat_search_matrixid
[Start chat] Show a single result when searching for a matrixId
2023-03-21 13:58:24 +01:00
Benoit Marty
d651678718 Let coil use our OkHttpClient. 2023-03-16 15:31:57 +01:00
Florian Renaud
63aa5edf89 Merge remote-tracking branch 'origin/develop' into feature/fre/start_chat_search_matrixid 2023-03-15 11:23:46 +01:00
Florian Renaud
199dbcc126 Improve MatrixUserRow paddings 2023-03-14 17:07:38 +01:00
Florian Renaud
d04aae9475 Set avatar size value to dp 2023-03-14 15:23:29 +01:00
Florian Renaud
33890aca70 Show result when searching for matrix id 2023-03-13 15:29:28 +01:00
ganfra
8ccd21d856 [MatrixSDK] start mapping all the timeline objects 2023-03-10 18:32:46 +01:00
Benoit Marty
8faca4fdac Move class of matrix.api module to api sub package. 2023-03-02 17:32:47 +01:00
Benoit Marty
fbdc1a477a Split module matrix to matrix.api with interfaces and data classes and matrix.impl with Rust implementation. 2023-03-02 17:12:13 +01:00
Jorge Martin Espinosa
c20013243b Store session data in a secure way (#98)
* Replace SessionData DataStore with an encrypted SQLite DB.

---------

Co-authored-by: Benoit Marty <benoit@matrix.org>
2023-03-02 16:48:54 +01:00
Benoit Marty
0959f652a8 Add some previews. 2023-02-14 17:03:02 +01:00