summary refs log tree commit diff
path: root/src/timeline/InputBar.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/timeline/InputBar.cpp')
-rw-r--r--src/timeline/InputBar.cpp46
1 files changed, 0 insertions, 46 deletions
diff --git a/src/timeline/InputBar.cpp b/src/timeline/InputBar.cpp

index 78c8c6a3..3cddd613 100644 --- a/src/timeline/InputBar.cpp +++ b/src/timeline/InputBar.cpp
@@ -13,7 +13,6 @@ #include <mtx/responses/media.hpp> #include "Cache.h" -#include "CallManager.h" #include "ChatPage.h" #include "CompletionProxyModel.h" #include "Logging.h" @@ -25,7 +24,6 @@ #include "UserSettingsPage.h" #include "UsersModel.h" #include "Utils.h" -#include "dialogs/PlaceCall.h" #include "dialogs/PreviewUploadOverlay.h" #include "emoji/EmojiModel.h" @@ -594,50 +592,6 @@ InputBar::showPreview(const QMimeData &source, QString path, const QStringList & } void -InputBar::callButton() -{ - auto callManager_ = ChatPage::instance()->callManager(); - if (callManager_->haveCallInvite()) { - return; - } else if (callManager_->isOnCall()) { - callManager_->hangUp(); - } else { - auto current_room_ = room->roomId(); - if (auto roomInfo = cache::singleRoomInfo(current_room_.toStdString()); - roomInfo.member_count != 2) { - ChatPage::instance()->showNotification("Calls are limited to 1:1 rooms."); - } else { - std::vector<RoomMember> members( - cache::getMembers(current_room_.toStdString())); - const RoomMember &callee = members.front().user_id == utils::localUser() - ? members.back() - : members.front(); - auto dialog = - new dialogs::PlaceCall(callee.user_id, - callee.display_name, - QString::fromStdString(roomInfo.name), - QString::fromStdString(roomInfo.avatar_url), - ChatPage::instance()->userSettings(), - MainWindow::instance()); - connect(dialog, - &dialogs::PlaceCall::voice, - callManager_, - [callManager_, current_room_]() { - callManager_->sendInvite(current_room_, false); - }); - connect(dialog, - &dialogs::PlaceCall::video, - callManager_, - [callManager_, current_room_]() { - callManager_->sendInvite(current_room_, true); - }); - utils::centerWidget(dialog, MainWindow::instance()); - dialog->show(); - } - } -} - -void InputBar::startTyping() { if (!typingRefresh_.isActive()) {