mirror of https://github.com/anoshenko/rui.git
Bug fixing
This commit is contained in:
parent
5cb3841cf8
commit
c4dfba2796
|
@ -106,12 +106,12 @@ func (app *application) ServeHTTP(w http.ResponseWriter, req *http.Request) {
|
||||||
}
|
}
|
||||||
|
|
||||||
switch req.Method {
|
switch req.Method {
|
||||||
case "POST":
|
case http.MethodPost:
|
||||||
if req.URL.Path == "/" {
|
if req.URL.Path == "/" {
|
||||||
app.postHandler(w, req)
|
app.postHandler(w, req)
|
||||||
}
|
}
|
||||||
|
|
||||||
case "GET":
|
case http.MethodGet:
|
||||||
switch req.URL.Path {
|
switch req.URL.Path {
|
||||||
case "/":
|
case "/":
|
||||||
w.WriteHeader(http.StatusOK)
|
w.WriteHeader(http.StatusOK)
|
||||||
|
|
|
@ -67,7 +67,6 @@ func (listLayout *listLayoutData) init(session Session) {
|
||||||
listLayout.set = listLayout.setFunc
|
listLayout.set = listLayout.setFunc
|
||||||
listLayout.remove = listLayout.removeFunc
|
listLayout.remove = listLayout.removeFunc
|
||||||
listLayout.changed = listLayout.propertyChanged
|
listLayout.changed = listLayout.propertyChanged
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func normalizeListLayoutTag(tag PropertyName) PropertyName {
|
func normalizeListLayoutTag(tag PropertyName) PropertyName {
|
||||||
|
@ -115,9 +114,12 @@ func (listLayout *listLayoutData) removeFunc(tag PropertyName) []PropertyName {
|
||||||
return result
|
return result
|
||||||
|
|
||||||
case Content:
|
case Content:
|
||||||
listLayout.viewsContainerData.removeFunc(Content)
|
result := listLayout.viewsContainerData.removeFunc(Content)
|
||||||
listLayout.adapter = nil
|
if listLayout.adapter != nil {
|
||||||
return []PropertyName{Content}
|
listLayout.adapter = nil
|
||||||
|
return []PropertyName{Content}
|
||||||
|
}
|
||||||
|
return result
|
||||||
}
|
}
|
||||||
|
|
||||||
return listLayout.viewsContainerData.removeFunc(tag)
|
return listLayout.viewsContainerData.removeFunc(tag)
|
||||||
|
|
Loading…
Reference in New Issue