Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F85595615
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Size
4 KB
Referenced Files
None
Subscribers
None
View Options
diff --git a/src/contents/ui/EventReadIndicator.qml b/src/contents/ui/EventReadIndicator.qml
index 35ac3f9..2eec811 100644
--- a/src/contents/ui/EventReadIndicator.qml
+++ b/src/contents/ui/EventReadIndicator.qml
@@ -1,105 +1,111 @@
/*
* This file is part of kazv.
* SPDX-FileCopyrightText: 2020-2023 tusooa <tusooa@kazv.moe>
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
import QtQuick 2.15
import QtQuick.Layouts 1.15
import QtQuick.Controls 2.15
import org.kde.kirigami 2.13 as Kirigami
import moe.kazv.mxc.kazv 0.0 as MK
import '.' as Kazv
import 'matrix-helpers.js' as Helpers
ItemDelegate {
id: readIndicator
property var shouldShow: true
property var model
property var maxItems: 4
property var avatarSize: Kirigami.Units.iconSizes.sizeForLabels || Kirigami.Units.iconSizes.small / 2
property var actualItems: Math.min(model.count, maxItems)
visible: shouldShow && readIndicator.model.count > 0
contentItem: RowLayout {
id: layout
objectName: 'readIndicatorLayout'
Repeater {
model: readIndicator.actualItems
Kazv.AvatarAdapter {
objectName: `readIndicatorAvatar${index}`
property var member: readIndicator.model.at(index)
property var nameProvider: Kazv.UserNameProvider {
user: member
}
Layout.preferredWidth: readIndicator.avatarSize
Layout.preferredHeight: readIndicator.avatarSize
mxcUri: member.avatarMxcUri
name: nameProvider.name
}
}
Label {
objectName: 'moreUsersIndicator'
visible: readIndicator.model.count > readIndicator.maxItems
text: l10n.get('event-read-indicator-more', { rest: readIndicator.model.count - readIndicator.maxItems })
}
}
Kirigami.OverlayDrawer {
id: readIndicatorDrawer
edge: Qt.BottomEdge
modal: true
Component.onCompleted: {
if (MK.KazvUtil.kfQtMajorVersion === 6) {
readIndicatorDrawer.parent = Overlay.overlay;
}
}
- contentItem: ColumnLayout {
- Label {
- text: l10n.get('event-read-indicator-list-title', { numUsers: readIndicator.model.count })
- }
+ contentItem: ScrollView {
+ id: scrollView
+ anchors.fill: parent
+ ScrollBar.vertical.policy: ScrollBar.AlwaysOn
+ ColumnLayout {
+ width: scrollView.availableWidth
+ Label {
+ text: l10n.get('event-read-indicator-list-title', { numUsers: readIndicator.model.count })
+ }
- Repeater {
- model: readIndicator.model
+ Repeater {
+ model: readIndicator.model
- ItemDelegate {
- Layout.fillWidth: true
- property var member: readIndicator.model.at(index)
- property var nameProvider: Kazv.UserNameProvider {
- user: member
- }
- onPressed: {
- activateUserPage(member, room);
- readIndicatorDrawer.close();
- }
- contentItem: RowLayout {
- id: itemLayout
- Kazv.AvatarAdapter {
- objectName: `readIndicatorAvatar${index}`
- Layout.preferredWidth: readIndicator.avatarSize
- Layout.preferredHeight: readIndicator.avatarSize
- mxcUri: member.avatarMxcUri
- name: nameProvider.name
+ ItemDelegate {
+ Layout.fillWidth: true
+ property var member: readIndicator.model.at(index)
+ property var nameProvider: Kazv.UserNameProvider {
+ user: member
}
-
- Label {
- text: nameProvider.name
- Layout.fillWidth: true
+ onPressed: {
+ activateUserPage(member, room);
+ readIndicatorDrawer.close();
}
+ contentItem: RowLayout {
+ id: itemLayout
+ Kazv.AvatarAdapter {
+ objectName: `readIndicatorAvatar${index}`
+ Layout.preferredWidth: readIndicator.avatarSize
+ Layout.preferredHeight: readIndicator.avatarSize
+ mxcUri: member.avatarMxcUri
+ name: nameProvider.name
+ }
+
+ Label {
+ text: nameProvider.name
+ Layout.fillWidth: true
+ }
- Label {
- Layout.alignment: Qt.AlignRight
- text: member.formattedTime
+ Label {
+ Layout.alignment: Qt.AlignRight
+ text: member.formattedTime
+ }
}
}
}
}
}
}
onPressed: readIndicatorDrawer.open()
}
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Sun, Jul 19, 4:39 PM (1 d, 20 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1695314
Default Alt Text
(4 KB)
Attached To
Mode
rK kazv
Attached
Detach File
Event Timeline
Log In to Comment