Bug fixing

Fixed ShowMenu error message
This commit is contained in:
anoshenko 2021-12-08 18:26:46 +03:00
parent 89cd7104eb
commit 17ba035c09
1 changed files with 13 additions and 1 deletions

View File

@ -167,7 +167,19 @@ func ShowMenu(session Session, params Params) Popup {
Orientation: TopDownOrientation,
ListItemClickedEvent: data.itemClick,
})
data.popup = NewPopup(listView, params)
popupParams := Params{}
for tag, value := range params {
switch tag {
case Items, PopupMenuResult:
// do nothing
default:
popupParams[tag] = value
}
}
data.popup = NewPopup(listView, popupParams)
data.popup.Show()
FocusView(listView)
return data.popup