File tree Expand file tree Collapse file tree
Integration/ReactNative/Repository Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11{
22 "name" : " @onehat/data" ,
3- "version" : " 1.15.5 " ,
3+ "version" : " 1.15.6 " ,
44 "description" : " JS data modeling package with adapters for many storage mediums." ,
55 "main" : " src/index.js" ,
66 "type" : " module" ,
Original file line number Diff line number Diff line change @@ -207,7 +207,8 @@ class AsyncStorageRepository extends OfflineRepository {
207207 }
208208
209209 clearAll = async ( ) => {
210- return await this . load ( [ ] ) ;
210+ await this . load ( [ ] ) ;
211+ await this . clearLastSync ( ) ;
211212 }
212213
213214 getAllKeys = async ( ) => {
Original file line number Diff line number Diff line change @@ -407,6 +407,15 @@ class OfflineRepository extends MemoryRepository {
407407 await this . _storageSetValue ( LAST_SYNC , date ) ;
408408 }
409409
410+
411+ /**
412+ * Clears the date when this Repository was last synced with remote.
413+ * Used when this is the "local" side of a LocalFromRemoteRepository
414+ */
415+ clearLastSync = async ( ) => {
416+ await this . _storageDeleteValue ( LAST_SYNC ) ;
417+ }
418+
410419} ;
411420
412421OfflineRepository . className = 'Offline' ;
You can’t perform that action at this time.
0 commit comments