mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2024-12-17 17:20:21 +01:00
update available reactions (#2466)
This commit is contained in:
committed by
GitHub
parent
acc4cad082
commit
3be2259068
@@ -1811,11 +1811,6 @@ sealed class MsgReaction {
|
||||
is Unknown -> ""
|
||||
}
|
||||
|
||||
val cmdString: String get() = when(this) {
|
||||
is Emoji -> emoji.cmdString
|
||||
is Unknown -> ""
|
||||
}
|
||||
|
||||
companion object {
|
||||
val values: List<MsgReaction> get() = MREmojiChar.values().map(::Emoji)
|
||||
}
|
||||
@@ -1864,22 +1859,9 @@ enum class MREmojiChar(val value: String) {
|
||||
@SerialName("👍") ThumbsUp("👍"),
|
||||
@SerialName("👎") ThumbsDown("👎"),
|
||||
@SerialName("😀") Smile("😀"),
|
||||
@SerialName("🎉") Celebration("🎉"),
|
||||
@SerialName("😕") Confused("😕"),
|
||||
@SerialName("😕") Sad("😢"),
|
||||
@SerialName("❤") Heart("❤"),
|
||||
@SerialName("🚀") Launch("🚀"),
|
||||
@SerialName("👀") Looking("👀");
|
||||
|
||||
val cmdString: String get() = when(this) {
|
||||
ThumbsUp -> "+"
|
||||
ThumbsDown -> "-"
|
||||
Smile -> ")"
|
||||
Celebration -> "!"
|
||||
Confused -> "?"
|
||||
Heart -> "*"
|
||||
Launch -> "^"
|
||||
Looking -> "%"
|
||||
}
|
||||
@SerialName("🚀") Launch("🚀");
|
||||
}
|
||||
|
||||
@Serializable
|
||||
|
||||
@@ -2495,24 +2495,9 @@ public enum MREmojiChar: String, Codable, CaseIterable {
|
||||
case thumbsup = "👍"
|
||||
case thumbsdown = "👎"
|
||||
case smile = "😀"
|
||||
case celebration = "🎉"
|
||||
case confused = "😕"
|
||||
case sad = "😢"
|
||||
case heart = "❤"
|
||||
case launch = "🚀"
|
||||
case looking = "👀"
|
||||
|
||||
public var cmdString: String {
|
||||
switch self {
|
||||
case .thumbsup: return "+"
|
||||
case .thumbsdown: return "-"
|
||||
case .smile: return ")"
|
||||
case .celebration: return "!"
|
||||
case .confused: return "?"
|
||||
case .heart: return "*"
|
||||
case .launch: return "^"
|
||||
case .looking: return "%"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension MsgReaction: Decodable {
|
||||
|
||||
+1
-3
@@ -4950,11 +4950,9 @@ chatCommandP =
|
||||
'+' -> '👍'
|
||||
'-' -> '👎'
|
||||
')' -> '😀'
|
||||
'!' -> '🎉'
|
||||
'?' -> '😕'
|
||||
',' -> '😢'
|
||||
'*' -> head "❤️"
|
||||
'^' -> '🚀'
|
||||
'%' -> '👀'
|
||||
c -> c
|
||||
refChar c = c > ' ' && c /= '#' && c /= '@'
|
||||
liveMessageP = " live=" *> onOffP <|> pure False
|
||||
|
||||
@@ -267,7 +267,7 @@ instance FromJSON MREmojiChar where
|
||||
|
||||
mrEmojiChar :: Char -> Either String MREmojiChar
|
||||
mrEmojiChar c
|
||||
| c `elem` ("👍👎😀🎉😕❤️🚀👀" :: String) = Right $ MREmojiChar c
|
||||
| c `elem` ("👍👎😀😢❤️🚀" :: String) = Right $ MREmojiChar c
|
||||
| otherwise = Left "bad emoji"
|
||||
|
||||
data FileChunk = FileChunk {chunkNo :: Integer, chunkBytes :: ByteString} | FileChunkCancel
|
||||
|
||||
Reference in New Issue
Block a user