Update libqmatrixclient && add a progress bar.
This commit is contained in:
@@ -17,6 +17,8 @@ SpectralRoom::SpectralRoom(Connection* connection, QString roomId,
|
||||
&SpectralRoom::countChanged);
|
||||
connect(this, &SpectralRoom::highlightCountChanged, this,
|
||||
&SpectralRoom::countChanged);
|
||||
connect(this, &Room::addedMessages, this,
|
||||
[=] { setBusy(false); });
|
||||
}
|
||||
|
||||
void SpectralRoom::chooseAndUploadFile() {
|
||||
@@ -175,3 +177,8 @@ void SpectralRoom::saveViewport(int topIndex, int bottomIndex) {
|
||||
setFirstDisplayedEvent(maxTimelineIndex() - topIndex);
|
||||
setLastDisplayedEvent(maxTimelineIndex() - bottomIndex);
|
||||
}
|
||||
|
||||
void SpectralRoom::getPreviousContent(int limit) {
|
||||
setBusy(true);
|
||||
Room::getPreviousContent(limit);
|
||||
}
|
||||
|
||||
@@ -15,6 +15,8 @@ class SpectralRoom : public Room {
|
||||
Q_PROPERTY(QString usersTyping READ getUsersTyping NOTIFY typingChanged)
|
||||
Q_PROPERTY(QString cachedInput READ cachedInput WRITE setCachedInput NOTIFY
|
||||
cachedInputChanged)
|
||||
Q_PROPERTY(bool busy READ busy NOTIFY busyChanged)
|
||||
|
||||
public:
|
||||
explicit SpectralRoom(Connection* connection, QString roomId,
|
||||
JoinState joinState = {});
|
||||
@@ -29,6 +31,14 @@ class SpectralRoom : public Room {
|
||||
}
|
||||
}
|
||||
|
||||
bool busy() { return m_busy; }
|
||||
void setBusy(bool value) {
|
||||
if (m_busy != value) {
|
||||
m_busy = value;
|
||||
emit busyChanged();
|
||||
}
|
||||
}
|
||||
|
||||
bool hasUsersTyping();
|
||||
QString getUsersTyping();
|
||||
|
||||
@@ -42,10 +52,14 @@ class SpectralRoom : public Room {
|
||||
Q_INVOKABLE int savedBottomVisibleIndex() const;
|
||||
Q_INVOKABLE void saveViewport(int topIndex, int bottomIndex);
|
||||
|
||||
Q_INVOKABLE void getPreviousContent(int limit = 10);
|
||||
|
||||
private:
|
||||
QString m_cachedInput;
|
||||
QSet<const QMatrixClient::RoomEvent*> highlights;
|
||||
|
||||
bool m_busy;
|
||||
|
||||
QString getMIME(const QUrl& fileUrl) const;
|
||||
void postFile(const QUrl& localFile, const QUrl& mxcUrl);
|
||||
|
||||
@@ -59,6 +73,7 @@ class SpectralRoom : public Room {
|
||||
|
||||
signals:
|
||||
void cachedInputChanged();
|
||||
void busyChanged();
|
||||
|
||||
public slots:
|
||||
void chooseAndUploadFile();
|
||||
|
||||
Reference in New Issue
Block a user