Remove controller::joinRoom
Remove controller::joinRoom in favour of using RoomManager::OpenResource
This commit is contained in:
@@ -370,18 +370,6 @@ void Controller::saveWindowGeometry()
|
||||
WindowController::instance().saveGeometry();
|
||||
}
|
||||
|
||||
// TODO: Remove in favor of RoomManager::joinRoom
|
||||
void Controller::joinRoom(const QString &alias)
|
||||
{
|
||||
if (!alias.contains(":"_ls)) {
|
||||
Q_EMIT errorOccured(i18n("The room id you are trying to join is not valid"));
|
||||
return;
|
||||
}
|
||||
|
||||
const auto knownServer = alias.mid(alias.indexOf(":"_ls) + 1);
|
||||
RoomManager::instance().joinRoom(m_connection, alias, QStringList{knownServer});
|
||||
}
|
||||
|
||||
void Controller::forceRefreshTextDocument(QQuickTextDocument *textDocument, QQuickItem *item)
|
||||
{
|
||||
// HACK: Workaround bug QTBUG 93281
|
||||
|
||||
@@ -100,11 +100,6 @@ public:
|
||||
*/
|
||||
bool saveAccessTokenToKeyChain(const Quotient::AccountSettings &account, const QByteArray &accessToken);
|
||||
|
||||
/**
|
||||
* @brief Join a room.
|
||||
*/
|
||||
Q_INVOKABLE void joinRoom(const QString &alias);
|
||||
|
||||
[[nodiscard]] bool supportSystemTray() const;
|
||||
|
||||
/**
|
||||
|
||||
@@ -235,7 +235,7 @@ QList<ActionsModel::Action> actions{
|
||||
return QString();
|
||||
}
|
||||
Q_EMIT room->showMessage(NeoChatRoom::Info, i18nc("Joining room <roomname>.", "Joining room %1.", text));
|
||||
Controller::instance().joinRoom(text);
|
||||
RoomManager::instance().openResource(text, "join"_ls);
|
||||
return QString();
|
||||
},
|
||||
false,
|
||||
@@ -290,7 +290,7 @@ QList<ActionsModel::Action> actions{
|
||||
return QString();
|
||||
}
|
||||
Q_EMIT room->showMessage(NeoChatRoom::Info, i18nc("Joining room <roomname>.", "Joining room %1.", text));
|
||||
Controller::instance().joinRoom(text);
|
||||
RoomManager::instance().openResource(text, "join"_ls);
|
||||
return QString();
|
||||
},
|
||||
false,
|
||||
|
||||
@@ -26,7 +26,7 @@ RowLayout {
|
||||
if (isJoined) {
|
||||
RoomManager.enterRoom(root.connection.room(roomId))
|
||||
} else {
|
||||
Controller.joinRoom(roomId.length > 0 ? roomId : alias)
|
||||
RoomManager.openResource(roomId.length > 0 ? roomId : alias, "join")
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -57,7 +57,7 @@ ColumnLayout {
|
||||
if (isJoined) {
|
||||
RoomManager.enterRoom(root.connection.room(roomId));
|
||||
} else {
|
||||
Controller.joinRoom(roomId.length > 0 ? roomId : alias);
|
||||
RoomManager.openResource(roomId.length > 0 ? roomId : alias, "join");
|
||||
}
|
||||
})
|
||||
exploreTabBar.currentIndex = -1;
|
||||
|
||||
@@ -66,7 +66,7 @@ Labs.MenuBar {
|
||||
if (isJoined) {
|
||||
RoomManager.enterRoom(root.connection.room(roomId))
|
||||
} else {
|
||||
Controller.joinRoom(roomId)
|
||||
RoomManager.openResource(roomId, "join")
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -191,7 +191,7 @@ Kirigami.Page {
|
||||
if (isJoined) {
|
||||
RoomManager.enterRoom(root.connection.room(roomId))
|
||||
} else {
|
||||
Controller.joinRoom(roomId)
|
||||
RoomManager.openResource(roomId, "join")
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -149,7 +149,7 @@ Item {
|
||||
if (root.isJoined) {
|
||||
root.enterRoom()
|
||||
} else {
|
||||
Controller.joinRoom(root.roomId)
|
||||
RoomManager.openResource(root.roomId, "join")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user