@@ -19,7 +19,7 @@ export default class NativeTree extends CachingAdapter implements BulkImportReso
1919 }
2020
2121 // Load cached hash from persistent storage
22- async loadCachedHash ( ) {
22+ /* async loadCachedHash() {
2323 try {
2424 console.log("[NativeTree/loadCachedHash] load start")
2525 const { value: persistedHash } = await Storage.get({ key: `bookmarks[${this.accountId}].treeHash` })
@@ -38,10 +38,11 @@ export default class NativeTree extends CachingAdapter implements BulkImportReso
3838 console.log("[NativeTree/loadCachedHash] Failed, error")
3939 console.warn('Failed to load persisted hash, continuing without it', err)
4040 }
41- }
41+ }*/
4242
4343 // loads the bookmarkTree from file, and parse it with JSON.parse(). This is where the android app is getting slow at launch
44- async load ( skipHash ?: boolean ) :Promise < boolean > {
44+ async load ( skipHash : boolean = false ) :Promise < boolean > {
45+ console . log ( "[DebugLog_NativeTree/load()]" )
4546 const { value : tree } = await Storage . get ( { key : `bookmarks[${ this . accountId } ].tree` } )
4647 const { value : highestId } = await Storage . get ( { key : `bookmarks[${ this . accountId } ].highestId` } )
4748
@@ -67,6 +68,7 @@ export default class NativeTree extends CachingAdapter implements BulkImportReso
6768 }
6869
6970 async save ( ) :Promise < void > {
71+ console . log ( "[DebugLog_NativeTree/save()]" )
7072 await Storage . set ( { key : `bookmarks[${ this . accountId } ].tree` , value : JSON . stringify ( await this . bookmarksCache . cloneWithLocation ( true , ItemLocation . LOCAL ) . toJSONAsync ( ) ) } )
7173 await Storage . set ( { key : `bookmarks[${ this . accountId } ].highestId` , value : this . highestId + '' } )
7274 }
@@ -79,6 +81,7 @@ export default class NativeTree extends CachingAdapter implements BulkImportReso
7981 }
8082
8183 async getBookmarksTree ( ) : Promise < Folder < typeof ItemLocation . LOCAL > > {
84+ console . log ( "[DebugLog_NativeTree/getBookmarksTree()]" )
8285 const tree = await super . getBookmarksTree ( )
8386 tree . createIndex ( )
8487 return tree as Folder < typeof ItemLocation . LOCAL >
0 commit comments