mirror of
https://github.com/qvacua/vimr.git
synced 2024-11-30 08:42:18 +03:00
Fix closing logic for temporary sessions
This commit is contained in:
parent
8b6c7170fe
commit
6ee4b74b45
@ -81,15 +81,23 @@ class UiRootReducer: ReducerType {
|
||||
|
||||
case .close:
|
||||
if appState.mainWindows[uuid]?.isTemporarySession == true {
|
||||
if appState.currentMainWindowUuid == uuid {
|
||||
appState.currentMainWindowUuid = nil
|
||||
}
|
||||
appState.mainWindows.removeValue(forKey: uuid)
|
||||
|
||||
break
|
||||
}
|
||||
|
||||
if appState.currentMainWindowUuid == uuid, let mainWindowToClose = appState.mainWindows[uuid] {
|
||||
appState.mainWindowTemplate = self.mainWindowTemplate(from: appState.mainWindowTemplate,
|
||||
new: mainWindowToClose,
|
||||
isFullScreen: false)
|
||||
if appState.currentMainWindowUuid == uuid,
|
||||
let mainWindowToClose = appState.mainWindows[uuid] {
|
||||
|
||||
appState.currentMainWindowUuid = nil
|
||||
appState.mainWindowTemplate = self.mainWindowTemplate(
|
||||
from: appState.mainWindowTemplate,
|
||||
new: mainWindowToClose,
|
||||
isFullScreen: false
|
||||
)
|
||||
}
|
||||
|
||||
appState.mainWindows.removeValue(forKey: uuid)
|
||||
|
Loading…
Reference in New Issue
Block a user