瀏覽代碼

unconditionally invalidate timer in stopTimer()

cyberta 4 年之前
父節點
當前提交
a12dbefbbd
共有 1 個文件被更改,包括 1 次插入3 次删除
  1. 1 3
      deltachat-ios/Chat/ChatViewController.swift

+ 1 - 3
deltachat-ios/Chat/ChatViewController.swift

@@ -295,9 +295,7 @@ class ChatViewController: UITableViewController {
 
     private func stopTimer() {
         if let timer = timer {
-            if timer.isValid {
-                timer.invalidate()
-            }
+            timer.invalidate()
         }
         timer = nil
     }