save and restore viewType(grid, list)