summary refs log tree commit diff
path: root/include
diff options
context:
space:
mode:
authorKonstantinos Sideris <sideris.konstantin@gmail.com>2018-06-30 15:13:15 +0300
committerKonstantinos Sideris <sideris.konstantin@gmail.com>2018-06-30 15:13:15 +0300
commit5b5d35fd1f33555f6dacecacaf53a18517218b79 (patch)
treea0c9dbba27ff5826c906fd6bbc5b6587c2d149ea /include
parentAllow arbitrary resizing of the main window & restore sidebar's size (diff)
downloadnheko-5b5d35fd1f33555f6dacecacaf53a18517218b79.tar.xz
Add basic support for replies (#292)
Diffstat (limited to 'include')
-rw-r--r--include/ChatPage.h2
-rw-r--r--include/TextInputWidget.h1
-rw-r--r--include/timeline/TimelineItem.h3
3 files changed, 6 insertions, 0 deletions
diff --git a/include/ChatPage.h b/include/ChatPage.h

index a4c6ccc5..234aabfd 100644 --- a/include/ChatPage.h +++ b/include/ChatPage.h
@@ -76,6 +76,8 @@ signals: void connectionLost(); void connectionRestored(); + void messageReply(const QString &username, const QString &msg); + void notificationsRetrieved(const mtx::responses::Notifications &); void uploadFailed(const QString &msg); diff --git a/include/TextInputWidget.h b/include/TextInputWidget.h
index af58c2c3..2dcb178f 100644 --- a/include/TextInputWidget.h +++ b/include/TextInputWidget.h
@@ -144,6 +144,7 @@ public slots: void openFileSelection(); void hideUploadSpinner(); void focusLineEdit() { input_->setFocus(); } + void addReply(const QString &username, const QString &msg); private slots: void addSelectedEmoji(const QString &emoji); diff --git a/include/timeline/TimelineItem.h b/include/timeline/TimelineItem.h
index f055f217..180623f4 100644 --- a/include/timeline/TimelineItem.h +++ b/include/timeline/TimelineItem.h
@@ -212,6 +212,8 @@ private: void init(); //! Add a context menu option to save the image of the timeline item. void addSaveImageAction(ImageItem *image); + //! Add the reply action in the context menu for widgets that support it. + void addReplyAction(); template<class Widget> void setupLocalWidgetLayout(Widget *widget, const QString &userid, bool withSender); @@ -240,6 +242,7 @@ private: QAction *showReadReceipts_; QAction *markAsRead_; QAction *redactMsg_; + QAction *replyMsg_; QHBoxLayout *topLayout_ = nullptr; QHBoxLayout *messageLayout_ = nullptr;