Port away from applicationWindow()
This commit is contained in:
@@ -2,6 +2,7 @@
|
|||||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
import QtQuick
|
import QtQuick
|
||||||
|
import QtQuick.Controls as QQC2
|
||||||
import QtQuick.Layouts
|
import QtQuick.Layouts
|
||||||
|
|
||||||
import org.kde.kirigami as Kirigami
|
import org.kde.kirigami as Kirigami
|
||||||
@@ -16,8 +17,6 @@ Kirigami.Dialog {
|
|||||||
|
|
||||||
required property NeoChatConnection connection
|
required property NeoChatConnection connection
|
||||||
|
|
||||||
parent: applicationWindow().overlay
|
|
||||||
|
|
||||||
leftPadding: 0
|
leftPadding: 0
|
||||||
rightPadding: 0
|
rightPadding: 0
|
||||||
topPadding: 0
|
topPadding: 0
|
||||||
@@ -25,7 +24,7 @@ Kirigami.Dialog {
|
|||||||
|
|
||||||
standardButtons: Kirigami.Dialog.NoButton
|
standardButtons: Kirigami.Dialog.NoButton
|
||||||
|
|
||||||
width: Math.min(applicationWindow().width, Kirigami.Units.gridUnit * 24)
|
width: Math.min(QQC2.ApplicationWindow.window.width, Kirigami.Units.gridUnit * 24)
|
||||||
title: i18nc("@title: dialog to switch between logged in accounts", "Switch Account")
|
title: i18nc("@title: dialog to switch between logged in accounts", "Switch Account")
|
||||||
|
|
||||||
onVisibleChanged: if (visible) {
|
onVisibleChanged: if (visible) {
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ ColumnLayout {
|
|||||||
onClicked: {
|
onClicked: {
|
||||||
let imageEditor = (Kirigami.PageStack.pageStack as Kirigami.PageRow).pushDialogLayer(imageEditorPage);
|
let imageEditor = (Kirigami.PageStack.pageStack as Kirigami.PageRow).pushDialogLayer(imageEditorPage);
|
||||||
imageEditor.newPathChanged.connect(function (newPath) {
|
imageEditor.newPathChanged.connect(function (newPath) {
|
||||||
applicationWindow().pageStack.layers.pop();
|
imageEditor.closeDialog();
|
||||||
root.attachmentPath = newPath;
|
root.attachmentPath = newPath;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ Kirigami.Dialog {
|
|||||||
|
|
||||||
standardButtons: Kirigami.Dialog.NoButton
|
standardButtons: Kirigami.Dialog.NoButton
|
||||||
|
|
||||||
width: Math.min(applicationWindow().width, Kirigami.Units.gridUnit * 24)
|
width: Math.min(QQC2.ApplicationWindow.window.width, Kirigami.Units.gridUnit * 24)
|
||||||
title: i18nc("@title:dialog", "Join Room")
|
title: i18nc("@title:dialog", "Join Room")
|
||||||
|
|
||||||
contentItem: ColumnLayout {
|
contentItem: ColumnLayout {
|
||||||
|
|||||||
@@ -336,7 +336,7 @@ Kirigami.ApplicationWindow {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
function handleShare(): void {
|
function handleShare(): void {
|
||||||
const dialog = applicationWindow().pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat', 'ChooseRoomDialog'), {
|
const dialog = root.pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat', 'ChooseRoomDialog'), {
|
||||||
connection: root.connection
|
connection: root.connection
|
||||||
}, {
|
}, {
|
||||||
title: i18nc("@title", "Share"),
|
title: i18nc("@title", "Share"),
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ Kirigami.Dialog {
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
width: Math.min(applicationWindow().width, Kirigami.Units.gridUnit * 24)
|
width: Math.min(QQC2.ApplicationWindow.window.width, Kirigami.Units.gridUnit * 24)
|
||||||
title: i18nc("@title: create new poll in the room", "Create Poll")
|
title: i18nc("@title: create new poll in the room", "Create Poll")
|
||||||
|
|
||||||
contentItem: ColumnLayout {
|
contentItem: ColumnLayout {
|
||||||
|
|||||||
@@ -15,8 +15,6 @@ Kirigami.Dialog {
|
|||||||
|
|
||||||
property var connection
|
property var connection
|
||||||
|
|
||||||
parent: applicationWindow().overlay
|
|
||||||
|
|
||||||
leftPadding: 0
|
leftPadding: 0
|
||||||
rightPadding: 0
|
rightPadding: 0
|
||||||
topPadding: 0
|
topPadding: 0
|
||||||
@@ -24,7 +22,7 @@ Kirigami.Dialog {
|
|||||||
|
|
||||||
title: i18nc("@title Join <name of a space>", "Join %1", SpaceHierarchyCache.recommendedSpaceDisplayName)
|
title: i18nc("@title Join <name of a space>", "Join %1", SpaceHierarchyCache.recommendedSpaceDisplayName)
|
||||||
|
|
||||||
width: Math.min(applicationWindow().width, Kirigami.Units.gridUnit * 24)
|
width: Math.min(QQC2.ApplicationWindow.window.width, Kirigami.Units.gridUnit * 24)
|
||||||
|
|
||||||
contentItem: ColumnLayout {
|
contentItem: ColumnLayout {
|
||||||
FormCard.AbstractFormDelegate {
|
FormCard.AbstractFormDelegate {
|
||||||
|
|||||||
@@ -63,9 +63,9 @@ Kirigami.Page {
|
|||||||
|
|
||||||
actions: [
|
actions: [
|
||||||
Kirigami.Action {
|
Kirigami.Action {
|
||||||
visible: Kirigami.Settings.isMobile || !applicationWindow().pageStack.wideMode
|
visible: Kirigami.Settings.isMobile || !root.Kirigami.PageStack.pageStack.wideMode
|
||||||
icon.name: "view-right-new"
|
icon.name: "view-right-new"
|
||||||
onTriggered: applicationWindow().openRoomDrawer()
|
onTriggered: (root.QQC2.ApplicationWindow.window as Main).openRoomDrawer()
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
@@ -202,7 +202,7 @@ Kirigami.Page {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function onShowEventSource(eventId) {
|
function onShowEventSource(eventId) {
|
||||||
applicationWindow().pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat', 'MessageSourceSheet'), {
|
(root.Kirigami.PageStack.pageStack as Kirigami.PageRow).pushDialogLayer(Qt.createComponent('org.kde.neochat', 'MessageSourceSheet'), {
|
||||||
sourceText: root.currentRoom.getEventJsonSource(eventId)
|
sourceText: root.currentRoom.getEventJsonSource(eventId)
|
||||||
}, {
|
}, {
|
||||||
title: i18nc("@title:dialog", "Message Source"),
|
title: i18nc("@title:dialog", "Message Source"),
|
||||||
|
|||||||
@@ -23,8 +23,6 @@ Kirigami.Action {
|
|||||||
text: i18n("Share")
|
text: i18n("Share")
|
||||||
tooltip: i18n("Share the selected media")
|
tooltip: i18n("Share the selected media")
|
||||||
|
|
||||||
visible: false
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This property holds the input data for purpose.
|
* This property holds the input data for purpose.
|
||||||
*
|
*
|
||||||
@@ -60,7 +58,7 @@ Kirigami.Action {
|
|||||||
if (id != root.eventId) {
|
if (id != root.eventId) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
applicationWindow().pageStack.pushDialogLayer(Qt.createComponent("org.kde.neochat", "ShareDialog"), {
|
pageStack.pushDialogLayer(Qt.createComponent("org.kde.neochat", "ShareDialog"), {
|
||||||
title: root.text,
|
title: root.text,
|
||||||
index: index,
|
index: index,
|
||||||
model: root._instantiator.model
|
model: root._instantiator.model
|
||||||
|
|||||||
@@ -261,7 +261,7 @@ Kirigami.Dialog {
|
|||||||
icon.name: "delete"
|
icon.name: "delete"
|
||||||
icon.color: Kirigami.Theme.negativeTextColor
|
icon.color: Kirigami.Theme.negativeTextColor
|
||||||
onTriggered: {
|
onTriggered: {
|
||||||
let dialog = applicationWindow().pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat', 'ReasonDialog'), {
|
let dialog = pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat', 'ReasonDialog'), {
|
||||||
title: i18nc("@title:dialog", "Remove Messages"),
|
title: i18nc("@title:dialog", "Remove Messages"),
|
||||||
placeholder: i18nc("@info:placeholder", "Reason for removing this user's recent messages"),
|
placeholder: i18nc("@info:placeholder", "Reason for removing this user's recent messages"),
|
||||||
actionText: i18nc("@action:button 'Remove' as in 'Remove these messages'", "Remove"),
|
actionText: i18nc("@action:button 'Remove' as in 'Remove these messages'", "Remove"),
|
||||||
|
|||||||
@@ -87,7 +87,7 @@ QQC2.Control {
|
|||||||
displayHint: Kirigami.DisplayHint.IconOnly
|
displayHint: Kirigami.DisplayHint.IconOnly
|
||||||
|
|
||||||
onTriggered: {
|
onTriggered: {
|
||||||
let dialog = (Clipboard.hasImage ? attachDialog : openFileDialog).createObject(applicationWindow().overlay);
|
let dialog = (Clipboard.hasImage ? attachDialog : openFileDialog).createObject(root.QQC2.Overlay.overlay);
|
||||||
dialog.chosen.connect(path => _private.chatBarCache.attachmentPath = path);
|
dialog.chosen.connect(path => _private.chatBarCache.attachmentPath = path);
|
||||||
dialog.open();
|
dialog.open();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ QQC2.Popup {
|
|||||||
padding: 2
|
padding: 2
|
||||||
|
|
||||||
implicitHeight: Kirigami.Units.gridUnit * 20 + 2 * padding
|
implicitHeight: Kirigami.Units.gridUnit * 20 + 2 * padding
|
||||||
width: Math.min(contentItem.categoryIconSize * 11 + 2 * padding, applicationWindow().width)
|
width: Math.min(contentItem.categoryIconSize * 11 + 2 * padding, QQC2.ApplicationWindow.window.width)
|
||||||
contentItem: EmojiPicker {
|
contentItem: EmojiPicker {
|
||||||
id: emojiPicker
|
id: emojiPicker
|
||||||
height: 400
|
height: 400
|
||||||
|
|||||||
@@ -121,9 +121,9 @@ ColumnLayout {
|
|||||||
wrapMode: Text.Wrap
|
wrapMode: Text.Wrap
|
||||||
onLinkActivated: link => UrlHelper.openUrl(link)
|
onLinkActivated: link => UrlHelper.openUrl(link)
|
||||||
onHoveredLinkChanged: if (hoveredLink.length > 0 && hoveredLink !== "1") {
|
onHoveredLinkChanged: if (hoveredLink.length > 0 && hoveredLink !== "1") {
|
||||||
applicationWindow().hoverLinkIndicator.text = hoveredLink;
|
(QQC2.ApplicationWindow.window as Main).hoverLinkIndicator.text = hoveredLink;
|
||||||
} else {
|
} else {
|
||||||
applicationWindow().hoverLinkIndicator.text = "";
|
(QQC2.ApplicationWindow.window as Main).hoverLinkIndicator.text = "";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -90,7 +90,7 @@ Item {
|
|||||||
fillMode: Image.PreserveAspectFit
|
fillMode: Image.PreserveAspectFit
|
||||||
autoTransform: true
|
autoTransform: true
|
||||||
|
|
||||||
paused: !applicationWindow().active
|
paused: !QQC2.ApplicationWindow.window.active
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
// SPDX-License-Identifier: GPL-3.0-only
|
// SPDX-License-Identifier: GPL-3.0-only
|
||||||
|
|
||||||
import QtQuick
|
import QtQuick
|
||||||
|
import QtQuick.Controls as QQC2
|
||||||
import QtQuick.Layouts
|
import QtQuick.Layouts
|
||||||
|
|
||||||
import org.kde.kirigami as Kirigami
|
import org.kde.kirigami as Kirigami
|
||||||
@@ -136,9 +137,9 @@ a{
|
|||||||
RoomManager.resolveResource(link, "join");
|
RoomManager.resolveResource(link, "join");
|
||||||
}
|
}
|
||||||
onHoveredLinkChanged: if (hoveredLink.length > 0 && hoveredLink !== "1") {
|
onHoveredLinkChanged: if (hoveredLink.length > 0 && hoveredLink !== "1") {
|
||||||
applicationWindow().hoverLinkIndicator.text = hoveredLink;
|
(QQC2.ApplicationWindow.window as Main).hoverLinkIndicator.text = hoveredLink;
|
||||||
} else {
|
} else {
|
||||||
applicationWindow().hoverLinkIndicator.text = "";
|
(QQC2.ApplicationWindow.window as Main).hoverLinkIndicator.text = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
HoverHandler {
|
HoverHandler {
|
||||||
|
|||||||
@@ -101,16 +101,16 @@ Kirigami.Page {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Connections {
|
Connections {
|
||||||
target: applicationWindow().pageStack
|
target: root.Kirigami.PageStack.pageStack
|
||||||
onWideModeChanged: {
|
onWideModeChanged: {
|
||||||
if (applicationWindow().pageStack.wideMode) {
|
if ((root.Kirigami.PageStack.pageStack as Kirigami.PageRow).wideMode) {
|
||||||
applicationWindow().pageStack.pop();
|
root.Kirigami.PageStack.pop();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
onBackRequested: event => {
|
onBackRequested: event => {
|
||||||
event.accepted = true;
|
event.accepted = true;
|
||||||
applicationWindow().pageStack.pop();
|
Kirigami.PageStack.pop();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -177,7 +177,7 @@ QQC2.ScrollView {
|
|||||||
icon.name: "list-add-user"
|
icon.name: "list-add-user"
|
||||||
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
applicationWindow().pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat', 'InviteUserPage'), {
|
pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat', 'InviteUserPage'), {
|
||||||
room: root.room
|
room: root.room
|
||||||
}, {
|
}, {
|
||||||
title: i18nc("@title", "Invite a User")
|
title: i18nc("@title", "Invite a User")
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ Kirigami.Dialog {
|
|||||||
|
|
||||||
title: i18nc("@title", "Select new official parent")
|
title: i18nc("@title", "Select new official parent")
|
||||||
|
|
||||||
width: Math.min(applicationWindow().width, Kirigami.Units.gridUnit * 24)
|
width: Math.min(QQC2.ApplicationWindow.window.width, Kirigami.Units.gridUnit * 24)
|
||||||
leftPadding: 0
|
leftPadding: 0
|
||||||
rightPadding: 0
|
rightPadding: 0
|
||||||
topPadding: 0
|
topPadding: 0
|
||||||
|
|||||||
@@ -26,14 +26,12 @@ Kirigami.Dialog {
|
|||||||
*/
|
*/
|
||||||
property list<string> restrictedIds: room.restrictedIds
|
property list<string> restrictedIds: room.restrictedIds
|
||||||
|
|
||||||
parent: applicationWindow().overlay
|
|
||||||
|
|
||||||
leftPadding: 0
|
leftPadding: 0
|
||||||
rightPadding: 0
|
rightPadding: 0
|
||||||
topPadding: 0
|
topPadding: 0
|
||||||
bottomPadding: 0
|
bottomPadding: 0
|
||||||
|
|
||||||
width: Math.min(applicationWindow().width, Kirigami.Units.gridUnit * 24)
|
width: Math.min(QQC2.ApplicationWindow.window.width, Kirigami.Units.gridUnit * 24)
|
||||||
title: i18nc("@title", "Select Spaces")
|
title: i18nc("@title", "Select Spaces")
|
||||||
|
|
||||||
standardButtons: Kirigami.Dialog.Ok | Kirigami.Dialog.Cancel
|
standardButtons: Kirigami.Dialog.Ok | Kirigami.Dialog.Cancel
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
import QtQuick
|
import QtQuick
|
||||||
import QtQuick.Layouts
|
import QtQuick.Layouts
|
||||||
|
import QtQuick.Controls as QQC2
|
||||||
|
|
||||||
import org.kde.kirigami as Kirigami
|
import org.kde.kirigami as Kirigami
|
||||||
import org.kde.kirigamiaddons.formcard as FormCard
|
import org.kde.kirigamiaddons.formcard as FormCard
|
||||||
@@ -26,7 +27,7 @@ Kirigami.Dialog {
|
|||||||
|
|
||||||
title: i18nc("@title", "Remove Child")
|
title: i18nc("@title", "Remove Child")
|
||||||
|
|
||||||
width: Math.min(applicationWindow().width, Kirigami.Units.gridUnit * 24)
|
width: Math.min(QQC2.ApplicationWindow.window.width, Kirigami.Units.gridUnit * 24)
|
||||||
|
|
||||||
standardButtons: Kirigami.Dialog.Ok | Kirigami.Dialog.Cancel
|
standardButtons: Kirigami.Dialog.Ok | Kirigami.Dialog.Cancel
|
||||||
|
|
||||||
|
|||||||
@@ -77,7 +77,7 @@ ColumnLayout {
|
|||||||
visible: root.room.canSendState("invite")
|
visible: root.room.canSendState("invite")
|
||||||
text: i18nc("@button", "Invite user to space")
|
text: i18nc("@button", "Invite user to space")
|
||||||
icon.name: "list-add-user"
|
icon.name: "list-add-user"
|
||||||
onClicked: applicationWindow().pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat.libneochat', 'InviteUserPage'), {
|
onClicked: (Kirigami.PageStack.pageStack as Kirigami.PageRow).pushDialogLayer(Qt.createComponent('org.kde.neochat.libneochat', 'InviteUserPage'), {
|
||||||
room: root.room
|
room: root.room
|
||||||
}, {
|
}, {
|
||||||
title: i18nc("@title", "Invite a User")
|
title: i18nc("@title", "Invite a User")
|
||||||
|
|||||||
@@ -89,7 +89,7 @@ KirigamiComponents.ConvergentContextMenu {
|
|||||||
icon.name: "edit-delete-remove"
|
icon.name: "edit-delete-remove"
|
||||||
icon.color: "red"
|
icon.color: "red"
|
||||||
onTriggered: {
|
onTriggered: {
|
||||||
let dialog = applicationWindow().pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat', 'ReasonDialog'), {
|
let dialog = (root.Kirigami.PageStack.pageStack as Kirigami.PageRow).pushDialogLayer(Qt.createComponent('org.kde.neochat', 'ReasonDialog'), {
|
||||||
title: i18nc("@title:dialog", "Remove Message"),
|
title: i18nc("@title:dialog", "Remove Message"),
|
||||||
placeholder: i18nc("@info:placeholder", "Reason for removing this message"),
|
placeholder: i18nc("@info:placeholder", "Reason for removing this message"),
|
||||||
actionText: i18nc("@action:button 'Remove' as in 'Remove this message'", "Remove"),
|
actionText: i18nc("@action:button 'Remove' as in 'Remove this message'", "Remove"),
|
||||||
@@ -134,7 +134,7 @@ KirigamiComponents.ConvergentContextMenu {
|
|||||||
icon.name: "dialog-warning-symbolic"
|
icon.name: "dialog-warning-symbolic"
|
||||||
visible: !author.isLocalMember
|
visible: !author.isLocalMember
|
||||||
onTriggered: {
|
onTriggered: {
|
||||||
let dialog = applicationWindow().pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat', 'ReasonDialog'), {
|
let dialog = (root.Kirigami.PageStack.pageStack as Kirigami.PageRow).pushDialogLayer(Qt.createComponent('org.kde.neochat', 'ReasonDialog'), {
|
||||||
title: i18nc("@title:dialog", "Report Message"),
|
title: i18nc("@title:dialog", "Report Message"),
|
||||||
placeholder: i18nc("@info:placeholder", "Reason for reporting this message"),
|
placeholder: i18nc("@info:placeholder", "Reason for reporting this message"),
|
||||||
icon: "dialog-warning-symbolic",
|
icon: "dialog-warning-symbolic",
|
||||||
@@ -263,8 +263,6 @@ KirigamiComponents.ConvergentContextMenu {
|
|||||||
bottomPadding: 0
|
bottomPadding: 0
|
||||||
topPadding: 0
|
topPadding: 0
|
||||||
|
|
||||||
parent: applicationWindow().overlay
|
|
||||||
|
|
||||||
QQC2.StackView {
|
QQC2.StackView {
|
||||||
id: stackView
|
id: stackView
|
||||||
width: parent.width
|
width: parent.width
|
||||||
|
|||||||
@@ -99,26 +99,7 @@ DelegateContextMenu {
|
|||||||
separator: true
|
separator: true
|
||||||
}
|
}
|
||||||
|
|
||||||
Kirigami.Action {
|
DelegateContextMenu.RemoveMessageAction {}
|
||||||
visible: author.id === currentRoom.localMember.id || currentRoom.canSendState("redact")
|
|
||||||
text: i18n("Remove…")
|
|
||||||
icon.name: "edit-delete-remove"
|
|
||||||
icon.color: "red"
|
|
||||||
onTriggered: {
|
|
||||||
let dialog = applicationWindow().pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat', 'ReasonDialog'), {
|
|
||||||
title: i18nc("@title:dialog", "Remove Message"),
|
|
||||||
placeholder: i18nc("@info:placeholder", "Reason for removing this message"),
|
|
||||||
actionText: i18nc("@action:button 'Remove' as in 'Remove this message'", "Remove"),
|
|
||||||
icon: "delete"
|
|
||||||
}, {
|
|
||||||
title: i18nc("@title:dialog", "Remove Message"),
|
|
||||||
width: Kirigami.Units.gridUnit * 25
|
|
||||||
});
|
|
||||||
dialog.accepted.connect(reason => {
|
|
||||||
currentRoom.redactEvent(root.eventId, reason);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
DelegateContextMenu.PinMessageAction {}
|
DelegateContextMenu.PinMessageAction {}
|
||||||
|
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ DelegateContextMenu {
|
|||||||
text: i18nc("@action:inmenu As in 'Forward this message'", "Forward…")
|
text: i18nc("@action:inmenu As in 'Forward this message'", "Forward…")
|
||||||
icon.name: "mail-forward-symbolic"
|
icon.name: "mail-forward-symbolic"
|
||||||
onTriggered: {
|
onTriggered: {
|
||||||
let page = applicationWindow().pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat', 'ChooseRoomDialog'), {
|
let page = (root.Kirigami.PageStack.pageStack as Kirigami.PageRow).pushDialogLayer(Qt.createComponent('org.kde.neochat', 'ChooseRoomDialog'), {
|
||||||
connection: root.connection
|
connection: root.connection
|
||||||
}, {
|
}, {
|
||||||
title: i18nc("@title", "Forward Message"),
|
title: i18nc("@title", "Forward Message"),
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ import QtQuick.Layouts
|
|||||||
import org.kde.kirigami as Kirigami
|
import org.kde.kirigami as Kirigami
|
||||||
import org.kde.kirigamiaddons.components as KirigamiComponents
|
import org.kde.kirigamiaddons.components as KirigamiComponents
|
||||||
|
|
||||||
|
import org.kde.neochat
|
||||||
import org.kde.neochat.libneochat as LibNeoChat
|
import org.kde.neochat.libneochat as LibNeoChat
|
||||||
|
|
||||||
QQC2.ScrollView {
|
QQC2.ScrollView {
|
||||||
@@ -137,7 +138,7 @@ QQC2.ScrollView {
|
|||||||
if (!messageListView.atYEnd || !_private.room.partiallyReadStats.empty()) {
|
if (!messageListView.atYEnd || !_private.room.partiallyReadStats.empty()) {
|
||||||
messageListView.positionViewAtBeginning();
|
messageListView.positionViewAtBeginning();
|
||||||
} else {
|
} else {
|
||||||
applicationWindow().pageStack.get(0).forceActiveFocus();
|
(root.Kirigami.PageStack.pageStack as Kirigami.PageRow).get(0).forceActiveFocus();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -149,7 +150,7 @@ QQC2.ScrollView {
|
|||||||
target: messageListView.model.sourceModel.timelineMessageModel
|
target: messageListView.model.sourceModel.timelineMessageModel
|
||||||
|
|
||||||
function onModelAboutToBeReset() {
|
function onModelAboutToBeReset() {
|
||||||
applicationWindow().hoverLinkIndicator.text = "";
|
(root.QQC2.ApplicationWindow.window as Main).hoverLinkIndicator.text = "";
|
||||||
_private.hasScrolledUpBefore = false;
|
_private.hasScrolledUpBefore = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user