summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorNicolas Werner <nicolas.werner@hotmail.de>2023-07-05 10:24:38 +0200
committerNicolas Werner <nicolas.werner@hotmail.de>2023-07-05 10:24:38 +0200
commitd81b14b77b74ad790e2a9fef4f4616527cadb600 (patch)
treef452d5a605b22e1298cec972deb66ac40be20310 /src
parentAdd experimental event expiration (diff)
downloadnheko-d81b14b77b74ad790e2a9fef4f4616527cadb600.tar.xz
Fix variable shadowing
Diffstat (limited to 'src')
-rw-r--r--src/Utils.cpp12
-rw-r--r--src/ui/EventExpiry.h1
2 files changed, 6 insertions, 7 deletions
diff --git a/src/Utils.cpp b/src/Utils.cpp
index 663609fe..26e894b9 100644
--- a/src/Utils.cpp
+++ b/src/Utils.cpp
@@ -1686,17 +1686,17 @@ utils::removeExpiredEvents()
                   });
             } else if (!state->currentRoom.empty()) {
                 mtx::http::MessagesOpts opts{};
-                opts.dir   = mtx::http::PaginationDirection::Backwards;
-                opts.from  = state->currentRoomPrevToken;
-                opts.limit = 1000;
-                opts.filter = state->filter;
+                opts.dir     = mtx::http::PaginationDirection::Backwards;
+                opts.from    = state->currentRoomPrevToken;
+                opts.limit   = 1000;
+                opts.filter  = state->filter;
                 opts.room_id = state->currentRoom;
 
                 http::client()->messages(
                   opts,
                   [state = std::move(state)](const mtx::responses::Messages &msgs,
-                                             mtx::http::RequestErr e) mutable {
-                      if (e || msgs.chunk.empty()) {
+                                             mtx::http::RequestErr error) mutable {
+                      if (error || msgs.chunk.empty()) {
                           state->currentRoom.clear();
                           state->currentRoomCount = 0;
                           state->currentRoomPrevToken.clear();
diff --git a/src/ui/EventExpiry.h b/src/ui/EventExpiry.h
index aa144dc3..378c4484 100644
--- a/src/ui/EventExpiry.h
+++ b/src/ui/EventExpiry.h
@@ -64,4 +64,3 @@ private:
 
     void load();
 };
-