Skip to content

Commit 488f7c3

Browse files
author
Clément Le Provost
committed
[offline] Expose last successful sync date
1 parent ff0bc5e commit 488f7c3

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

ChangeLog.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
Change Log
22
==========
33

4+
## Next
5+
6+
### Offline mode
7+
8+
- Expose last successful sync date (property `MirroredIndex.lastSuccessfulSyncDate`)
9+
10+
411
## 3.5 (2016-07-29)
512

613
- New `multipleQueries()` method at index level

Source/Offline/MirroredIndex.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,11 @@ import Foundation
145145
/// Minimum delay between two syncs.
146146
@objc public var delayBetweenSyncs: NSTimeInterval = DefaultDelayBetweenSyncs
147147

148+
/// Date of the last successful sync, or nil if the index has never been successfully synced.
149+
@objc public var lastSuccessfulSyncDate: NSDate? {
150+
return mirrorSettings.lastSyncDate
151+
}
152+
148153
/// Error encountered by the current/last sync (if any).
149154
@objc public private(set) var syncError : NSError?
150155

0 commit comments

Comments
 (0)