mirror of
https://github.com/advplyr/audiobookshelf-app.git
synced 2026-08-25 21:04:02 +02:00
Persist bookshelf list view setting, fix collections for new data model, add authors cards, update filters
This commit is contained in:
@@ -59,6 +59,25 @@ class LocalStorage {
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
async setBookshelfListView(useIt) {
|
||||
try {
|
||||
await Storage.set({ key: 'bookshelfListView', value: useIt ? '1' : '0' })
|
||||
this.getBookshelfListView()
|
||||
} catch (error) {
|
||||
console.error('[LocalStorage] Failed to set bookshelf list view', error)
|
||||
}
|
||||
}
|
||||
|
||||
async getBookshelfListView() {
|
||||
try {
|
||||
var obj = await Storage.get({ key: 'bookshelfListView' }) || {}
|
||||
return obj.value === '1'
|
||||
} catch (error) {
|
||||
console.error('[LocalStorage] Failed to get bookshelf list view', error)
|
||||
return false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user