aboutsummaryrefslogtreecommitdiff
path: root/ui/message-view.go
diff options
context:
space:
mode:
authorTulir Asokan <tulir@maunium.net>2020-05-10 02:28:32 +0300
committerTulir Asokan <tulir@maunium.net>2020-05-10 02:28:34 +0300
commit2cebe3b5dc0a17f46cb5e4122a16ed73e9e90d97 (patch)
treec5e0078630f339a0ccb627ce384dd891819fc527 /ui/message-view.go
parent4e2cbf1e4fc40fb5c78c32567a0622a6ce63eeba (diff)
Move loaded history pointer to message view
When it was in the history manager, it wouldn't get unloaded when the room was unloaded. Hopefully fixes #136
Diffstat (limited to 'ui/message-view.go')
-rw-r--r--ui/message-view.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/ui/message-view.go b/ui/message-view.go
index 596b9b0..2410cd5 100644
--- a/ui/message-view.go
+++ b/ui/message-view.go
@@ -51,6 +51,7 @@ type MessageView struct {
// Used for locking
loadingMessages int32
+ historyLoadPtr uint64
_widestSender uint32
_prevWidestSender uint32
@@ -109,6 +110,7 @@ func (view *MessageView) Unload() {
view.ScrollOffset = 0
view._widestSender = 5
view.prevMsgCount = -1
+ view.historyLoadPtr = 0
view.messagesLock.Unlock()
view.msgBufferLock.Unlock()
view.messageIDLock.Unlock()