Always use resolveResource instead of enterRoom or EnterSpaceHome
This commit is contained in:
@@ -230,7 +230,7 @@ QList<ActionsModel::Action> actions{
|
||||
}
|
||||
auto targetRoom = text.startsWith(QLatin1Char('!')) ? room->connection()->room(text) : room->connection()->roomByAlias(text);
|
||||
if (targetRoom) {
|
||||
RoomManager::instance().enterRoom(dynamic_cast<NeoChatRoom *>(targetRoom));
|
||||
RoomManager::instance().resolveResource(targetRoom->id());
|
||||
return QString();
|
||||
}
|
||||
Q_EMIT room->showMessage(NeoChatRoom::Info, i18nc("Joining room <roomname>.", "Joining room %1.", text));
|
||||
@@ -256,7 +256,7 @@ QList<ActionsModel::Action> actions{
|
||||
}
|
||||
auto targetRoom = text.startsWith(QLatin1Char('!')) ? room->connection()->room(text) : room->connection()->roomByAlias(text);
|
||||
if (targetRoom) {
|
||||
RoomManager::instance().enterRoom(dynamic_cast<NeoChatRoom *>(targetRoom));
|
||||
RoomManager::instance().resolveResource(targetRoom->id());
|
||||
return QString();
|
||||
}
|
||||
Q_EMIT room->showMessage(NeoChatRoom::Info, i18nc("Knocking room <roomname>.", "Knocking room %1.", text));
|
||||
|
||||
@@ -240,7 +240,7 @@ void NeoChatConnection::createRoom(const QString &name, const QString &topic, co
|
||||
Q_EMIT Controller::instance().errorOccured(i18n("Room creation failed: %1", job->errorString()), {});
|
||||
});
|
||||
connectSingleShot(this, &Connection::newRoom, this, [](Room *room) {
|
||||
RoomManager::instance().enterRoom(dynamic_cast<NeoChatRoom *>(room));
|
||||
RoomManager::instance().resolveResource(room->id());
|
||||
});
|
||||
}
|
||||
|
||||
@@ -272,7 +272,7 @@ void NeoChatConnection::createSpace(const QString &name, const QString &topic, c
|
||||
Q_EMIT Controller::instance().errorOccured(i18n("Space creation failed: %1", job->errorString()), {});
|
||||
});
|
||||
connectSingleShot(this, &Connection::newRoom, this, [](Room *room) {
|
||||
RoomManager::instance().enterRoom(dynamic_cast<NeoChatRoom *>(room));
|
||||
RoomManager::instance().resolveResource(room->id());
|
||||
});
|
||||
}
|
||||
|
||||
@@ -295,9 +295,9 @@ void NeoChatConnection::openOrCreateDirectChat(User *user)
|
||||
const auto existing = directChats();
|
||||
|
||||
if (existing.contains(user)) {
|
||||
const auto room = static_cast<NeoChatRoom *>(this->room(existing.value(user)));
|
||||
const auto room = this->room(existing.value(user));
|
||||
if (room) {
|
||||
RoomManager::instance().enterRoom(room);
|
||||
RoomManager::instance().resolveResource(room->id());
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -216,7 +216,7 @@ void NotificationsManager::postNotification(NeoChatRoom *room,
|
||||
auto connection = dynamic_cast<NeoChatConnection *>(Controller::instance().accounts().get(room->localUser()->id()));
|
||||
Controller::instance().setActiveConnection(connection);
|
||||
RoomManager::instance().setConnection(connection);
|
||||
RoomManager::instance().enterRoom(room);
|
||||
RoomManager::instance().resolveResource(room->id());
|
||||
});
|
||||
|
||||
if (canReply) {
|
||||
@@ -251,7 +251,7 @@ void NotificationsManager::postInviteNotification(NeoChatRoom *rawRoom, const QS
|
||||
}
|
||||
WindowController::instance().showAndRaiseWindow(notification->xdgActivationToken());
|
||||
notification->close();
|
||||
RoomManager::instance().enterRoom(room);
|
||||
RoomManager::instance().resolveResource(room->id());
|
||||
});
|
||||
|
||||
const auto acceptAction = notification->addAction(i18nc("@action:button The thing being accepted is an invitation to chat", "Accept"));
|
||||
|
||||
@@ -42,10 +42,10 @@ QQC2.ItemDelegate {
|
||||
}
|
||||
}
|
||||
|
||||
onClicked: RoomManager.enterRoom(root.currentRoom)
|
||||
onClicked: RoomManager.resolveResource(currentRoom.id)
|
||||
|
||||
Keys.onEnterPressed: RoomManager.enterRoom(root.currentRoom)
|
||||
Keys.onReturnPressed: RoomManager.enterRoom(root.currentRoom)
|
||||
Keys.onEnterPressed: RoomManager.resolveResource(currentRoom.id)
|
||||
Keys.onReturnPressed: RoomManager.resolveResource(currentRoom.id)
|
||||
|
||||
QQC2.ToolTip.visible: text.length > 0 && hovered
|
||||
QQC2.ToolTip.text: root.displayName ?? ""
|
||||
|
||||
@@ -23,11 +23,7 @@ RowLayout {
|
||||
onTriggered: {
|
||||
let dialog = pageStack.pushDialogLayer("qrc:/org/kde/neochat/qml/ExploreRoomsPage.qml", {connection: root.connection}, {title: i18nc("@title", "Explore Rooms")})
|
||||
dialog.roomSelected.connect((roomId, displayName, avatarUrl, alias, topic, memberCount, isJoined) => {
|
||||
if (isJoined) {
|
||||
RoomManager.enterRoom(root.connection.room(roomId))
|
||||
} else {
|
||||
RoomManager.resolveResource(roomId.length > 0 ? roomId : alias, "join")
|
||||
}
|
||||
RoomManager.resolveResource(roomId.length > 0 ? roomId : alias, isJoined ? "" : "join")
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -54,11 +54,7 @@ ColumnLayout {
|
||||
onTriggered: {
|
||||
let dialog = pageStack.pushDialogLayer("qrc:/org/kde/neochat/qml/ExploreRoomsPage.qml", {connection: root.connection}, {title: i18nc("@title", "Explore Rooms")})
|
||||
dialog.roomSelected.connect((roomId, displayName, avatarUrl, alias, topic, memberCount, isJoined) => {
|
||||
if (isJoined) {
|
||||
RoomManager.enterRoom(root.connection.room(roomId));
|
||||
} else {
|
||||
RoomManager.resolveResource(roomId.length > 0 ? roomId : alias, "join");
|
||||
}
|
||||
RoomManager.resolveResource(roomId.length > 0 ? roomId : alias, isJoined ? "" : "join")
|
||||
})
|
||||
exploreTabBar.currentIndex = -1;
|
||||
}
|
||||
|
||||
@@ -373,7 +373,7 @@ FormCard.FormCardPage {
|
||||
actions: Kirigami.Action {
|
||||
text: i18n("See older messages…")
|
||||
onTriggered: {
|
||||
RoomManager.enterRoom(root.connection.room(room.predecessorId));
|
||||
RoomManager.resolveResource(room.predecessorId);
|
||||
root.close();
|
||||
}
|
||||
}
|
||||
@@ -387,7 +387,7 @@ FormCard.FormCardPage {
|
||||
actions: Kirigami.Action {
|
||||
text: i18n("See new room…")
|
||||
onTriggered: {
|
||||
RoomManager.enterRoom(root.connection.room(room.successorId));
|
||||
RoomManager.resolveResource(room.successorId);
|
||||
root.close();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -63,11 +63,7 @@ Labs.MenuBar {
|
||||
onTriggered: {
|
||||
let dialog = pageStack.pushDialogLayer("qrc:/org/kde/neochat/qml/ExploreRoomsPage.qml", {connection: root.connection}, {title: i18nc("@title", "Explore Rooms")})
|
||||
dialog.roomSelected.connect((roomId, displayName, avatarUrl, alias, topic, memberCount, isJoined) => {
|
||||
if (isJoined) {
|
||||
RoomManager.enterRoom(root.connection.room(roomId))
|
||||
} else {
|
||||
RoomManager.resolveResource(roomId, "join")
|
||||
}
|
||||
RoomManager.resolveResource(roomId.length > 0 ? roomId : alias, isJoined ? "" : "join")
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -59,11 +59,11 @@ QQC2.Dialog {
|
||||
}
|
||||
}
|
||||
Keys.onEnterPressed: {
|
||||
RoomManager.enterRoom(roomList.currentItem.currentRoom);
|
||||
RoomManager.resolveResource(roomList.currentItem.currentRoom.id);
|
||||
root.close();
|
||||
}
|
||||
Keys.onReturnPressed: {
|
||||
RoomManager.enterRoom(roomList.currentItem.currentRoom);
|
||||
RoomManager.resolveResource(roomList.currentItem.currentRoom.id);
|
||||
root.close();
|
||||
}
|
||||
focusSequence: ""
|
||||
@@ -92,23 +92,8 @@ QQC2.Dialog {
|
||||
|
||||
delegate: RoomDelegate {
|
||||
filterText: searchField.text
|
||||
|
||||
connection: root.connection
|
||||
|
||||
onSelected: {
|
||||
RoomManager.enterRoom(currentRoom);
|
||||
root.close()
|
||||
}
|
||||
|
||||
Keys.onEnterPressed: {
|
||||
RoomManager.enterRoom(currentRoom);
|
||||
root.close();
|
||||
}
|
||||
|
||||
Keys.onReturnPressed: {
|
||||
RoomManager.enterRoom(currentRoom);
|
||||
root.close();
|
||||
}
|
||||
onSelected: root.close()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,19 +34,21 @@ Delegates.RoundedItemDelegate {
|
||||
signal selected()
|
||||
|
||||
Accessible.name: root.displayName
|
||||
Accessible.onPressAction: selected()
|
||||
Keys.onSpacePressed: selected()
|
||||
Keys.onEnterPressed: selected()
|
||||
Accessible.onPressAction: select()
|
||||
|
||||
onPressAndHold: createRoomListContextMenu()
|
||||
|
||||
Keys.onSpacePressed: select()
|
||||
Keys.onEnterPressed: select()
|
||||
Keys.onReturnPressed: select()
|
||||
|
||||
TapHandler {
|
||||
acceptedButtons: Qt.RightButton | Qt.LeftButton
|
||||
onTapped: (eventPoint, button) => {
|
||||
if (button === Qt.RightButton) {
|
||||
root.createRoomListContextMenu();
|
||||
} else {
|
||||
root.selected();
|
||||
select()
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -145,6 +147,11 @@ Delegates.RoundedItemDelegate {
|
||||
}
|
||||
}
|
||||
|
||||
function select() {
|
||||
RoomManager.resolveResource(currentRoom.id);
|
||||
root.selected()
|
||||
}
|
||||
|
||||
function createRoomListContextMenu() {
|
||||
const component = Qt.createComponent("qrc:/org/kde/neochat/qml/ContextMenu.qml")
|
||||
if (component.status === Component.Error) {
|
||||
|
||||
@@ -179,11 +179,7 @@ Kirigami.Page {
|
||||
title: i18nc("@title", "Explore Rooms")
|
||||
})
|
||||
dialog.roomSelected.connect((roomId, displayName, avatarUrl, alias, topic, memberCount, isJoined) => {
|
||||
if (isJoined) {
|
||||
RoomManager.enterRoom(root.connection.room(roomId))
|
||||
} else {
|
||||
RoomManager.resolveResource(roomId, "join")
|
||||
}
|
||||
RoomManager.resolveResource(roomId.length > 0 ? roomId : alias, isJoined ? "" : "join")
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -294,11 +290,6 @@ Kirigami.Page {
|
||||
height: visible ? implicitHeight : 0
|
||||
|
||||
visible: categoryVisible || filterText.length > 0
|
||||
|
||||
onSelected: RoomManager.enterRoom(currentRoom)
|
||||
|
||||
Keys.onEnterPressed: RoomManager.enterRoom(currentRoom)
|
||||
Keys.onReturnPressed: RoomManager.enterRoom(currentRoom)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -206,7 +206,7 @@ Kirigami.Page {
|
||||
target: root.connection
|
||||
function onJoinedRoom(room, invited) {
|
||||
if(root.currentRoom.id === invited.id) {
|
||||
RoomManager.enterRoom(room);
|
||||
RoomManager.resolveResource(room.id);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,7 +34,6 @@ Item {
|
||||
required property NeoChatRoom parentRoom
|
||||
|
||||
signal createRoom()
|
||||
signal enterRoom()
|
||||
|
||||
Delegates.RoundedItemDelegate {
|
||||
anchors.centerIn: root
|
||||
@@ -146,11 +145,7 @@ Item {
|
||||
if (root.isSpace) {
|
||||
root.treeView.toggleExpanded(row)
|
||||
} else {
|
||||
if (root.isJoined) {
|
||||
root.enterRoom()
|
||||
} else {
|
||||
RoomManager.resolveResource(root.roomId, "join")
|
||||
}
|
||||
RoomManager.resolveResource(root.roomId, root.isJoined ? "" : "join")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -117,7 +117,6 @@ Kirigami.Page {
|
||||
|
||||
delegate: SpaceHierarchyDelegate {
|
||||
onCreateRoom: _private.createRoom(roomId)
|
||||
onEnterRoom: _private.enterRoom(roomId)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -167,12 +166,5 @@ Kirigami.Page {
|
||||
})
|
||||
dialog.newChild.connect(childName => {spaceChildrenModel.addPendingChild(childName)})
|
||||
}
|
||||
|
||||
function enterRoom(roomId) {
|
||||
let room = root.currentRoom.connection.room(roomId)
|
||||
if (room) {
|
||||
RoomManager.enterRoom(room)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ Loader {
|
||||
QQC2.MenuItem {
|
||||
text: i18nc("'Space' is a matrix space", "View Space")
|
||||
icon.name: "view-list-details"
|
||||
onTriggered: RoomManager.enterSpaceHome(room);
|
||||
onTriggered: RoomManager.resolveResource(room.id);
|
||||
}
|
||||
|
||||
QQC2.MenuItem {
|
||||
@@ -109,7 +109,7 @@ Loader {
|
||||
FormCard.FormButtonDelegate {
|
||||
text: i18nc("'Space' is a matrix space", "View Space")
|
||||
icon.name: "view-list-details"
|
||||
onClicked: RoomManager.enterRoom(room);
|
||||
onClicked: RoomManager.resolveResource(root.room.id);
|
||||
}
|
||||
|
||||
FormCard.FormButtonDelegate {
|
||||
|
||||
@@ -326,7 +326,7 @@ Kirigami.ApplicationWindow {
|
||||
target: root.connection
|
||||
|
||||
function onDirectChatAvailable(directChat) {
|
||||
RoomManager.enterRoom(root.connection.room(directChat.id));
|
||||
RoomManager.resolveResource(directChat.id);
|
||||
}
|
||||
function onNewKeyVerificationSession(session) {
|
||||
applicationWindow().pageStack.pushDialogLayer(keyVerificationDialogComponent, {
|
||||
|
||||
@@ -102,7 +102,7 @@ void RoomManager::resolveResource(const QString &idOrUri, const QString &action)
|
||||
|
||||
if (uri.type() == Uri::RoomAlias || uri.type() == Uri::RoomId) {
|
||||
connectSingleShot(m_connection, &Connection::newRoom, this, [this, uri](Room *room) {
|
||||
enterRoom(dynamic_cast<NeoChatRoom *>(room));
|
||||
resolveResource(room->id());
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -191,82 +191,17 @@ void RoomManager::openRoomForActiveConnection()
|
||||
const auto room = qobject_cast<NeoChatRoom *>(m_connection->room(roomId));
|
||||
|
||||
if (room) {
|
||||
if (room->isSpace()) {
|
||||
enterSpaceHome(room);
|
||||
} else {
|
||||
enterRoom(room);
|
||||
}
|
||||
resolveResource(room->id());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void RoomManager::enterRoom(NeoChatRoom *room)
|
||||
{
|
||||
if (m_currentRoom && !m_currentRoom->editCache()->editId().isEmpty()) {
|
||||
m_currentRoom->editCache()->setEditId({});
|
||||
}
|
||||
if (m_currentRoom && m_chatDocumentHandler) {
|
||||
// We're doing these things here because it is critical that they are switched at the same time
|
||||
if (m_chatDocumentHandler->document()) {
|
||||
m_currentRoom->mainCache()->setSavedText(m_chatDocumentHandler->document()->textDocument()->toPlainText());
|
||||
m_chatDocumentHandler->setRoom(room);
|
||||
m_chatDocumentHandler->document()->textDocument()->setPlainText(room->mainCache()->savedText());
|
||||
room->mainCache()->setText(room->mainCache()->savedText());
|
||||
} else {
|
||||
m_chatDocumentHandler->setRoom(room);
|
||||
}
|
||||
}
|
||||
m_lastCurrentRoom = std::exchange(m_currentRoom, room);
|
||||
Q_EMIT currentRoomChanged();
|
||||
|
||||
if (!m_lastCurrentRoom) {
|
||||
Q_EMIT pushRoom(room, QString());
|
||||
} else {
|
||||
Q_EMIT replaceRoom(m_currentRoom, QString());
|
||||
}
|
||||
|
||||
if (room && room->timelineSize() == 0) {
|
||||
room->getPreviousContent(20);
|
||||
}
|
||||
|
||||
// Save last open room
|
||||
m_lastRoomConfig.writeEntry(m_connection->userId(), room->id());
|
||||
}
|
||||
|
||||
void RoomManager::openWindow(NeoChatRoom *room)
|
||||
{
|
||||
// forward the call to QML
|
||||
Q_EMIT openRoomInNewWindow(room);
|
||||
}
|
||||
|
||||
void RoomManager::enterSpaceHome(NeoChatRoom *spaceRoom)
|
||||
{
|
||||
if (!spaceRoom->isSpace()) {
|
||||
return;
|
||||
}
|
||||
// If replacing a normal room message timeline make sure any edit is cancelled.
|
||||
if (m_currentRoom && !m_currentRoom->editCache()->editId().isEmpty()) {
|
||||
m_currentRoom->editCache()->setEditId({});
|
||||
}
|
||||
// Save the chatbar text for the current room if any before switching
|
||||
if (m_currentRoom && m_chatDocumentHandler) {
|
||||
if (m_chatDocumentHandler->document()) {
|
||||
m_currentRoom->mainCache()->setSavedText(m_chatDocumentHandler->document()->textDocument()->toPlainText());
|
||||
}
|
||||
}
|
||||
m_lastCurrentRoom = std::exchange(m_currentRoom, spaceRoom);
|
||||
Q_EMIT currentRoomChanged();
|
||||
|
||||
if (!m_lastCurrentRoom) {
|
||||
Q_EMIT pushSpaceHome(spaceRoom);
|
||||
} else {
|
||||
Q_EMIT replaceSpaceHome(m_currentRoom);
|
||||
}
|
||||
|
||||
// Save last open room
|
||||
m_lastRoomConfig.writeEntry(m_connection->userId(), spaceRoom->id());
|
||||
}
|
||||
|
||||
UriResolveResult RoomManager::visitUser(User *user, const QString &action)
|
||||
{
|
||||
if (action == "mention"_ls || action.isEmpty()) {
|
||||
@@ -290,19 +225,46 @@ void RoomManager::visitRoom(Room *room, const QString &eventId)
|
||||
auto neoChatRoom = qobject_cast<NeoChatRoom *>(room);
|
||||
Q_ASSERT(neoChatRoom != nullptr);
|
||||
|
||||
if (m_currentRoom && !m_currentRoom->editCache()->editId().isEmpty()) {
|
||||
m_currentRoom->editCache()->setEditId({});
|
||||
}
|
||||
if (m_currentRoom && !m_currentRoom->isSpace() && m_chatDocumentHandler) {
|
||||
// We're doing these things here because it is critical that they are switched at the same time
|
||||
if (m_chatDocumentHandler->document()) {
|
||||
m_currentRoom->mainCache()->setSavedText(m_chatDocumentHandler->document()->textDocument()->toPlainText());
|
||||
m_chatDocumentHandler->setRoom(neoChatRoom);
|
||||
m_chatDocumentHandler->document()->textDocument()->setPlainText(neoChatRoom->mainCache()->savedText());
|
||||
neoChatRoom->mainCache()->setText(neoChatRoom->mainCache()->savedText());
|
||||
} else {
|
||||
m_chatDocumentHandler->setRoom(neoChatRoom);
|
||||
}
|
||||
}
|
||||
|
||||
if (m_currentRoom) {
|
||||
if (m_currentRoom->id() == room->id()) {
|
||||
Q_EMIT goToEvent(eventId);
|
||||
} else {
|
||||
m_lastCurrentRoom = std::exchange(m_currentRoom, neoChatRoom);
|
||||
Q_EMIT currentRoomChanged();
|
||||
Q_EMIT replaceRoom(neoChatRoom, eventId);
|
||||
|
||||
if (neoChatRoom->isSpace()) {
|
||||
Q_EMIT replaceSpaceHome(neoChatRoom);
|
||||
} else {
|
||||
Q_EMIT replaceRoom(neoChatRoom, eventId);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
m_lastCurrentRoom = std::exchange(m_currentRoom, neoChatRoom);
|
||||
Q_EMIT currentRoomChanged();
|
||||
Q_EMIT pushRoom(neoChatRoom, eventId);
|
||||
if (neoChatRoom->isSpace()) {
|
||||
Q_EMIT pushSpaceHome(neoChatRoom);
|
||||
} else {
|
||||
Q_EMIT pushRoom(neoChatRoom, eventId);
|
||||
}
|
||||
}
|
||||
|
||||
// Save last open room
|
||||
m_lastRoomConfig.writeEntry(m_connection->userId(), room->id());
|
||||
}
|
||||
|
||||
void RoomManager::joinRoom(Quotient::Connection *account, const QString &roomAliasOrId, const QStringList &viaServers)
|
||||
@@ -311,7 +273,7 @@ void RoomManager::joinRoom(Quotient::Connection *account, const QString &roomAli
|
||||
connectSingleShot(job, &Quotient::BaseJob::finished, this, [this, account](Quotient::BaseJob *finish) {
|
||||
if (finish->status() == Quotient::BaseJob::Success) {
|
||||
connectSingleShot(account, &Quotient::Connection::newRoom, this, [this](Quotient::Room *room) {
|
||||
enterRoom(dynamic_cast<NeoChatRoom *>(room));
|
||||
resolveResource(room->id());
|
||||
});
|
||||
} else {
|
||||
Q_EMIT warning(i18n("Failed to join room"), finish->errorString());
|
||||
|
||||
@@ -136,13 +136,6 @@ public:
|
||||
*/
|
||||
Q_INVOKABLE void loadInitialRoom();
|
||||
|
||||
/**
|
||||
* @brief Enter the given room.
|
||||
*
|
||||
* This method will tell NeoChat to open the message list with the given room.
|
||||
*/
|
||||
Q_INVOKABLE void enterRoom(NeoChatRoom *room);
|
||||
|
||||
/**
|
||||
* @brief Open a new window with the given room.
|
||||
*
|
||||
@@ -155,13 +148,6 @@ public:
|
||||
*/
|
||||
Q_INVOKABLE void leaveRoom(NeoChatRoom *room);
|
||||
|
||||
/**
|
||||
* @brief Enter the home page of the given space.
|
||||
*
|
||||
* This method will tell NeoChat to open the home page for the given space.
|
||||
*/
|
||||
Q_INVOKABLE void enterSpaceHome(NeoChatRoom *spaceRoom);
|
||||
|
||||
/**
|
||||
* @brief Knock a room.
|
||||
*
|
||||
|
||||
@@ -85,14 +85,7 @@ void Runner::Run(const QString &id, const QString &actionId)
|
||||
{
|
||||
Q_UNUSED(actionId);
|
||||
|
||||
NeoChatRoom *room = qobject_cast<NeoChatRoom *>(roomListModel()->connection()->room(id));
|
||||
|
||||
if (!room) {
|
||||
return;
|
||||
}
|
||||
|
||||
RoomManager::instance().enterRoom(room);
|
||||
|
||||
RoomManager::instance().resolveResource(id);
|
||||
WindowController::instance().showAndRaiseWindow(QString());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user