Remove external room window feature
At its best, this worked ok-ish, though it was always missing basic features. It's also a massive memory leak and significantly complicates the codebase. (Which is not yet cleaned up by this commit) Currently, it is entirely broken and noone noticed or cared enough to report or fix that. BUG: 455984
This commit is contained in:
@@ -27,18 +27,6 @@ Loader {
|
||||
Component {
|
||||
id: regularMenu
|
||||
QQC2.Menu {
|
||||
QQC2.MenuItem {
|
||||
id: newWindow
|
||||
text: i18n("Open in New Window")
|
||||
icon.name: "window-new"
|
||||
onTriggered: RoomManager.openWindow(room)
|
||||
visible: !Kirigami.Settings.isMobile
|
||||
}
|
||||
|
||||
QQC2.MenuSeparator {
|
||||
visible: newWindow.visible
|
||||
}
|
||||
|
||||
QQC2.MenuItem {
|
||||
text: room.isFavourite ? i18n("Remove from Favorites") : i18n("Add to Favorites")
|
||||
icon.name: room.isFavourite ? "bookmark-remove" : "bookmark-new"
|
||||
|
||||
@@ -1,64 +0,0 @@
|
||||
// SPDX-FileCopyrightText: 2020 Carl Schwan <carl@carlschwan.eu>
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
import QtQuick
|
||||
import QtQuick.Controls as QQC2
|
||||
import QtQuick.Layouts
|
||||
|
||||
import org.kde.kirigami as Kirigami
|
||||
|
||||
import org.kde.neochat
|
||||
|
||||
Kirigami.ApplicationWindow {
|
||||
id: root
|
||||
|
||||
required property NeoChatRoom currentRoom
|
||||
required property NeoChatConnection connection
|
||||
|
||||
minimumWidth: Kirigami.Units.gridUnit * 10
|
||||
minimumHeight: Kirigami.Units.gridUnit * 15
|
||||
|
||||
Shortcut {
|
||||
sequence: StandardKey.Cancel
|
||||
onActivated: root.close()
|
||||
}
|
||||
pageStack.initialPage: RoomPage {
|
||||
id: roomPage
|
||||
visible: true
|
||||
currentRoom: root.currentRoom
|
||||
disableCancelShortcut: true
|
||||
connection: root.connection
|
||||
|
||||
timelineModel: TimelineModel {
|
||||
room: currentRoom
|
||||
}
|
||||
messageFilterModel: MessageFilterModel {
|
||||
sourceModel: roomPage.messageEventModel
|
||||
}
|
||||
mediaMessageFilterModel: MediaMessageFilterModel {
|
||||
sourceModel: roomPage.messageFilterModel
|
||||
}
|
||||
}
|
||||
|
||||
onCurrentRoomChanged: if (!currentRoom) {
|
||||
root.close();
|
||||
}
|
||||
|
||||
property Item hoverLinkIndicator: QQC2.Control {
|
||||
parent: overlay.parent
|
||||
property string text
|
||||
opacity: linkText.text.length > 0 ? 1 : 0
|
||||
|
||||
z: 20
|
||||
x: 0
|
||||
y: parent.height - implicitHeight
|
||||
contentItem: QQC2.Label {
|
||||
id: linkText
|
||||
text: parent.text.startsWith("https://matrix.to/") ? "" : parent.text
|
||||
}
|
||||
Kirigami.Theme.colorSet: Kirigami.Theme.View
|
||||
background: Rectangle {
|
||||
color: Kirigami.Theme.backgroundColor
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -186,15 +186,6 @@ Kirigami.ApplicationWindow {
|
||||
roomItem.forceActiveFocus();
|
||||
}
|
||||
|
||||
function onOpenRoomInNewWindow(room) {
|
||||
const secondaryWindow = roomWindow.createObject(undefined, {
|
||||
currentRoom: room,
|
||||
connection: root.connection
|
||||
});
|
||||
secondaryWindow.width = root.width - pageStack.get(0).width;
|
||||
secondaryWindow.show();
|
||||
}
|
||||
|
||||
function onAskDirectChatConfirmation(user) {
|
||||
askDirectChatConfirmationComponent.createObject(QQC2.ApplicationWindow.overlay, {
|
||||
user: user
|
||||
@@ -415,11 +406,6 @@ Kirigami.ApplicationWindow {
|
||||
}
|
||||
}
|
||||
|
||||
Component {
|
||||
id: roomWindow
|
||||
RoomWindow {}
|
||||
}
|
||||
|
||||
Component {
|
||||
id: joinRoomDialog
|
||||
JoinRoomDialog {}
|
||||
|
||||
Reference in New Issue
Block a user