summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorredsky17 <joedonofry@gmail.com>2019-05-27 16:06:28 -0400
committerredsky17 <joedonofry@gmail.com>2019-05-27 16:06:28 -0400
commit9671b1c0d6b1dc70a8f5a7b23ea8166dcbd07a16 (patch)
tree32d177b492d00dcaa6152f847ec15cb5d7b5cd86 /src
parentAdd reply and menu buttons to TimelineItem (diff)
downloadnheko-9671b1c0d6b1dc70a8f5a7b23ea8166dcbd07a16.tar.xz
Fix linting issues
Diffstat (limited to 'src')
-rw-r--r--src/timeline/TimelineItem.cpp31
-rw-r--r--src/timeline/TimelineItem.h3
2 files changed, 16 insertions, 18 deletions
diff --git a/src/timeline/TimelineItem.cpp b/src/timeline/TimelineItem.cpp
index 24685641..faae1da3 100644
--- a/src/timeline/TimelineItem.cpp
+++ b/src/timeline/TimelineItem.cpp
@@ -126,8 +126,8 @@ void
 TimelineItem::adjustMessageLayoutForWidget()
 {
         messageLayout_->addLayout(widgetLayout_, 1);
-        actionLayout_->addWidget(replyBtn_); 
-        actionLayout_->addWidget(contextBtn_); 
+        actionLayout_->addWidget(replyBtn_);
+        actionLayout_->addWidget(contextBtn_);
         messageLayout_->addLayout(actionLayout_);
         messageLayout_->addWidget(statusIndicator_);
         messageLayout_->addWidget(timestamp_);
@@ -145,8 +145,8 @@ void
 TimelineItem::adjustMessageLayout()
 {
         messageLayout_->addWidget(body_, 1);
-        actionLayout_->addWidget(replyBtn_); 
-        actionLayout_->addWidget(contextBtn_); 
+        actionLayout_->addWidget(replyBtn_);
+        actionLayout_->addWidget(contextBtn_);
         messageLayout_->addLayout(actionLayout_);
         messageLayout_->addWidget(statusIndicator_);
         messageLayout_->addWidget(timestamp_);
@@ -163,10 +163,10 @@ TimelineItem::adjustMessageLayout()
 void
 TimelineItem::init()
 {
-        userAvatar_ = nullptr;
-        timestamp_  = nullptr;
-        userName_   = nullptr;
-        body_       = nullptr;
+        userAvatar_      = nullptr;
+        timestamp_       = nullptr;
+        userName_        = nullptr;
+        body_            = nullptr;
         auto buttonSize_ = 32;
 
         contextMenu_      = new QMenu(this);
@@ -179,7 +179,6 @@ TimelineItem::init()
         contextMenu_->addAction(markAsRead_);
         contextMenu_->addAction(redactMsg_);
 
-
         connect(showReadReceipts_, &QAction::triggered, this, [this]() {
                 if (!event_id_.isEmpty())
                         MainWindow::instance()->openReadReceiptsDialog(event_id_);
@@ -221,7 +220,7 @@ TimelineItem::init()
         topLayout_     = new QHBoxLayout(this);
         mainLayout_    = new QVBoxLayout;
         messageLayout_ = new QHBoxLayout;
-        actionLayout_ = new QHBoxLayout;
+        actionLayout_  = new QHBoxLayout;
         messageLayout_->setContentsMargins(0, 0, MSG_RIGHT_MARGIN, 0);
         messageLayout_->setSpacing(MSG_PADDING);
 
@@ -870,13 +869,13 @@ TimelineItem::addReplyAction()
 }
 
 void
-TimelineItem::replyAction() {
-                        if (!body_)
-                                return;
+TimelineItem::replyAction()
+{
+        if (!body_)
+                return;
 
-                        emit ChatPage::instance()->messageReply(
-                          Cache::displayName(room_id_, descriptionMsg_.userid),
-                          body_->toPlainText());
+        emit ChatPage::instance()->messageReply(
+          Cache::displayName(room_id_, descriptionMsg_.userid), body_->toPlainText());
 }
 
 void
diff --git a/src/timeline/TimelineItem.h b/src/timeline/TimelineItem.h
index b0fabdcf..6fe4a6f2 100644
--- a/src/timeline/TimelineItem.h
+++ b/src/timeline/TimelineItem.h
@@ -289,7 +289,7 @@ private:
 
         QHBoxLayout *topLayout_     = nullptr;
         QHBoxLayout *messageLayout_ = nullptr;
-        QHBoxLayout *actionLayout_ = nullptr;
+        QHBoxLayout *actionLayout_  = nullptr;
         QVBoxLayout *mainLayout_    = nullptr;
         QHBoxLayout *widgetLayout_  = nullptr;
 
@@ -307,7 +307,6 @@ private:
 
         FlatButton *replyBtn_;
         FlatButton *contextBtn_;
-
 };
 
 template<class Widget>