Benoit Marty
c33a08b602
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
316d57d1b6
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
bc682cdfa3
Fix compilation issue.
2023-06-27 11:29:45 +02:00
Benoit Marty
dfa1adb9c1
More cleanup
2023-06-27 09:51:33 +02:00
Benoit Marty
798da50454
Use CommonStrings everywhere
2023-06-27 09:45:00 +02:00
Marco Romano
882f75864c
Set up SDK & reusable map view component ( #476 )
...
Adds `libraries/map` which contains some initial building blocks that will be used by the location sharing feature.
Ref: https://github.com/vector-im/element-meta/issues/1684
2023-06-27 07:23:00 +00:00
Marco Romano
c5c9cd33da
Refine handleSnackbarMessage API ( #676 )
...
As per our offline convos during a PR review.
2023-06-26 16:29:50 +02:00
Benoit Marty
36910abca4
Move FileSizeFormatter to module :libraries:androidutils
2023-06-26 11:14:53 +02:00
Benoit Marty
b6920afb7f
Move cache management to a dedicated class and in the setting module, for clarity.
2023-06-26 11:07:53 +02:00
Benoit Marty
145cd410c7
Idx -> Index
2023-06-26 11:07:53 +02:00
Benoit Marty
5b4069d9f4
Use operator invoke.
2023-06-26 11:07:53 +02:00
Benoit Marty
8f0834afd5
Fix compilation issue in Fake class.
2023-06-26 11:07:53 +02:00
Benoit Marty
fb9568258f
Clear cache: clear Coil and OkHttpClient cache.
2023-06-26 11:07:53 +02:00
Benoit Marty
3652059a52
Lazy usage of OkHttpClient
2023-06-26 11:07:53 +02:00
Benoit Marty
e298670b68
var -> val
2023-06-26 11:07:53 +02:00
Benoit Marty
979ebe4adb
Close the client before deleting data, and ensure the app is restarted, using a cache Index.
2023-06-26 11:07:22 +02:00
Benoit Marty
573de1c168
Improve rendering of cache size (and fix compilation issue)
2023-06-26 11:07:22 +02:00
Benoit Marty
529720079a
Move FileSizeFormatter to a new module for injectable Android utilities.
2023-06-26 11:06:36 +02:00
Benoit Marty
2a7d252a4e
Display cache size in the developer settings ( #643 )
2023-06-26 11:06:36 +02:00
Benoit Marty
f014f0a3ae
Add clear cache action in the developer settings ( #643 )
2023-06-26 11:06:36 +02:00
bmarty
874739ece9
Sync Strings from Localazy
2023-06-26 00:10:53 +00:00
Jorge Martin Espinosa
cf2723ac7f
[Message Actions] Copy events to clipboard ( #665 )
...
* Add `Copy` action for text events
* Remove 'Copy' action from the list for non-text events
* Use `@ContributesBinding` to inject `AndroidClipboardHelper`.
2023-06-23 14:39:07 +00:00
Chris Smith
4586b532f1
Merge remote-tracking branch 'origin/develop' into misc/cjs/invite-string-change
2023-06-23 15:03:11 +01:00
Chris Smith
ffd73dbae3
Merge remote-tracking branch 'origin/develop' into misc/cjs/invite-string-change
2023-06-23 14:10:17 +01:00
Johannes Marbach
9e070a495e
Merge pull request #627 from vector-im/johannes/room-creation-analytics-events
2023-06-23 15:09:55 +02:00
Chris Smith
67587b836a
Keep screen analytics entirely in the node
2023-06-23 13:04:24 +01:00
Johannes Marbach
f0f1a026f7
Add (primitive) screen tracking for room & DM creation
2023-06-23 13:27:48 +02:00
Chris Smith
318db6f44c
Add some tests for create room analytics
2023-06-23 11:53:54 +01:00
Jorge Martin Espinosa
9251cbf536
[Message Actions] Report messages ( #642 )
...
* Add report messages feature
* Try to improve how snackbars are delivered
---------
Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2023-06-23 10:44:47 +02:00
Jorge Martin Espinosa
42827206b3
[Message Actions] Forward messages ( #635 )
...
* Add forwarding messages base
* Make forwarding single-selection
---------
Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2023-06-22 13:27:59 +02:00
ganfra
2115db7af5
Rust sdk update: make the app compile
2023-06-22 09:50:17 +02:00
ganfra
8e617b427d
CanSendEvent default to true and branch refresh mechanism...
2023-06-21 17:43:08 +02:00
Benoit Marty
9df0030967
Merge pull request #631 from vector-im/feature/bma/sendPermission
...
Take into acount send permission (power level)
2023-06-21 11:35:33 +02:00
Benoit Marty
da110bd2c4
Extract getCanSendEvent to the matrixui module, rename to canSendEventAsState and use produceState.
2023-06-21 10:57:55 +02:00
Benoit Marty
f38f1487c5
Merge pull request #626 from vector-im/feature/bma/sonar
...
Sonar
2023-06-21 10:41:26 +02:00
ganfra
c7b2ac5acd
Merge pull request #617 from vector-im/feature/fga/fix_media_pre_processing
...
Feature/fga/fix media pre processing
2023-06-20 16:17:50 +02:00
bmarty
700fadb09d
Sync Strings from Localazy
2023-06-19 20:15:52 +00:00
ganfra
6ca36b2339
Timeline media: kind of align with other messenger apps
2023-06-19 21:38:54 +02:00
Johannes Marbach
679ec376f2
Remove send message section until it's actually implemented ( #632 )
...
Fixes : #616
2023-06-19 17:24:34 +02:00
github-actions[bot]
fe5524bae4
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
Benoit Marty
9f01d6f66a
Display a banner instead of the composer when user cannot post message to a room ( #602 )
2023-06-19 11:52:34 +02:00
Johannes Marbach
b237b123c7
Add analytics events for room creation
2023-06-17 21:25:14 +02:00
Benoit Marty
2452d8aa91
Fix the 6 issues reported by Sonar.
2023-06-16 18:08:20 +02:00
Benoit Marty
bd9aa38f6a
Add Modifier parameter and make internal Composable private.
2023-06-16 15:27:36 +02:00
ganfra
35dcc5dd5a
Media : Fix test compilation
2023-06-16 14:23:52 +02:00
ganfra
15ef9abed6
Merge branch 'develop' into feature/fga/fix_media_pre_processing
2023-06-16 14:05:11 +02:00
ganfra
33c74fb4e5
Fix MediaPreProcessor for images/videos sent as file
2023-06-16 13:52:07 +02:00
Benoit Marty
fbd366c40a
Delete obsolete translation (also deleted on Localazy)
2023-06-16 12:00:29 +02:00
Benoit Marty
b36fd098d3
Make the link to the policy active.
2023-06-16 10:47:09 +02:00
Benoit Marty
b9ec124af4
Move extension openUrlInChromeCustomTab to :androidutils module.
2023-06-16 10:32:28 +02:00