mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-25 20:48:52 +03:00
Clean up code
This commit is contained in:
parent
3c5b395171
commit
baa9dfe110
3 changed files with 3 additions and 39 deletions
|
@ -116,34 +116,6 @@ ChatPage::ChatPage(QSharedPointer<UserSettings> userSettings, QWidget *parent)
|
||||||
|
|
||||||
connect(this, &ChatPage::loggedOut, this, &ChatPage::logout);
|
connect(this, &ChatPage::loggedOut, this, &ChatPage::logout);
|
||||||
|
|
||||||
// TODO: once this signal is moved, reenable this
|
|
||||||
// connect(view_manager_, &TimelineViewManager::inviteUsers, this, [this](QStringList
|
|
||||||
// users) {
|
|
||||||
// const auto room_id = currentRoom().toStdString();
|
|
||||||
|
|
||||||
// for (int ii = 0; ii < users.size(); ++ii) {
|
|
||||||
// QTimer::singleShot(ii * 500, this, [this, room_id, ii, users]() {
|
|
||||||
// const auto user = users.at(ii);
|
|
||||||
|
|
||||||
// http::client()->invite_user(
|
|
||||||
// room_id,
|
|
||||||
// user.toStdString(),
|
|
||||||
// [this, user](const mtx::responses::RoomInvite &,
|
|
||||||
// mtx::http::RequestErr err) {
|
|
||||||
// if (err) {
|
|
||||||
// emit showNotification(
|
|
||||||
// tr("Failed to invite user:
|
|
||||||
// %1").arg(user));
|
|
||||||
// return;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// emit showNotification(tr("Invited user:
|
|
||||||
// %1").arg(user));
|
|
||||||
// });
|
|
||||||
// });
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
|
|
||||||
connect(
|
connect(
|
||||||
view_manager_,
|
view_manager_,
|
||||||
&TimelineViewManager::inviteUsers,
|
&TimelineViewManager::inviteUsers,
|
||||||
|
|
|
@ -1074,7 +1074,7 @@ TimelineModel::openRoomSettings(QString room_id)
|
||||||
{
|
{
|
||||||
RoomSettings *settings = new RoomSettings(room_id == QString() ? roomId() : room_id, this);
|
RoomSettings *settings = new RoomSettings(room_id == QString() ? roomId() : room_id, this);
|
||||||
connect(this, &TimelineModel::roomAvatarUrlChanged, settings, &RoomSettings::avatarChanged);
|
connect(this, &TimelineModel::roomAvatarUrlChanged, settings, &RoomSettings::avatarChanged);
|
||||||
openRoomSettingsDialog(settings);
|
emit openRoomSettingsDialog(settings);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -1082,9 +1082,9 @@ TimelineModel::openInviteUsers(QString roomId)
|
||||||
{
|
{
|
||||||
InviteesModel *model = new InviteesModel{this};
|
InviteesModel *model = new InviteesModel{this};
|
||||||
connect(model, &InviteesModel::accept, this, [this, model, roomId]() {
|
connect(model, &InviteesModel::accept, this, [this, model, roomId]() {
|
||||||
manager_->inviteUsers(roomId == QString() ? room_id_ : roomId, model->mxids());
|
emit manager_->inviteUsers(roomId == QString() ? room_id_ : roomId, model->mxids());
|
||||||
});
|
});
|
||||||
openInviteUsersDialog(model);
|
emit openInviteUsersDialog(model);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
@ -430,14 +430,6 @@ TimelineViewManager::openImageOverlayInternal(QString eventId, QImage img)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// void
|
|
||||||
// TimelineViewManager::openInviteUsersDialog()
|
|
||||||
//{
|
|
||||||
// TODO: move this somewhere where it will actually work (probably Rooms)
|
|
||||||
// MainWindow::instance()->openInviteUsersDialog(
|
|
||||||
// [this](const QStringList &invitees) { emit inviteUsers(invitees); });
|
|
||||||
//}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
TimelineViewManager::openLeaveRoomDialog(QString roomid) const
|
TimelineViewManager::openLeaveRoomDialog(QString roomid) const
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue