Commit Graph

224 Commits

Author SHA1 Message Date
Benoit Marty
666e1f1cbc Move BuildMeta fake to common test module. 2023-07-03 17:09:04 +02:00
Benoit Marty
499a862bfc Add application version to the setting screen. 2023-07-03 17:09:04 +02:00
bmarty
bd3dd76039 Sync Strings from Localazy 2023-07-03 00:11:17 +00:00
Benoit Marty
192d32061d Improve preview by adding Divider, and improve rendering. 2023-06-27 19:43:03 +02:00
Benoit Marty
d6f2d7a5d3 Rework AvatarSize.
Remove default value for AvatarSize, it has to be explicitely provided.
2023-06-27 19:23:37 +02:00
Benoit Marty
82e566175a Room list: tweak UI and add overflow menu with report bug and invite friends action.
Extract invite friends action to a use case to avoid copy paste.
2023-06-27 19:23:37 +02:00
Benoit Marty
5f16297939 Merge branch 'develop' into feature/bma/removeOldResources 2023-06-27 16:09:30 +02:00
Benoit Marty
d782162f27 Merge pull request #684 from vector-im/feature/bma/stringR
Quick PR to introduce `CommonStrings` type alias
2023-06-27 16:00:31 +02:00
Marco Romano
2a82e1b4e4 Async API improvements "v2" (#672)
* Async API improvements "v2"

**NB: This PR actually changes only 3 files in `libraries/architecture/`. All the other changes are automated refactors to fix the calling code.**

This is a proposal for improvements to our `Async` type as discussed in: https://github.com/vector-im/element-x-android/pull/598/files#r1230664392 and in other chats.

Please bear in mind it is just a proposal, I'd love to hear your feedback about it, especially when it comes to naming: I've tried to make parameter and function names use a terminology similar to what we find in the Kotlin stdlib and its `Result` type.

I'm inclined to like more the non-extension flavours of the new `run*` APIs, though I'd also like your feedback about what API shape you prefer.

### Summary of the changes:
#### Functional
- Adds `exceptionOrNull()` API to complement the existing `dataOrNull()` API.
- Adds `isFailure()`, `isLoading()`, `isSuccess()` and `isUninitialized()` courtesy APIs.
- Renames `executeResult()` to `runUpdatingState()`:
	- Becomes the base API to which all the other similarly named APIs call into.
	- Makes it inline.
	- Adds contract.
	- Passes over any `prevData` to newre Async states.
	- Passes through the `block`s return value.
	- Adds unit tests.
- Renames `execute` to `runCatchingUpdatingState()` and makes it just call into `runUpdatingState()`
- Adds extension function overloads to the `run*` functions to accept `MutableState` as receiver

#### Cosmetics
- Reorders classes and methods in alphabetic order.
- Reorder parameter names to mimic conventions in Kotlin stdlib.
- Adds docstrings where useful.

* Use `fold()`

* rename pop to popFirst

* Add docstrings

* Please Detekt

* Rename exception to error.

* Please detekt

* Update existing usages.
2023-06-27 13:37:23 +02:00
Benoit Marty
4cb9843415 Now that the composer as been removed, we do not need element resource module anymore. 2023-06-27 13:34:55 +02:00
Benoit Marty
287328f7df More cleanup 2023-06-27 09:51:33 +02:00
Benoit Marty
4a8c49fa28 Use CommonStrings everywhere 2023-06-27 09:45:00 +02:00
bmarty
9c5c578c67 Sync Strings from Localazy 2023-06-26 00:10:53 +00:00
Chris Smith
e598a920eb Merge remote-tracking branch 'origin/develop' into misc/cjs/invite-string-change 2023-06-23 15:03:11 +01:00
Chris Smith
8fe5a0fe27 Merge remote-tracking branch 'origin/develop' into misc/cjs/invite-string-change 2023-06-23 14:10:17 +01:00
Johannes Marbach
1c583ead1c Merge pull request #627 from vector-im/johannes/room-creation-analytics-events 2023-06-23 15:09:55 +02:00
Chris Smith
35b5aadc79 Keep screen analytics entirely in the node 2023-06-23 13:04:24 +01:00
Johannes Marbach
f72de90585 Add (primitive) screen tracking for room & DM creation 2023-06-23 13:27:48 +02:00
Chris Smith
755dddbba9 Add some tests for create room analytics 2023-06-23 11:53:54 +01:00
ganfra
0d0a5571af Rust sdk update: make the app compile 2023-06-22 09:50:17 +02:00
Benoit Marty
02aee0fe15 Merge pull request #626 from vector-im/feature/bma/sonar
Sonar
2023-06-21 10:41:26 +02:00
github-actions[bot]
3f7738c001 Sync Strings (#630)
* Sync Strings from Localazy

* Update strings, remove broken German translation

* Update screenshots

---------

Co-authored-by: bmarty <bmarty@users.noreply.github.com>
Co-authored-by: Jorge Martín <jorgem@element.io>
Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2023-06-19 11:18:01 +00:00
Johannes Marbach
cf7155f890 Add analytics events for room creation 2023-06-17 21:25:14 +02:00
Benoit Marty
9c5f05dba4 Fix the 6 issues reported by Sonar. 2023-06-16 18:08:20 +02:00
Benoit Marty
9321a9f718 Introduce simulateLongTask to ensure that the Presenter State Loading is visible.
Also do some cleanup on the tests.
2023-06-15 10:57:05 +02:00
Chris Smith
f3a56531da Fix tests 2023-06-12 15:39:33 +01:00
Chris Smith
25af9c143c Fix provider for CreateRoomRootStateProvider 2023-06-12 15:22:31 +01:00
Chris Smith
3bbfa1a3dc Use correct string for "invite friends..." action 2023-06-12 15:18:32 +01:00
github-actions[bot]
03c28ac52d Sync Strings (#522)
Sync Strings from Localazy
2023-06-05 15:26:50 +00:00
Chris Smith
cd85851437 Remove deleted strings from translations 2023-06-05 12:38:26 +01:00
Chris Smith
f74ac6808d Update strings to get new room placeholder text 2023-06-05 12:14:29 +01:00
Chris Smith
8ef70024e5 Create room: use secondary tint instead of alpha 2023-06-05 11:28:32 +01:00
Chris Smith
e3fb510af4 Typo and minor formatting 2023-06-05 10:23:39 +01:00
Chris Smith
56d29e3303 Merge remote-tracking branch 'origin/develop' into misc/cjs/create-join-design-feedback 2023-06-02 16:25:07 +01:00
Jorge Martin Espinosa
341be67f3a Fix SearchBar colors. Also fix tertiary color in dark mode. (#516)
* Fix SearchBar colors. Also fix tertiary color in dark mode.
2023-06-02 17:20:43 +02:00
Chris Smith
ac6b2192a5 More string fiddling 2023-06-02 14:22:35 +01:00
Chris Smith
7d8a67fc35 Create room: elevate selected users when scrolling 2023-06-02 14:17:01 +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
30e4fad93c Create room: more spacing under selected users 2023-06-01 13:30:39 +01: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
Chris Smith
9f26226edc Create room: fix text colours and strings 2023-06-01 09:44:42 +01:00
Chris Smith
a30d87c323 Create room: fix colour for bottom sheet actions 2023-06-01 09:43:08 +01:00
Chris Smith
e4377c7e0c Create room: show divider between users in search 2023-06-01 09:42:26 +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
Benoit Marty
1a2e05608a Merge pull request #471 from vector-im/sync-localazy
Sync Strings
2023-05-30 13:06:51 +02:00
bmarty
3daea29a82 Sync Strings from Localazy 2023-05-29 00:09:47 +00:00
ganfra
1ce0324570 Merge branch 'develop' into feature/fga/image_loading 2023-05-26 11:39:34 +02:00
Benoit Marty
f0550e354a Group some state events in the timeline 2023-05-25 14:17:09 +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