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
This commit is contained in:
Tulir Asokan
2020-05-10 02:28:32 +03:00
parent 4e2cbf1e4f
commit 2cebe3b5dc
5 changed files with 34 additions and 28 deletions

View File

@ -55,7 +55,7 @@ type MatrixContainer interface {
CreateRoom(req *mautrix.ReqCreateRoom) (*rooms.Room, error)
FetchMembers(room *rooms.Room) error
GetHistory(room *rooms.Room, limit int) ([]*muksevt.Event, error)
GetHistory(room *rooms.Room, limit int, dbPointer uint64) ([]*muksevt.Event, uint64, error)
GetEvent(room *rooms.Room, eventID id.EventID) (*muksevt.Event, error)
GetRoom(roomID id.RoomID) *rooms.Room
GetOrCreateRoom(roomID id.RoomID) *rooms.Room