fix(deps): update wysiwyg to v2.40.0 (#5400)
* fix(deps): update wysiwyg to v2.40.0 * Fix API mismatches --------- 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:
parent
a02b2283af
commit
b6e2208ccb
4 changed files with 5 additions and 1 deletions
|
|
@ -167,6 +167,7 @@ private fun Editable.checkSuggestionNeeded(): Suggestion? {
|
|||
'@' -> SuggestionType.Mention
|
||||
'#' -> SuggestionType.Room
|
||||
'/' -> SuggestionType.Command
|
||||
':' -> SuggestionType.Emoji
|
||||
else -> error("Unknown suggestion type. This should never happen.")
|
||||
}
|
||||
Suggestion(startOfWord, endOfWord, suggestionType, text)
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@ sealed interface SuggestionType {
|
|||
data object Mention : SuggestionType
|
||||
data object Command : SuggestionType
|
||||
data object Room : SuggestionType
|
||||
data object Emoji : SuggestionType
|
||||
data class Custom(val pattern: String) : SuggestionType
|
||||
|
||||
companion object {
|
||||
|
|
@ -36,6 +37,7 @@ sealed interface SuggestionType {
|
|||
PatternKey.At -> Mention
|
||||
PatternKey.Slash -> Command
|
||||
PatternKey.Hash -> Room
|
||||
PatternKey.Colon -> Emoji
|
||||
is PatternKey.Custom -> Custom(key.v1)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue