mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-22 03:00:46 +03:00
Make effect messages stand out more
This commit is contained in:
parent
f47f66f748
commit
149535efbe
2 changed files with 11 additions and 2 deletions
|
@ -24,7 +24,7 @@ Item {
|
||||||
ParticleSystem {
|
ParticleSystem {
|
||||||
id: particleSystem
|
id: particleSystem
|
||||||
|
|
||||||
Component.onCompleted: pause();
|
Component.onCompleted: stop();
|
||||||
paused: !effectRoot.shouldEffectsRun
|
paused: !effectRoot.shouldEffectsRun
|
||||||
running: effectRoot.shouldEffectsRun
|
running: effectRoot.shouldEffectsRun
|
||||||
}
|
}
|
||||||
|
@ -32,7 +32,6 @@ Item {
|
||||||
Emitter {
|
Emitter {
|
||||||
id: confettiEmitter
|
id: confettiEmitter
|
||||||
|
|
||||||
Component.onCompleted: stop();
|
|
||||||
group: "confetti"
|
group: "confetti"
|
||||||
width: effectRoot.width * 3/4
|
width: effectRoot.width * 3/4
|
||||||
enabled: false
|
enabled: false
|
||||||
|
|
|
@ -690,6 +690,16 @@ TimelineModel::data(const mtx::events::collections::TimelineEvents &event, int r
|
||||||
formattedBody_.replace(curImg, imgReplacement);
|
formattedBody_.replace(curImg, imgReplacement);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (auto effectMessage =
|
||||||
|
std::get_if<mtx::events::RoomEvent<mtx::events::msg::ElementEffect>>(&event)) {
|
||||||
|
if (effectMessage->content.msgtype == std::string_view("nic.custom.confetti")) {
|
||||||
|
formattedBody_.append(QUtf8StringView(u8"🎊"));
|
||||||
|
} else if (effectMessage->content.msgtype ==
|
||||||
|
std::string_view("io.element.effect.rainfall")) {
|
||||||
|
formattedBody_.append(QUtf8StringView(u8"🌧️"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return QVariant(utils::replaceEmoji(utils::linkifyMessage(formattedBody_)));
|
return QVariant(utils::replaceEmoji(utils::linkifyMessage(formattedBody_)));
|
||||||
}
|
}
|
||||||
case FormattedStateEvent: {
|
case FormattedStateEvent: {
|
||||||
|
|
Loading…
Reference in a new issue