Fix ViewMode related bugs:
- The user will no longer lost their 'ViewMode' option after being updated in the settings. - The console will not output errors due tot he scroll function when Mosaic mode is on.
This commit is contained in:
1 parent
cc5f3ac1dd
commit
51104c5ee7
7 files changed
+290
-2612
No files matched your search
@@ -160,6 +160,11 @@ func usersPostHandler(c *fm.Context, w http.ResponseWriter, r *http.Request) (in
|
||||
u.Rules = []*fm.Rule{}
|
||||
}
|
||||
|
||||
// If the view mode is empty, initialize with the default one.
|
||||
if u.ViewMode == "" {
|
||||
u.ViewMode = c.DefaultUser.ViewMode
|
||||
}
|
||||
|
||||
// Initialize commands if not initialized.
|
||||
if u.Commands == nil {
|
||||
u.Commands = []string{}
|
||||
|
||||
Reference in new issue
Block a user