Update wysiwyg to v2.37.7 (#3218)

* Update wysiwyg to v2.37.7

* Fix API breaks

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jorge Martín <jorgem@element.io>
This commit is contained in:
renovate[bot]
2024-07-19 14:14:21 +02:00
committed by GitHub
parent 8a2335f7aa
commit f2378ca6ea
2 changed files with 10 additions and 8 deletions

View File

@@ -44,7 +44,7 @@ serialization_json = "1.6.3"
showkase = "1.0.3"
appyx = "1.4.0"
sqldelight = "2.0.2"
wysiwyg = "2.37.5"
wysiwyg = "2.37.7"
telephoto = "0.12.0"
# DI

View File

@@ -33,17 +33,19 @@ data class Suggestion(
)
}
enum class SuggestionType {
Mention,
Command,
Room;
sealed interface SuggestionType {
data object Mention : SuggestionType
data object Command : SuggestionType
data object Room : SuggestionType
data class Custom(val pattern: String) : SuggestionType
companion object {
fun fromPatternKey(key: PatternKey): SuggestionType {
return when (key) {
PatternKey.AT -> Mention
PatternKey.SLASH -> Command
PatternKey.HASH -> Room
PatternKey.At -> Mention
PatternKey.Slash -> Command
PatternKey.Hash -> Room
is PatternKey.Custom -> Custom(key.v1)
}
}
}