upsertPhoto method

  1. @override
Future<ArticlePhoto> upsertPhoto(
  1. ArticlePhoto data, {
  2. bool isInternetAvailable = true,
})
inherited

when a photo is upsert, automatically the article is updated, this sparks a calibre sync or add the calibreId in offline queue we delete and create photo, bit more costly but much much more simple for calibrePhoto use article.id = 0

Implementation

@override
Future<ArticlePhoto> upsertPhoto(ArticlePhoto data, {bool isInternetAvailable = true}) {
  return _$upsertPhotoAsyncAction.run(() => super.upsertPhoto(data, isInternetAvailable:isInternetAvailable));
}