Bug fixing

This commit is contained in:
Alexei Anoshenko 2024-11-22 15:36:08 +02:00
parent e8da32fca8
commit 31c07ced98
1 changed files with 5 additions and 5 deletions

View File

@ -80,14 +80,14 @@ func (layout *stackLayoutData) init(session Session) {
layout.viewsContainerData.init(session) layout.viewsContainerData.init(session)
layout.tag = "StackLayout" layout.tag = "StackLayout"
layout.systemClass = "ruiStackLayout" layout.systemClass = "ruiStackLayout"
layout.properties[TransitionEndEvent] = []func(View, string){layout.pushFinished, layout.popFinished} layout.properties[TransitionEndEvent] = []func(View, PropertyName){layout.pushFinished, layout.popFinished}
layout.get = layout.getFunc layout.get = layout.getFunc
layout.set = layout.setFunc layout.set = layout.setFunc
layout.remove = layout.removeFunc layout.remove = layout.removeFunc
layout.changed = layout.propertyChanged layout.changed = layout.propertyChanged
} }
func (layout *stackLayoutData) pushFinished(view View, tag string) { func (layout *stackLayoutData) pushFinished(view View, tag PropertyName) {
if tag == "ruiPush" { if tag == "ruiPush" {
if layout.pushView != nil { if layout.pushView != nil {
layout.pushView = nil layout.pushView = nil
@ -109,7 +109,7 @@ func (layout *stackLayoutData) pushFinished(view View, tag string) {
} }
} }
func (layout *stackLayoutData) popFinished(view View, tag string) { func (layout *stackLayoutData) popFinished(view View, tag PropertyName) {
if tag == "ruiPop" { if tag == "ruiPop" {
popView := layout.popView popView := layout.popView
layout.popView = nil layout.popView = nil
@ -125,7 +125,7 @@ func (layout *stackLayoutData) popFinished(view View, tag string) {
func (layout *stackLayoutData) setFunc(tag PropertyName, value any) []PropertyName { func (layout *stackLayoutData) setFunc(tag PropertyName, value any) []PropertyName {
switch tag { switch tag {
case TransitionEndEvent: case TransitionEndEvent:
listeners, ok := valueToOneArgEventListeners[View, string](value) listeners, ok := valueToOneArgEventListeners[View, PropertyName](value)
if ok && listeners != nil { if ok && listeners != nil {
listeners = append(listeners, layout.pushFinished) listeners = append(listeners, layout.pushFinished)
listeners = append(listeners, layout.popFinished) listeners = append(listeners, layout.popFinished)
@ -192,7 +192,7 @@ func (layout *stackLayoutData) propertyChanged(tag PropertyName) {
func (layout *stackLayoutData) removeFunc(tag PropertyName) []PropertyName { func (layout *stackLayoutData) removeFunc(tag PropertyName) []PropertyName {
switch tag { switch tag {
case TransitionEndEvent: case TransitionEndEvent:
layout.setRaw(TransitionEndEvent, []func(View, string){layout.pushFinished, layout.popFinished}) layout.setRaw(TransitionEndEvent, []func(View, PropertyName){layout.pushFinished, layout.popFinished})
return []PropertyName{tag} return []PropertyName{tag}
case Current: case Current: