mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
Fetch all label and highlight info when doing library updates
This commit is contained in:
parent
4b87f1dd20
commit
52f302f5b0
4 changed files with 10 additions and 16 deletions
|
|
@ -22,13 +22,10 @@ query Search($after: String, $first: Int, $query: String) {
|
|||
originalArticleUrl
|
||||
uploadFileId
|
||||
labels {
|
||||
id
|
||||
name
|
||||
color
|
||||
...LabelFields
|
||||
}
|
||||
highlights {
|
||||
id
|
||||
type
|
||||
...HighlightFields
|
||||
}
|
||||
pageId
|
||||
shortId
|
||||
|
|
|
|||
|
|
@ -24,13 +24,10 @@ query UpdatesSince($after: String, $first: Int, $since: Date!) {
|
|||
originalArticleUrl
|
||||
uploadFileId
|
||||
labels {
|
||||
id
|
||||
name
|
||||
color
|
||||
...LabelFields
|
||||
}
|
||||
highlights {
|
||||
id
|
||||
type
|
||||
...HighlightFields
|
||||
}
|
||||
pageId
|
||||
shortId
|
||||
|
|
|
|||
|
|
@ -76,9 +76,9 @@ suspend fun DataService.sync(since: String, cursor: String?, limit: Int = 20): S
|
|||
for (item in syncResult.items) {
|
||||
val itemLabels = (item.labels ?: listOf()).map {
|
||||
SavedItemLabel(
|
||||
savedItemLabelId = it.id,
|
||||
name = it.name,
|
||||
color = it.color,
|
||||
savedItemLabelId = it.labelFields.id,
|
||||
name = it.labelFields.name,
|
||||
color = it.labelFields.color,
|
||||
createdAt = null,
|
||||
labelDescription = null
|
||||
)
|
||||
|
|
|
|||
|
|
@ -91,9 +91,9 @@ suspend fun Networker.search(
|
|||
),
|
||||
labels = (it.node.labels ?: listOf()).map { label ->
|
||||
SavedItemLabel(
|
||||
savedItemLabelId = label.id,
|
||||
name = label.name,
|
||||
color = label.color,
|
||||
savedItemLabelId = label.labelFields.id,
|
||||
name = label.labelFields.name,
|
||||
color = label.labelFields.color,
|
||||
createdAt = null,
|
||||
labelDescription = null
|
||||
)
|
||||
|
|
|
|||
Loading…
Reference in a new issue