File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed
FlashSpace/Features/SpaceControl Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -146,8 +146,8 @@ enum SpaceControl {
146146 workspaces = workspaces. skipWithoutRunningApps ( )
147147 }
148148
149- if workspaces. count < 2 {
150- Alert . showOkAlert ( title: " Space Control " , message: " You need at least 2 workspaces to use Space Control. " )
149+ if workspaces. isEmpty {
150+ Alert . showOkAlert ( title: " Space Control " , message: " You need at least 1 workspace to use Space Control. " )
151151 return false
152152 }
153153
Original file line number Diff line number Diff line change @@ -140,6 +140,11 @@ final class SpaceControlViewModel: ObservableObject {
140140 let width = screenFrame. width / CGFloat( numberOfColumns) - 120.0
141141 let height = screenFrame. height / CGFloat( numberOfRows) - 120.0
142142
143+ guard workspaces. count > 1 else {
144+ tileSize = CGSize ( width: width / 2.0 , height: height / 2.0 )
145+ return
146+ }
147+
143148 let firstScreenshot = workspaces
144149 . lazy
145150 . compactMap { $0. screenshotData. flatMap ( NSImage . init ( data: ) ) }
You can’t perform that action at this time.
0 commit comments