mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-27 13:38:49 +03:00
Separate text updates for timeline and other consumers
This commit is contained in:
parent
96fbfab973
commit
af4e174d99
3 changed files with 5 additions and 2 deletions
|
@ -24,7 +24,7 @@ Pane {
|
||||||
palette: Nheko.colors
|
palette: Nheko.colors
|
||||||
background: null
|
background: null
|
||||||
padding: 0
|
padding: 0
|
||||||
rotation: Rooms.currentRoom ? Rooms.currentRoom.input.text.length : 0
|
rotation: Rooms.currentRoom ? Rooms.currentRoom.input.liveText.length : 0
|
||||||
layer.smooth: true
|
layer.smooth: true
|
||||||
layer.mipmap: true
|
layer.mipmap: true
|
||||||
antialiasing: true
|
antialiasing: true
|
||||||
|
|
|
@ -229,6 +229,7 @@ InputBar::setText(const QString &newText)
|
||||||
|
|
||||||
updateAtRoom(QLatin1String(""));
|
updateAtRoom(QLatin1String(""));
|
||||||
emit textChanged(newText);
|
emit textChanged(newText);
|
||||||
|
emit liveTextChanged(newText);
|
||||||
}
|
}
|
||||||
void
|
void
|
||||||
InputBar::updateState(int selectionStart_,
|
InputBar::updateState(int selectionStart_,
|
||||||
|
@ -250,7 +251,7 @@ InputBar::updateState(int selectionStart_,
|
||||||
|
|
||||||
updateAtRoom(text_);
|
updateAtRoom(text_);
|
||||||
// disabled, as it moves the cursor to the end
|
// disabled, as it moves the cursor to the end
|
||||||
// emit textChanged(text_);
|
emit liveTextChanged(text_);
|
||||||
}
|
}
|
||||||
|
|
||||||
selectionStart = selectionStart_;
|
selectionStart = selectionStart_;
|
||||||
|
|
|
@ -164,6 +164,7 @@ class InputBar : public QObject
|
||||||
Q_PROPERTY(bool uploading READ uploading NOTIFY uploadingChanged)
|
Q_PROPERTY(bool uploading READ uploading NOTIFY uploadingChanged)
|
||||||
Q_PROPERTY(bool containsAtRoom READ containsAtRoom NOTIFY containsAtRoomChanged)
|
Q_PROPERTY(bool containsAtRoom READ containsAtRoom NOTIFY containsAtRoomChanged)
|
||||||
Q_PROPERTY(QString text READ text NOTIFY textChanged)
|
Q_PROPERTY(QString text READ text NOTIFY textChanged)
|
||||||
|
Q_PROPERTY(QString liveText READ text NOTIFY liveTextChanged)
|
||||||
Q_PROPERTY(QVariantList uploads READ uploads NOTIFY uploadsChanged)
|
Q_PROPERTY(QVariantList uploads READ uploads NOTIFY uploadsChanged)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
@ -214,6 +215,7 @@ private slots:
|
||||||
signals:
|
signals:
|
||||||
void insertText(QString text);
|
void insertText(QString text);
|
||||||
void textChanged(QString newText);
|
void textChanged(QString newText);
|
||||||
|
void liveTextChanged(QString newText);
|
||||||
void uploadingChanged(bool value);
|
void uploadingChanged(bool value);
|
||||||
void containsAtRoomChanged();
|
void containsAtRoomChanged();
|
||||||
void uploadsChanged();
|
void uploadsChanged();
|
||||||
|
|
Loading…
Reference in a new issue