Add back busy indicator.

This commit is contained in:
Black Hat
2018-10-07 20:38:30 +08:00
parent c93efebd23
commit e69ac60d08
5 changed files with 20 additions and 12 deletions

View File

@@ -8,8 +8,8 @@
#include "events/typingevent.h"
#include <QFileDialog>
#include <QMimeDatabase>
#include <QMetaObject>
#include <QMimeDatabase>
SpectralRoom::SpectralRoom(Connection* connection, QString roomId,
JoinState joinState)
@@ -18,8 +18,7 @@ SpectralRoom::SpectralRoom(Connection* connection, QString roomId,
&SpectralRoom::countChanged);
connect(this, &SpectralRoom::highlightCountChanged, this,
&SpectralRoom::countChanged);
connect(this, &Room::addedMessages, this,
[=] { setBusy(false); });
connect(this, &Room::addedMessages, this, [=] { setBusy(false); });
}
void SpectralRoom::chooseAndUploadFile() {
@@ -178,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);
}

View File

@@ -52,6 +52,8 @@ 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;