You're right. What I was thinking is we'll use hasPreviewMode to determine whether gallery has this new layout or not. I think we can remove one of these global variable now.