mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-22 11:00:48 +03:00
Fix variable shadowing
This commit is contained in:
parent
ad6e4fef64
commit
d81b14b77b
2 changed files with 6 additions and 7 deletions
|
@ -1686,17 +1686,17 @@ utils::removeExpiredEvents()
|
||||||
});
|
});
|
||||||
} else if (!state->currentRoom.empty()) {
|
} else if (!state->currentRoom.empty()) {
|
||||||
mtx::http::MessagesOpts opts{};
|
mtx::http::MessagesOpts opts{};
|
||||||
opts.dir = mtx::http::PaginationDirection::Backwards;
|
opts.dir = mtx::http::PaginationDirection::Backwards;
|
||||||
opts.from = state->currentRoomPrevToken;
|
opts.from = state->currentRoomPrevToken;
|
||||||
opts.limit = 1000;
|
opts.limit = 1000;
|
||||||
opts.filter = state->filter;
|
opts.filter = state->filter;
|
||||||
opts.room_id = state->currentRoom;
|
opts.room_id = state->currentRoom;
|
||||||
|
|
||||||
http::client()->messages(
|
http::client()->messages(
|
||||||
opts,
|
opts,
|
||||||
[state = std::move(state)](const mtx::responses::Messages &msgs,
|
[state = std::move(state)](const mtx::responses::Messages &msgs,
|
||||||
mtx::http::RequestErr e) mutable {
|
mtx::http::RequestErr error) mutable {
|
||||||
if (e || msgs.chunk.empty()) {
|
if (error || msgs.chunk.empty()) {
|
||||||
state->currentRoom.clear();
|
state->currentRoom.clear();
|
||||||
state->currentRoomCount = 0;
|
state->currentRoomCount = 0;
|
||||||
state->currentRoomPrevToken.clear();
|
state->currentRoomPrevToken.clear();
|
||||||
|
|
|
@ -64,4 +64,3 @@ private:
|
||||||
|
|
||||||
void load();
|
void load();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue