commit 8935bdf38c3b133909e3ca2dc366c3a1458d9b72
parent 76f60caa36f09bf90b7b8d9c8fa854f7a0ad3fdf
Author: n0tr1v <n0tr1v@protonmail.com>
Date: Thu, 15 Jun 2023 22:01:39 -0700
doc
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/pkg/web/handlers/api/v1/chat.go b/pkg/web/handlers/api/v1/chat.go
@@ -186,14 +186,14 @@ func ChatStreamMessagesHandler(c echo.Context) error {
// Keep track of current read-marker revision
readMarkerRev := 0
- // Hide current rev of read marker and insert an invisible one at the top.
+ // Function to hide current rev of read marker and insert an invisible one at the top.
updateReadMarker := func() {
send(fmt.Sprintf(`<style>.read-marker-%d{display:none !important;}</style>`, readMarkerRev))
send(fmt.Sprintf(`<div class="read-marker read-marker-%d" style="display:none;"></div>`, readMarkerRev+1))
readMarkerRev++
displayReadMarker = true
}
- // Show the invisible read-marker which used to be at the top.
+ // Function to show the invisible read-marker which used to be at the top.
showReadMarker := func() {
if displayReadMarker {
send(fmt.Sprintf(`<style>.read-marker-%d{display:block !important;}</style>`, readMarkerRev))