summary refs log tree commit diff
path: root/src/timeline/Reaction.h
diff options
context:
space:
mode:
authorNicolas Werner <nicolas.werner@hotmail.de>2022-01-01 06:37:15 +0100
committerNicolas Werner <nicolas.werner@hotmail.de>2022-01-01 07:10:12 +0100
commit7685d1808bf97fb74914b97ed99f48ec7cc690c0 (patch)
tree52995d3b4eb0d5d34b80e0754e536dd491f4b86e /src/timeline/Reaction.h
parentUse fully qualified emoji and use literals (diff)
downloadnheko-7685d1808bf97fb74914b97ed99f48ec7cc690c0.tar.xz
Strip variant selector in some cases
fixes #439
Workaround for https://bugreports.qt.io/browse/QTBUG-97401
fixes #810
Diffstat (limited to 'src/timeline/Reaction.h')
-rw-r--r--src/timeline/Reaction.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/timeline/Reaction.h b/src/timeline/Reaction.h
index ef8d36ea..9ed3f801 100644
--- a/src/timeline/Reaction.h
+++ b/src/timeline/Reaction.h
@@ -11,13 +11,15 @@
 struct Reaction
 {
     Q_GADGET
-    Q_PROPERTY(QString key READ key)
-    Q_PROPERTY(QString users READ users)
-    Q_PROPERTY(QString selfReactedEvent READ selfReactedEvent)
-    Q_PROPERTY(int count READ count)
+    Q_PROPERTY(QString key READ key CONSTANT)
+    Q_PROPERTY(QString displayKey READ displayKey CONSTANT)
+    Q_PROPERTY(QString users READ users CONSTANT)
+    Q_PROPERTY(QString selfReactedEvent READ selfReactedEvent CONSTANT)
+    Q_PROPERTY(int count READ count CONSTANT)
 
 public:
-    QString key() const { return key_.toHtmlEscaped(); }
+    QString key() const { return key_; }
+    QString displayKey() const { return key_.toHtmlEscaped().remove(QStringLiteral(u"\ufe0f")); }
     QString users() const { return users_.toHtmlEscaped(); }
     QString selfReactedEvent() const { return selfReactedEvent_; }
     int count() const { return count_; }