I don't think this preview size selection logic should be in the `toggleMode` function. Can we move it inside the `configurePreviewSize` method somehow?