diff options
author | Joseph Donofry <joedonofry@gmail.com> | 2020-06-11 21:59:21 -0400 |
---|---|---|
committer | Joseph Donofry <joedonofry@gmail.com> | 2020-06-11 21:59:21 -0400 |
commit | b9626f0c690ad69f7f8304fb9130877e3d62db6d (patch) | |
tree | c012bdae8291dfa4da87f49aad13b1bc5f1d1e25 /src | |
parent | Fix linting (diff) | |
download | nheko-b9626f0c690ad69f7f8304fb9130877e3d62db6d.tar.xz |
Additional code cleanup
Diffstat (limited to 'src')
-rw-r--r-- | src/ChatPage.cpp | 6 | ||||
-rw-r--r-- | src/ChatPage.h | 1 | ||||
-rw-r--r-- | src/timeline/TimelineModel.cpp | 7 | ||||
-rw-r--r-- | src/timeline/TimelineModel.h | 20 |
4 files changed, 0 insertions, 34 deletions
diff --git a/src/ChatPage.cpp b/src/ChatPage.cpp index 2340b146..c7f5164a 100644 --- a/src/ChatPage.cpp +++ b/src/ChatPage.cpp @@ -607,12 +607,6 @@ ChatPage::resetUI() } void -ChatPage::reactMessage(const QString &id) -{ - view_manager_->queueReactionMessage(current_room_, id, "👀"); -} - -void ChatPage::focusMessageInput() { this->text_input_->focusLineEdit(); diff --git a/src/ChatPage.h b/src/ChatPage.h index b6b72319..83b4e76d 100644 --- a/src/ChatPage.h +++ b/src/ChatPage.h @@ -87,7 +87,6 @@ public: //! Show the room/group list (if it was visible). void showSideBars(); void initiateLogout(); - void reactMessage(const QString &eventId); void focusMessageInput(); public slots: diff --git a/src/timeline/TimelineModel.cpp b/src/timeline/TimelineModel.cpp index 95997eb8..16e4f207 100644 --- a/src/timeline/TimelineModel.cpp +++ b/src/timeline/TimelineModel.cpp @@ -962,13 +962,6 @@ TimelineModel::decryptEvent(const mtx::events::EncryptedEvent<mtx::events::msg:: } void -TimelineModel::reactAction(QString id) -{ - setReaction(id); - ChatPage::instance()->reactMessage(id); -} - -void TimelineModel::replyAction(QString id) { setReply(id); diff --git a/src/timeline/TimelineModel.h b/src/timeline/TimelineModel.h index 3b01781f..a3b92f83 100644 --- a/src/timeline/TimelineModel.h +++ b/src/timeline/TimelineModel.h @@ -126,8 +126,6 @@ class TimelineModel : public QAbstractListModel int currentIndex READ currentIndex WRITE setCurrentIndex NOTIFY currentIndexChanged) Q_PROPERTY(std::vector<QString> typingUsers READ typingUsers WRITE updateTypingUsers NOTIFY typingUsersChanged) - Q_PROPERTY(QString reaction READ reaction WRITE setReaction NOTIFY reactionChanged RESET - resetReaction) Q_PROPERTY(QString reply READ reply WRITE setReply NOTIFY replyChanged RESET resetReply) Q_PROPERTY( bool paginationInProgress READ paginationInProgress NOTIFY paginationInProgressChanged) @@ -191,7 +189,6 @@ public: Q_INVOKABLE void viewRawMessage(QString id) const; Q_INVOKABLE void viewDecryptedRawMessage(QString id) const; Q_INVOKABLE void openUserProfile(QString userid) const; - Q_INVOKABLE void reactAction(QString id); Q_INVOKABLE void replyAction(QString id); Q_INVOKABLE void readReceiptsAction(QString id) const; Q_INVOKABLE void redactEvent(QString id); @@ -220,21 +217,6 @@ public slots: } std::vector<QString> typingUsers() const { return typingUsers_; } bool paginationInProgress() const { return m_paginationInProgress; } - QString reaction() const { return reaction_; } - void setReaction(QString reaction) - { - if (reaction_ != reaction) { - reaction_ = reaction; - emit reactionChanged(reaction_); - } - } - void resetReaction() - { - if (!reaction_.isEmpty()) { - reaction_ = ""; - emit reactionChanged(reaction_); - } - } QString reply() const { return reply_; } void setReply(QString newReply) { @@ -271,7 +253,6 @@ signals: void newEncryptedImage(mtx::crypto::EncryptedFile encryptionInfo); void eventFetched(QString requestingEvent, mtx::events::collections::TimelineEvents event); void typingUsersChanged(std::vector<QString> users); - void reactionChanged(QString reaction); void replyChanged(QString reply); void paginationInProgressChanged(const bool); @@ -305,7 +286,6 @@ private: bool m_paginationInProgress = false; QString currentId; - QString reaction_; QString reply_; std::vector<QString> typingUsers_; |