Skip to content

Commit

Permalink
Revert "Prevent the app from quitting while the Fire button is active" (
Browse files Browse the repository at this point in the history
#690)

Task/Issue URL: https://app.asana.com/0/1177771139624306/1202342287825730/f
Tech Design URL:
CC:

Description:

This PR reverts #670. We had reports of the Fire button getting stuck, and this change made it so that Command+Q no longer worked, confusing users. They were still able to quit via Force Quit, but this isn't clear to everybody.
  • Loading branch information
samsymons authored Aug 17, 2022
1 parent d6d395c commit f16aab2
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 14 deletions.
6 changes: 0 additions & 6 deletions DuckDuckGo/App Delegate/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -129,15 +129,9 @@ final class AppDelegate: NSObject, NSApplicationDelegate {
if alert.runModal() == .cancel {
return .terminateCancel
}

FileDownloadManager.shared.cancelAll(waitUntilDone: true)
DownloadListCoordinator.shared.sync()
}

if FireCoordinator.fireViewModel.isBurning {
return .terminateLater
}

stateRestorationManager?.applicationWillTerminate()

return .terminateNow
Expand Down
4 changes: 0 additions & 4 deletions DuckDuckGo/Fire/Model/Fire.swift
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,6 @@ final class Fire {
}
}

// swiftlint:disable function_body_length
func burnDomains(_ domains: Set<String>,
includingHistory: Bool = true,
completion: (() -> Void)? = nil) {
Expand Down Expand Up @@ -208,11 +207,9 @@ final class Fire {
completion?()

os_log("Fire finished", log: .fire)
NSApp.reply(toApplicationShouldTerminate: true)
}
}
}
// swiftlint:enable function_body_length

func burnAll(tabCollectionViewModel: TabCollectionViewModel, completion: (() -> Void)? = nil) {
os_log("Fire started", log: .fire)
Expand Down Expand Up @@ -258,7 +255,6 @@ final class Fire {
completion?()

os_log("Fire finished", log: .fire)
NSApp.reply(toApplicationShouldTerminate: true)
}
}
}
Expand Down
4 changes: 0 additions & 4 deletions DuckDuckGo/Fire/ViewModel/FireViewModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,6 @@ final class FireViewModel {

@Published var isAnimationPlaying = false

var isBurning: Bool {
fire.burningData != nil
}

/// Publisher that emits true if burning animation or burning process is in progress
var shouldPreventUserInteraction: AnyPublisher<Bool, Never> {
Publishers
Expand Down

0 comments on commit f16aab2

Please sign in to comment.