Add library categories and favorites
This commit is contained in:
1 parent
d749352333
commit
02bde7e644
9 files changed
+263
-21
No files matched your search
@@ -285,6 +285,12 @@ actual suspend fun markLibraryReadingStatus(fileId: String, status: BookReadingS
|
||||
}
|
||||
}
|
||||
|
||||
actual suspend fun markLibraryFavorite(fileId: String, favorite: Boolean): Boolean = withContext(Dispatchers.IO) {
|
||||
openLibraryDatabase().useLibrary { db ->
|
||||
db.files.updateFavorite(fileId, favorite)
|
||||
}
|
||||
}
|
||||
|
||||
actual suspend fun shareLibraryBookFile(fileId: String): Boolean = false
|
||||
|
||||
actual suspend fun viewLibraryBookFile(fileId: String): Boolean = withContext(Dispatchers.IO) {
|
||||
@@ -495,6 +501,7 @@ private fun LibraryFileRecord.toLibraryItem(): LibraryItem =
|
||||
storageUri = storageUri,
|
||||
lastSeenAt = lastSeenAt,
|
||||
readingStatus = readingStatus,
|
||||
favorite = favorite,
|
||||
lastReadAt = lastReadAt,
|
||||
importedAt = importedAt,
|
||||
)
|
||||
|
||||
Reference in new issue
Block a user