Преглед на файлове

remove superfluous stopThreads() indirection

B. Petersen преди 4 години
родител
ревизия
1ad45c31b8
променени са 2 файла, в които са добавени 2 реда и са изтрити 6 реда
  1. 1 5
      deltachat-ios/AppDelegate.swift
  2. 1 1
      deltachat-ios/Controller/AccountSetupController.swift

+ 1 - 5
deltachat-ios/AppDelegate.swift

@@ -143,7 +143,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
                 // only need to do sth in the background
                 return
             } else if app.backgroundTimeRemaining < 10 {
-                self.stopThreads()
+                self.dcContext.stopIo()
             } else {
                 self.maybeStop()
             }
@@ -238,10 +238,6 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
         }
     }
 
-    func stopThreads() {
-        dcContext.stopIo()
-    }
-
     // MARK: - BackgroundTask
 
     private func registerBackgroundTask() {

+ 1 - 1
deltachat-ios/Controller/AccountSetupController.swift

@@ -761,7 +761,7 @@ class AccountSetupController: UITableViewController, ProgressAlertHandler {
             preferredStyle: .safeActionSheet)
 
         alert.addAction(UIAlertAction(title: String.localized("delete_account"), style: .destructive, handler: { _ in
-            appDelegate.stopThreads()
+            self.dcContext.stopIo()
             appDelegate.closeDatabase()
             DatabaseHelper().clearAccountData()
             appDelegate.openDatabase()