Fix the view panel's wrong height after resizing
Fix an empty gallery when loading or changing view type