fix: request more historical messages on wake (#5018)

This commit is contained in:
iProdigy
2023-12-16 06:38:35 -06:00
committed by GitHub
parent 5f8c4c6b66
commit e75ce5db54
8 changed files with 48 additions and 19 deletions
+9 -4
View File
@@ -137,10 +137,14 @@ public:
SharedAccessGuard<const StreamStatus> accessStreamStatus() const;
/**
* Records the current timestamp the channel was disconnected.
* This can be used to calculate the time spent disconnected after a successful reconnect
* Records that the channel is no longer joined.
*/
void markDisconnectedNow();
void markDisconnected();
/**
* Records that the channel's read connection is healthy.
*/
void markConnected();
// Emotes
std::optional<EmotePtr> bttvEmote(const EmoteName &name) const;
@@ -364,8 +368,9 @@ private:
int chatterCount_{};
UniqueAccess<StreamStatus> streamStatus_;
UniqueAccess<RoomModes> roomModes_;
bool disconnected_{};
std::optional<std::chrono::time_point<std::chrono::system_clock>>
disconnectedAt_{};
lastConnectedAt_{};
std::atomic_flag loadingRecentMessages_ = ATOMIC_FLAG_INIT;
std::unordered_map<QString, std::weak_ptr<MessageThread>> threads_;