Commit Graph

53 Commits

Author SHA1 Message Date
Benoit Marty
7538e9e503 Fix detekt issue. 2024-12-16 11:55:20 +01:00
Jorge Martin Espinosa
e44b5ad98d Upgrade Kotlin to v2.0 (#3594)
* Bump Kotlin to v2.0

* Fix lots of issues due to the upgrade: lint issues, function signature incompatibilities, broken tests, etc.

---------

Co-authored-by: Benoit Marty <benoit@matrix.org>
2024-10-10 08:32:00 +00:00
ganfra
3cd7979d6d Pinned messages analytics : add LocalAnalyticsService to allowedCompositionLocals 2024-09-23 16:09:02 +02:00
Jorge Martin Espinosa
89ec904c4a Restore intentional mentions in the markdown/plain text editor (#3193)
* Restore intentional mentions in the markdown/plain text editor

---------

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2024-07-15 18:27:59 +02:00
Benoit Marty
4047f4395d Let Konsist checks the license header 2024-07-01 11:12:02 +02:00
Jorge Martin Espinosa
ce91fe4ab2 Resolve display names in mentions in real time (#3051)
* Resolve display names in mentions in real time

* Use `LocalRoomMemberProfilesCache` to avoid having to implement `TextMessagePresenter`

* Also use local composition provider for `MentionSpanProvider`
2024-06-21 09:57:36 +00:00
Benoit Marty
9f522b2671 Read receipt: Cleanup 2023-11-16 14:05:00 +01:00
Marco Romano
cf3039c6f3 TimelineItemPresenterFactories (#1609)
DI infrastructure to allow injection of presenters into the timeline.
Add an `@AssistedFactory` of type `TimelineItemPresenterFactory` to a `Presenter` class and bind this factory into the TimelineItemPresenterFactory map multi binding using:

```
@Binds
@IntoMap
@TimelineItemEventContentKey(MyTimelineItemContent::class)
```

A map multibinding of such factories will be available in the `LocalTimelineItemPresenterFactories` composition local for further use down the UI tree.
2023-10-19 15:57:34 +02:00
Benoit Marty
a534b1fa6d Merge pull request #1399 from vector-im/renovate/io.nlopez.compose.rules-detekt-0.x
Update dependency io.nlopez.compose.rules:detekt to v0.3.0
2023-09-21 09:30:56 +02:00
Benoit Marty
5b4d2e75d1 Rules has been renamed
- https://github.com/mrmans0n/compose-rules/releases/tag/v0.3.0
- https://github.com/mrmans0n/compose-rules/pull/100
2023-09-21 08:29:14 +02:00
Benoit Marty
98ae8feb38 Detekt: Disable OptionalWhenBraces, even if deprecated and replaced by BracesOnWhenStatements. Cannot do what I want with BracesOnWhenStatements. 2023-09-20 17:21:18 +02:00
Benoit Marty
d22b005aa3 Enable more detekt rules. 2023-07-26 12:12:37 +02:00
Benoit Marty
b69e01a5f3 Enable detekt rules UseLet and fix existing issues. 2023-07-26 12:12:07 +02:00
Benoit Marty
613cd4f863 Enable detekt rules UseDataClass and fix existing issues. 2023-07-26 11:51:17 +02:00
Benoit Marty
15ac81d32a Enable detekt rules UnderscoresInNumericLiterals and fix existing issues. 2023-07-26 11:48:08 +02:00
Benoit Marty
6fff373613 Enable detekt rules OptionalUnit and fix existing issues. 2023-07-26 11:43:48 +02:00
Benoit Marty
4ba4bd1f56 Enable more detekt rules and remove unused extension. 2023-07-26 11:25:05 +02:00
Benoit Marty
8458a9e937 Enable detekt rules DataClassShouldBeImmutable and fix existing issues. 2023-07-26 11:18:00 +02:00
Benoit Marty
d433c3cbaa Enable detekt rules AlsoCouldBeApply and fix existing issues. 2023-07-26 11:10:46 +02:00
Benoit Marty
1d3aa2cd05 Enable detekt rules CascadingCallWrapping and fix existing issues. 2023-07-26 11:07:25 +02:00
Benoit Marty
03cefb2c79 Enable detekt rules SuspendFunSwallowedCancellation and SuspendFunWithCoroutineScopeReceiver. 2023-07-26 10:48:38 +02:00
Benoit Marty
140271069c Enable detekt rule TooGenericExceptionThrown and fix existing issue. 2023-07-26 10:40:41 +02:00
Benoit Marty
5d0bf5dbe0 Enable detekt rule InstanceOfCheckForException. 2023-07-26 10:37:44 +02:00
Benoit Marty
b4fd5d018c Enable detekt rule ComplexCondition, LargeClass. 2023-07-26 10:34:39 +02:00
Benoit Marty
f055a25457 Enable detekt rule ThrowingExceptionsWithoutMessageOrCause and fix existing issues. 2023-07-26 10:33:51 +02:00
Benoit Marty
d82b47beeb Enable detekt rule UnnecessaryAbstractClass, LoopWithTooManyJumpStatements, EmptySecondaryConstructor. 2023-07-26 10:23:51 +02:00
Benoit Marty
9894e2fed0 Enable detekt rule ProtectedMemberInFinalClass. 2023-07-26 10:19:25 +02:00
Benoit Marty
9e3679cbd6 Enable detekt rule UseCheckOrError and fix existing issues (and a potential crash on MapboxMap?). 2023-07-26 10:18:28 +02:00
Benoit Marty
f3974dd570 Enable detekt rule ImplicitDefaultLocale and fix existing issue. 2023-07-26 10:11:00 +02:00
Benoit Marty
996574f2c6 Enable detekt rule PreviewPublic and fix existing issues. 2023-07-26 10:08:39 +02:00
Benoit Marty
4a3ba10ad5 Enable more detekt rules 2023-07-20 18:08:37 +02:00
Benoit Marty
c72f1a09a7 Enable detekt rules UnnecessaryParentheses and cleanup the code. 2023-07-20 18:08:08 +02:00
Benoit Marty
55538c2773 Enable detekt rules UnusedImports and cleanup the code. 2023-07-20 18:00:23 +02:00
Benoit Marty
2c4308ddba Remove detekt rules about ViewModels. 2023-07-20 17:53:29 +02:00
Benoit Marty
8f715cbc92 Enable detekt rules TopLevelPropertyNaming and cleanup the code. 2023-07-20 17:52:48 +02:00
Benoit Marty
2bd1c75937 Enable detekt rules VariableNaming and cleanup the code. 2023-07-20 17:50:23 +02:00
Benoit Marty
bd2826da3a Enable detekt rules UnusedParameter and UnusedPrivateProperty and cleanup the code. 2023-07-20 17:48:56 +02:00
Benoit Marty
bb3511e5f3 Enable detekt rule UnusedPrivateMember and cleanup the code. 2023-07-20 17:44:14 +02:00
Marco Romano
a852465554 MapLibre compose wrapper library (#877)
Heavily inspired from https://github.com/googlemaps/android-maps-compose It doesn't aim to be a full featured library like android-maps-compose, it's been stripped down to only handle our use cases.

Related to:
https://github.com/vector-im/element-meta/issues/1674
https://github.com/vector-im/element-meta/issues/1682
2023-07-17 16:22:29 +02:00
Benoit Marty
9b042cf056 Remove ElementColors. We should use semantics and material colors now. 2023-07-10 17:33:42 +02:00
Jorge Martin Espinosa
c5a5810c05 Link Compound's TypographyTokens to ElementTheme. (#700)
* Link Compound's `TypographyTokens` to `ElementTheme`.

Also add some docs about when we should use each set of tokens.

* Renamed `LocalColors` to `LocalLegacyColors`.

Made both `LocalLegacyColors` and `LocalCompoundColors` internal. This means it will need to always be used through `ElementTheme.`

Also, removed any usages of `LocalColors.current` accross the project, they're now used through `ElementTheme.legacyColors`.
2023-06-28 08:53:20 +00:00
Jorge Martin Espinosa
bdb1841e44 [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
renovate[bot]
7ba3d3d1ab Update dependency io.gitlab.arturbosch.detekt to v1.23.0 (#454)
* Update dependency io.gitlab.arturbosch.detekt to v1.23.0

* Disable new detekt rules for unused params

UnusedParameter and UnusedPrivateProperty are both potentially
useful but we currently break them a lot, for the most part
in places that haven't been fully implemented yet.

The unused params are reported as build warnings anyway, so
we're not missing much by disabling these for now.

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Chris Smith <csmith@lunarian.uk>
2023-05-30 11:18:51 +00:00
Jorge Martin Espinosa
e0bb1da258 Add consumer proguard rules for SQLCipher (#138)
* Add consumer proguard rules for SQLCipher

* Add changelog

* Explain why these rules are necessary

Co-authored-by: Andrew Morgan <1342360+anoadragon453@users.noreply.github.com>

* Try to switch to a supported version of Compose Rules to avoid dependency issues

---------

Co-authored-by: Andrew Morgan <1342360+anoadragon453@users.noreply.github.com>
2023-03-06 19:40:05 +01:00
Jorge Martin Espinosa
33b88b8026 Refine sign in flow to match designs and iOS flow (#100)
* Fix dark theme

* First attempt at replicating iOS' UI & flows.

* Try to fix Maestro tests

* Add error dialogs and tests

* Remove unused modifiers

* Try to fix detekt issues

* Tidy up maestro login flow a bit

* Add `CompoundColorPalette` with some needed colors

* Fixes to designs

* Fix detekt issues

* More design fixes

* Some other minor design fixes

* Add changelog

* Minor tweaks.

* Remove legacy dark material theme as it's no longer needed.

* Move sliding sync 'learn more' url to constants object

* Remove unused focusManager

* Change how the displayed homeserver works

* Keep user input as homeserver if it's valid

* Remove `CompoundColorPalette`, try to fix issue when toggling dark mode.

* Add `@Stable` to the theme, adjust how it toggles in dark mode

* Remove unused strings

* Update screenshots

* Re-organize components in LoginRootScreen

* Bump min coverage to 55, max to 60

* Always replace the snapshots contents when running `recordPaparazzi`

* Fix dark theme preview of components using content colors

* Add `BackButton` component

* Handle errors with dialogs in a generic way

* Align our Dialog components with the designs, use them were needed

* Use a `MatrixHomeserverDetails` data class instead of just an URL.

* `AuthenticationService.getHomeserverDetails()` now returns a `StateFlow`.

Also, try to fix coverage issues in tests.
2023-03-06 09:30:16 +01:00
Benoit Marty
732fb9bd1e Fix detekt issue, optimize import, fix color of preference category title 2023-02-03 13:43:00 +01:00
Benoit Marty
d653d68b97 Fix licence template 2023-01-18 15:49:57 +01:00
Benoit Marty
d5aeae72a1 Let detekt check if the license is set on Kotlin files. 2022-12-22 14:17:35 +01:00
Benoit Marty
a4fd7bab4f Code quality
Code quality
2022-12-21 15:32:53 +01:00
Benoit Marty
0e558d603d Adapt twitter rules. 2022-12-12 16:24:35 +01:00