all: Refactor the protocol/model interface a bit (ref #8981) (#9007)

This commit is contained in:
Jakob Borg
2023-07-29 10:24:44 +02:00
committed by GitHub
parent b806026990
commit 9d21b91124
21 changed files with 431 additions and 359 deletions
+4 -4
View File
@@ -315,15 +315,15 @@ func (t *ProgressEmitter) emptyLocked() bool {
func (t *ProgressEmitter) temporaryIndexSubscribe(conn protocol.Connection, folders []string) {
t.mut.Lock()
defer t.mut.Unlock()
t.connections[conn.ID()] = conn
t.foldersByConns[conn.ID()] = folders
t.connections[conn.DeviceID()] = conn
t.foldersByConns[conn.DeviceID()] = folders
}
func (t *ProgressEmitter) temporaryIndexUnsubscribe(conn protocol.Connection) {
t.mut.Lock()
defer t.mut.Unlock()
delete(t.connections, conn.ID())
delete(t.foldersByConns, conn.ID())
delete(t.connections, conn.DeviceID())
delete(t.foldersByConns, conn.DeviceID())
}
func (t *ProgressEmitter) clearLocked() {