mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
respond to articleMutations within js for android calls only
This commit is contained in:
parent
643ba33bfd
commit
99ec98095e
3 changed files with 25 additions and 3 deletions
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -23,7 +23,29 @@ const mutation = async (name, input) => {
|
|||
name,
|
||||
JSON.stringify(input)
|
||||
)
|
||||
return true // TODO: see if we can get a result from Android instead
|
||||
|
||||
// TODO: handle errors
|
||||
switch (name) {
|
||||
case 'createHighlight':
|
||||
return input
|
||||
case 'deleteHighlight':
|
||||
return true
|
||||
case 'mergeHighlight':
|
||||
return {
|
||||
id: input['id'],
|
||||
shortID: input['shortId'],
|
||||
quote: input['quote'],
|
||||
patch: input['patch'],
|
||||
createdByMe: true,
|
||||
labels: [],
|
||||
}
|
||||
case 'updateHighlight':
|
||||
return true
|
||||
case 'articleReadingProgress':
|
||||
return true
|
||||
default:
|
||||
return true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue