* Release all chats owned by a window (called on window close).
(electronId: number)
| 177 | * Release all chats owned by a window (called on window close). |
| 178 | */ |
| 179 | releaseAllChats(electronId: number): void { |
| 180 | for (const [chatId, owner] of this.chatOwnership.entries()) { |
| 181 | if (owner === electronId) { |
| 182 | this.chatOwnership.delete(chatId) |
| 183 | } |
| 184 | } |
| 185 | } |
| 186 | |
| 187 | /** |
| 188 | * Focus the window that owns a given chatId. |