A lot of improvements.

Fix laggish RoomListView when dragging.
Remove per-room timer and add timer in RoomForm.
Remove singleton module and use file as singleton.
Minor UI tweak in RoomListView.
Pass room to RoomListView via "currentRoom" delegate property and remove
RoomListForm-wide currentRoom.
Put menu files in a separate folder.
Show initial image in ImageStatus when avatar is not loaded.
Add about page.
Merge all setting pages into Setting.qml.
Add option to rearrange rooms by activity.
Add option to use RichText parser.
Add document url.
This commit is contained in:
Black Hat
2018-08-24 13:25:41 +08:00
parent 391473e559
commit cfa8043596
28 changed files with 247 additions and 287 deletions

View File

@@ -10,8 +10,6 @@ using namespace QMatrixClient;
class MatriqueRoom : public Room {
Q_OBJECT
Q_PROPERTY(
bool isTyping READ isTyping WRITE setIsTyping NOTIFY isTypingChanged)
Q_PROPERTY(bool hasUsersTyping READ hasUsersTyping NOTIFY typingChanged)
Q_PROPERTY(QString usersTyping READ getUsersTyping NOTIFY typingChanged)
Q_PROPERTY(QString cachedInput READ cachedInput WRITE setCachedInput NOTIFY
@@ -20,15 +18,6 @@ class MatriqueRoom : public Room {
explicit MatriqueRoom(Connection* connection, QString roomId,
JoinState joinState = {});
bool isTyping() { return m_isTyping; }
void setIsTyping(bool isTyping) {
if (isTyping) m_timeoutTimer->start();
if (isTyping != m_isTyping) {
m_isTyping = isTyping;
emit isTypingChanged();
}
}
const QString& cachedInput() const { return m_cachedInput; }
void setCachedInput(const QString& input) {
if (input != m_cachedInput) {
@@ -44,15 +33,11 @@ class MatriqueRoom : public Room {
private:
QString m_cachedInput;
bool m_isTyping;
QTimer* m_timeoutTimer = new QTimer();
QTimer* m_repeatTimer = new QTimer();
QString getMIME(const QUrl& fileUrl) const;
void postFile(const QUrl& localFile, const QUrl& mxcUrl);
signals:
void isTypingChanged();
void cachedInputChanged();
public slots: