From 317a6d6ec8a934eed8bc9d8650a2b75a825a99da Mon Sep 17 00:00:00 2001 From: Black Hat Date: Mon, 17 Sep 2018 20:47:09 +0800 Subject: [PATCH] Some uncommited changes. --- include/libqmatrixclient | 2 +- qml/MatriqueSettings.qml | 1 - qml/Room.qml | 2 +- qml/Setting.qml | 7 ------- qml/component/MessageDelegate.qml | 10 +++++++++- qml/form/RoomForm.qml | 4 +--- 6 files changed, 12 insertions(+), 14 deletions(-) diff --git a/include/libqmatrixclient b/include/libqmatrixclient index 875514e..9fb5fd1 160000 --- a/include/libqmatrixclient +++ b/include/libqmatrixclient @@ -1 +1 @@ -Subproject commit 875514ee865b00be67542849f94d2c2561ba4137 +Subproject commit 9fb5fd1181fc74a040630df333a20ddd29cd7b28 diff --git a/qml/MatriqueSettings.qml b/qml/MatriqueSettings.qml index 5060878..be3aa18 100644 --- a/qml/MatriqueSettings.qml +++ b/qml/MatriqueSettings.qml @@ -3,7 +3,6 @@ import QtQuick 2.9 import Qt.labs.settings 1.0 Settings { - property bool lazyLoad: true property bool pressAndHold property bool rearrangeByActivity diff --git a/qml/Room.qml b/qml/Room.qml index b95bc90..bcf1ca2 100644 --- a/qml/Room.qml +++ b/qml/Room.qml @@ -15,7 +15,7 @@ Page { RoomListModel { id: roomListModel - onRoomAdded: if (!MSettings.lazyLoad) room.getPreviousContent(20) + onRoomAdded: room.getPreviousContent(20) onNewMessage: if (!window.active) matriqueController.showMessage(roomName, content, icon) } diff --git a/qml/Setting.qml b/qml/Setting.qml index a75fcc5..3c0f2b9 100644 --- a/qml/Setting.qml +++ b/qml/Setting.qml @@ -191,13 +191,6 @@ Page { padding: 64 Column { - Switch { - text: "Lazy load at initial sync" - checked: MSettings.lazyLoad - - onCheckedChanged: MSettings.lazyLoad = checked - } - Switch { text: "Use press and hold instead of right click" checked: MSettings.pressAndHold diff --git a/qml/component/MessageDelegate.qml b/qml/component/MessageDelegate.qml index 7cd4c1d..7b18870 100644 --- a/qml/component/MessageDelegate.qml +++ b/qml/component/MessageDelegate.qml @@ -110,7 +110,7 @@ RowLayout { spacing: 4 Repeater { - model: userMarker + model: userMarker.length > 5 ? userMarker.slice(0, 5) : userMarker ImageItem { width: parent.height @@ -121,6 +121,14 @@ RowLayout { } } + AutoLabel { + visible: userMarker.length > 5 + text: userMarker.length - 5 + "+" + coloredBackground: highlighted + Material.foreground: "grey" + font.pointSize: 8 + } + AutoLabel { id: timeLabel diff --git a/qml/form/RoomForm.qml b/qml/form/RoomForm.qml index f40bc10..e60f61e 100644 --- a/qml/form/RoomForm.qml +++ b/qml/form/RoomForm.qml @@ -120,7 +120,7 @@ Item { spacing: 8 boundsBehavior: Flickable.DragOverBounds - flickDeceleration: 2000 + flickDeceleration: 4096 cacheBuffer: 200 @@ -479,6 +479,4 @@ Item { } } } - - onCurrentRoomChanged: if (currentRoom && currentRoom.timelineSize === 0) currentRoom.getPreviousContent(20) }