summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorNepNep21 <43792621+NepNep21@users.noreply.github.com>2023-09-07 19:17:03 -0300
committerNepNep21 <43792621+NepNep21@users.noreply.github.com>2023-10-01 22:52:40 -0300
commit44cf096111388264531fe5750a3c5caa59be7203 (patch)
treec71fc87a4f4f70b5f7dcab8bb125d36754f30058 /src
parentUse properties (diff)
downloadnheko-44cf096111388264531fe5750a3c5caa59be7203.tar.xz
Lint + clazy
Diffstat (limited to 'src')
-rw-r--r--src/timeline/TimelineModel.cpp2
-rw-r--r--src/timeline/TimelineViewManager.cpp8
-rw-r--r--src/timeline/TimelineViewManager.h5
3 files changed, 7 insertions, 8 deletions
diff --git a/src/timeline/TimelineModel.cpp b/src/timeline/TimelineModel.cpp
index ce136e35..a384d7c2 100644
--- a/src/timeline/TimelineModel.cpp
+++ b/src/timeline/TimelineModel.cpp
@@ -2115,7 +2115,7 @@ TimelineModel::handleIgnoredUser(const QString &id, const std::optional<QString>
 {
     if (err) {
         MainWindow::instance()->showNotification(
-          tr("Failed to ignore \"%1\": %2").arg(id).arg(*err));
+          tr("Failed to ignore \"%1\": %2").arg(id, *err));
     } else {
         this->clearTimeline();
     }
diff --git a/src/timeline/TimelineViewManager.cpp b/src/timeline/TimelineViewManager.cpp
index 3e623d7a..e2616c14 100644
--- a/src/timeline/TimelineViewManager.cpp
+++ b/src/timeline/TimelineViewManager.cpp
@@ -565,7 +565,9 @@ TimelineViewManager::fixImageRendering(QQuickTextDocument *t, QQuickItem *i)
 
 using IgnoredUsers = mtx::events::EphemeralEvent<mtx::events::account_data::IgnoredUsers>;
 
-static QVector<QString> convertIgnoredToQt(const IgnoredUsers &ev) {
+static QVector<QString>
+convertIgnoredToQt(const IgnoredUsers &ev)
+{
     QVector<QString> users;
     for (const mtx::events::account_data::IgnoredUser &user : ev.content.users) {
         users.push_back(QString::fromStdString(user.id));
@@ -586,14 +588,14 @@ TimelineViewManager::getIgnoredUsers()
 }
 
 void
-TimelineViewManager::processIgnoredUsers(const mtx::responses::AccountData &data) 
+TimelineViewManager::processIgnoredUsers(const mtx::responses::AccountData &data)
 {
     for (const mtx::events::collections::RoomAccountDataEvents::variant &ev : data.events) {
         if (!std::holds_alternative<IgnoredUsers>(ev)) {
             continue;
         }
         const auto &ignoredEv = std::get<IgnoredUsers>(ev);
-        
+
         emit this->ignoredUsersChanged(convertIgnoredToQt(ignoredEv));
         break;
     }
diff --git a/src/timeline/TimelineViewManager.h b/src/timeline/TimelineViewManager.h
index 74832c02..6a825b6f 100644
--- a/src/timeline/TimelineViewManager.h
+++ b/src/timeline/TimelineViewManager.h
@@ -63,10 +63,7 @@ public:
         return instance_;
     }
 
-    static TimelineViewManager *instance()
-    {
-        return TimelineViewManager::instance_;
-    }
+    static TimelineViewManager *instance() { return TimelineViewManager::instance_; }
 
     QVector<QString> getIgnoredUsers();