Fix smooth scrolling when ChannelView is full (#4501)

Co-authored-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com>
This commit is contained in:
Andrew Opalach
2023-06-18 12:09:11 +00:00
committed by GitHub
parent 4b40b9a310
commit 0e60ca10d0
6 changed files with 152 additions and 140 deletions
+2 -2
View File
@@ -260,7 +260,6 @@ private:
QTimer updateTimer_;
bool updateQueued_ = false;
bool messageWasAdded_ = false;
bool lastMessageHasAlternateBackground_ = false;
bool lastMessageHasAlternateBackgroundReverse_ = true;
@@ -269,7 +268,8 @@ private:
std::unordered_map<PauseReason, boost::optional<SteadyClock::time_point>>
pauses_;
boost::optional<SteadyClock::time_point> pauseEnd_;
int pauseScrollOffset_ = 0;
int pauseScrollMinimumOffset_ = 0;
int pauseScrollMaximumOffset_ = 0;
// Keeps track how many message indices we need to offset the selection when we resume scrolling
uint32_t pauseSelectionOffset_ = 0;