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

@@ -2,7 +2,7 @@ import QtQuick 2.9
import QtQuick.Controls 2.2
import QtQuick.Layouts 1.3
import Matrique 0.1
import MatriqueSettings 0.1
import Matrique.Settings 0.1
import "qrc:/qml/form"
@@ -14,10 +14,8 @@ Page {
RoomListModel {
id: roomListModel
onRoomAdded: MatriqueSettings.lazyLoad ? {} : room.getPreviousContent(20)
onNewMessage: window.active ? {} : matriqueController.showMessage(roomName, content, icon)
onDataChanged: roomListForm.rawCurrentIndex = -1
onRoomAdded: if (!MSettings.lazyLoad) room.getPreviousContent(20)
onNewMessage: if (!window.active) matriqueController.showMessage(roomName, content, icon)
}
RowLayout {
@@ -28,13 +26,11 @@ Page {
id: roomListForm
Layout.fillHeight: true
Layout.preferredWidth: MatriqueSettings.miniMode ? 80 : page.width * 0.35
Layout.preferredWidth: MSettings.miniMode ? 80 : page.width * 0.35
Layout.minimumWidth: 80
Layout.maximumWidth: 360
listModel: roomListModel
onEnterRoom: roomForm.currentRoom = currentRoom
}
RoomForm {
@@ -42,6 +38,8 @@ Page {
Layout.fillWidth: true
Layout.fillHeight: true
currentRoom: roomListForm.enteredRoom
}
}
}