removeModalFromMap removes a modal from the map and returns its state
(modalId string)
| 454 | |
| 455 | // removeModalFromMap removes a modal from the map and returns its state |
| 456 | func (c *ClientImpl) removeModalFromMap(modalId string) *ModalState { |
| 457 | c.OpenModalsLock.Lock() |
| 458 | defer c.OpenModalsLock.Unlock() |
| 459 | |
| 460 | modalState, exists := c.OpenModals[modalId] |
| 461 | if exists { |
| 462 | delete(c.OpenModals, modalId) |
| 463 | } |
| 464 | return modalState |
| 465 | } |
| 466 | |
| 467 | // CloseModal closes a modal with the given result |
| 468 | func (c *ClientImpl) CloseModal(modalId string, result bool) { |