refactor(ui/chat): align attachments picker layer naming
This commit is contained in:
parent
89639247a8
commit
aae782fb3c
3 changed files with 9 additions and 8 deletions
|
|
@ -46,7 +46,7 @@ func (ap *attachmentsPicker) SetItems(items []attachmentItem) {
|
|||
}
|
||||
|
||||
func (ap *attachmentsPicker) close() {
|
||||
ap.chatView.RemoveLayer(attachmentsListLayerName)
|
||||
ap.chatView.RemoveLayer(attachmentsPickerLayerName)
|
||||
ap.chatView.app.SetFocus(ap.chatView.messagesList)
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1171,12 +1171,12 @@ func (ml *messagesList) showAttachmentsList(urls []string, attachments []discord
|
|||
ml.chatView.
|
||||
AddLayer(
|
||||
ui.Centered(ml.attachmentsPicker, ml.cfg.Picker.Width, ml.cfg.Picker.Height),
|
||||
layers.WithName(attachmentsListLayerName),
|
||||
layers.WithName(attachmentsPickerLayerName),
|
||||
layers.WithResize(true),
|
||||
layers.WithVisible(true),
|
||||
layers.WithOverlay(),
|
||||
).
|
||||
SendToFront(attachmentsListLayerName)
|
||||
SendToFront(attachmentsPickerLayerName)
|
||||
ml.chatView.app.SetFocus(ml.attachmentsPicker)
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -29,11 +29,12 @@ import (
|
|||
const typingDuration = 10 * time.Second
|
||||
|
||||
const (
|
||||
flexLayerName = "flex"
|
||||
mentionsListLayerName = "mentionsList"
|
||||
attachmentsListLayerName = "attachmentsList"
|
||||
confirmModalLayerName = "confirmModal"
|
||||
channelsPickerLayerName = "channelsPicker"
|
||||
flexLayerName = "flex"
|
||||
mentionsListLayerName = "mentionsList"
|
||||
confirmModalLayerName = "confirmModal"
|
||||
|
||||
channelsPickerLayerName = "channelsPicker"
|
||||
attachmentsPickerLayerName = "attachmentsPicker"
|
||||
)
|
||||
|
||||
type Model struct {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue