Fancy effects: additional check if enabled everywhere
This commit is contained in:
committed by
Carl Schwan
parent
09dff4553a
commit
01f8c3b09f
@@ -477,6 +477,10 @@ ToolBar {
|
|||||||
property var userAutocompleted: ({})
|
property var userAutocompleted: ({})
|
||||||
|
|
||||||
function checkForFancyEffectsReason() {
|
function checkForFancyEffectsReason() {
|
||||||
|
if (!Config.showFancyEffects) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
var inputFieldText = inputField.text.trim()
|
var inputFieldText = inputField.text.trim()
|
||||||
console.log(inputFieldText)
|
console.log(inputFieldText)
|
||||||
if (inputFieldText.includes('\u{2744}')) {
|
if (inputFieldText.includes('\u{2744}')) {
|
||||||
|
|||||||
@@ -616,6 +616,7 @@ Kirigami.ScrollablePage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Connections {
|
Connections {
|
||||||
|
enabled: Config.showFancyEffects
|
||||||
target: messageEventModel
|
target: messageEventModel
|
||||||
onFancyEffectsReasonFound: {
|
onFancyEffectsReasonFound: {
|
||||||
fancyEffectsContainer.processFancyEffectsReason(fancyEffect)
|
fancyEffectsContainer.processFancyEffectsReason(fancyEffect)
|
||||||
@@ -623,6 +624,7 @@ Kirigami.ScrollablePage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Connections {
|
Connections {
|
||||||
|
enabled: Config.showFancyEffects
|
||||||
target: chatTextInput
|
target: chatTextInput
|
||||||
onFancyEffectsReasonFound: {
|
onFancyEffectsReasonFound: {
|
||||||
fancyEffectsContainer.processFancyEffectsReason(fancyEffect)
|
fancyEffectsContainer.processFancyEffectsReason(fancyEffect)
|
||||||
|
|||||||
@@ -99,6 +99,7 @@ void MessageEventModel::setRoom(NeoChatRoom *room)
|
|||||||
|
|
||||||
using namespace Quotient;
|
using namespace Quotient;
|
||||||
connect(m_currentRoom, &Room::aboutToAddNewMessages, this, [=](RoomEventsRange events) {
|
connect(m_currentRoom, &Room::aboutToAddNewMessages, this, [=](RoomEventsRange events) {
|
||||||
|
if (NeoChatConfig::self()->showFancyEffects()) {
|
||||||
for (auto &event : events) {
|
for (auto &event : events) {
|
||||||
RoomMessageEvent *message = dynamic_cast<RoomMessageEvent *>(event.get());
|
RoomMessageEvent *message = dynamic_cast<RoomMessageEvent *>(event.get());
|
||||||
if (message) {
|
if (message) {
|
||||||
@@ -130,6 +131,7 @@ void MessageEventModel::setRoom(NeoChatRoom *room)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
beginInsertRows({}, timelineBaseIndex(), timelineBaseIndex() + int(events.size()) - 1);
|
beginInsertRows({}, timelineBaseIndex(), timelineBaseIndex() + int(events.size()) - 1);
|
||||||
});
|
});
|
||||||
connect(m_currentRoom, &Room::aboutToAddHistoricalMessages, this, [=](RoomEventsRange events) {
|
connect(m_currentRoom, &Room::aboutToAddHistoricalMessages, this, [=](RoomEventsRange events) {
|
||||||
|
|||||||
Reference in New Issue
Block a user