From d81b14b77b74ad790e2a9fef4f4616527cadb600 Mon Sep 17 00:00:00 2001 From: Nicolas Werner 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 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(); }; -