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 {
|
||||
case "POST":
|
||||
case http.MethodPost:
|
||||
if req.URL.Path == "/" {
|
||||
app.postHandler(w, req)
|
||||
}
|
||||
|
||||
case "GET":
|
||||
case http.MethodGet:
|
||||
switch req.URL.Path {
|
||||
case "/":
|
||||
w.WriteHeader(http.StatusOK)
|
||||
|
|
|
@ -67,7 +67,6 @@ func (listLayout *listLayoutData) init(session Session) {
|
|||
listLayout.set = listLayout.setFunc
|
||||
listLayout.remove = listLayout.removeFunc
|
||||
listLayout.changed = listLayout.propertyChanged
|
||||
|
||||
}
|
||||
|
||||
func normalizeListLayoutTag(tag PropertyName) PropertyName {
|
||||
|
@ -115,9 +114,12 @@ func (listLayout *listLayoutData) removeFunc(tag PropertyName) []PropertyName {
|
|||
return result
|
||||
|
||||
case Content:
|
||||
listLayout.viewsContainerData.removeFunc(Content)
|
||||
listLayout.adapter = nil
|
||||
return []PropertyName{Content}
|
||||
result := listLayout.viewsContainerData.removeFunc(Content)
|
||||
if listLayout.adapter != nil {
|
||||
listLayout.adapter = nil
|
||||
return []PropertyName{Content}
|
||||
}
|
||||
return result
|
||||
}
|
||||
|
||||
return listLayout.viewsContainerData.removeFunc(tag)
|
||||
|
|
Loading…
Reference in New Issue