 	let database: Database
 	let delegate: AccountDelegate
 	var username: String?
-	var saveTimer: Timer?
+	static let saveQueue = CoalescingQueue(name: "Account Save Queue", interval: 1.0)
 
 	public var dirty = false {
 		didSet {
-
-			if refreshInProgress {
-				if let _ = saveTimer {
-					removeSaveTimer()
-				}
-				return
-			}
-
 			if dirty {
-				resetSaveTimer()
-			}
-			else {
-				removeSaveTimer()
+				Account.saveQueue.add(self, #selector(saveToDiskIfNeeded))
 			}
 		}
 	}

		return d as NSDictionary
	}

	func saveToDiskIfNeeded() {

		if !dirty {
			return
		}

		if refreshInProgress {
			resetSaveTimer()
			return
		}

		saveToDisk()
		dirty = false
	}

	func saveToDisk() {

		let d = diskDictionary()

		if let folder = note.object as? Folder, let folderAccount = folder.account, folderAccount === self {
			dirty = true
		}
	}

	@objc func saveToDiskIfNeeded() {

		guard dirty else {
			return
		}
		saveToDisk()
		dirty = false
	}

	// MARK: - Equatable
