From d81b14b77b74ad790e2a9fef4f4616527cadb600 Mon Sep 17 00:00:00 2001
From: Nicolas Werner <nicolas.werner@hotmail.de>
Date: Wed, 5 Jul 2023 10:24:38 +0200
Subject: [PATCH] Fix variable shadowing

---
 src/Utils.cpp        | 12 ++++++------
 src/ui/EventExpiry.h |  1 -
 2 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/src/Utils.cpp b/src/Utils.cpp
index 663609fe6..26e894b93 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 aa144dc37..378c44841 100644
--- a/src/ui/EventExpiry.h
+++ b/src/ui/EventExpiry.h
@@ -64,4 +64,3 @@ private:
 
     void load();
 };
-
-- 
GitLab