addModalToMap adds a modal to the map and returns the result channel
(config rpctypes.ModalConfig)
| 420 | |
| 421 | // addModalToMap adds a modal to the map and returns the result channel |
| 422 | func (c *ClientImpl) addModalToMap(config rpctypes.ModalConfig) chan bool { |
| 423 | c.OpenModalsLock.Lock() |
| 424 | defer c.OpenModalsLock.Unlock() |
| 425 | |
| 426 | resultChan := make(chan bool, 1) |
| 427 | c.OpenModals[config.ModalId] = &ModalState{ |
| 428 | Config: config, |
| 429 | ResultChan: resultChan, |
| 430 | } |
| 431 | return resultChan |
| 432 | } |
| 433 | |
| 434 | // ShowModal displays a modal and returns a channel that will receive the result |
| 435 | func (c *ClientImpl) ShowModal(config rpctypes.ModalConfig) chan bool { |