From 851289fb4c93f0d5968aa7cd83ede0d4ced0bc1e Mon Sep 17 00:00:00 2001 From: DenioD <41270280+DenioD@users.noreply.github.com> Date: Wed, 29 Jul 2020 09:50:36 +0200 Subject: [PATCH] lock emoji button too --- src/Chat/Chat.cpp | 2 ++ src/mainwindow.cpp | 9 ++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/Chat/Chat.cpp b/src/Chat/Chat.cpp index c769ed2..a4f8549 100644 --- a/src/Chat/Chat.cpp +++ b/src/Chat/Chat.cpp @@ -127,6 +127,8 @@ void Chat::renderChatBox(Ui::MainWindow *ui, QListView *view, QLabel *label) chat->appendRow(Items1); ui->listChat->setModel(chat); ui->memoTxtChat->setEnabled(true); + ui->emojiButton->setEnabled(true); + ui->sendChatButton->setEnabled(true); } else diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 3aa6df0..b598425 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -1423,6 +1423,8 @@ void MainWindow::setupTransactionsTab() { void MainWindow::setupchatTab() { ui->memoTxtChat->setEnabled(false); + ui->emojiButton->setEnabled(false); + ui->sendChatButton->setEnabled(false); /////////////Setting Icons for Chattab and different themes @@ -1471,6 +1473,8 @@ void MainWindow::setupchatTab() { QObject::connect(ui->sendChatButton, &QPushButton::clicked, [&] () { ui->memoTxtChat->setEnabled(false); + ui->emojiButton->setEnabled(false); + }); QObject::connect(ui->safeContactRequest, &QPushButton::clicked, this, &MainWindow::addContact); @@ -1613,9 +1617,12 @@ void MainWindow::setupchatTab() { ui->listContactWidget->addAction(HushAction); ui->listContactWidget->addAction(editAction); ui->listContactWidget->addAction(subatomicAction); + ui->memoTxtChat->setEnabled(false); + ui->emojiButton->setEnabled(false); + ui->sendChatButton->setEnabled(false); - QModelIndex index = ui->listContactWidget->currentIndex(); + QModelIndex index = ui->listContactWidget->currentIndex(); QString label_contact = index.data(Qt::DisplayRole).toString(); for(auto &p : AddressBook::getInstance()->getAllAddressLabels())