background fetch running
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import 'package:copy_with_extension/copy_with_extension.dart';
|
||||
import 'package:drift/drift.dart';
|
||||
import 'package:fast_equatable/fast_equatable.dart';
|
||||
import 'package:json_annotation/json_annotation.dart';
|
||||
@@ -9,6 +10,7 @@ import 'package:lensai/features/web_feed/data/models/feed_link.dart';
|
||||
part 'feed_article.g.dart';
|
||||
|
||||
@JsonSerializable()
|
||||
@CopyWith()
|
||||
class FeedArticle with FastEquatable implements Insertable<FeedArticle> {
|
||||
final String id;
|
||||
final Uri feedId;
|
||||
@@ -20,13 +22,16 @@ class FeedArticle with FastEquatable implements Insertable<FeedArticle> {
|
||||
final List<FeedAuthor>? authors;
|
||||
final List<FeedCategory>? tags;
|
||||
final List<FeedLink>? links;
|
||||
final String? summaryHtml;
|
||||
final String? summaryMarkdown;
|
||||
final String? summaryPlain;
|
||||
final String? contentHtml;
|
||||
final String? contentMarkdown;
|
||||
final String? contentPlain;
|
||||
|
||||
//Derived by view from feed table, should not get inserted
|
||||
final Uri? icon;
|
||||
final Uri? siteLink;
|
||||
|
||||
FeedArticle({
|
||||
required this.id,
|
||||
@@ -39,11 +44,14 @@ class FeedArticle with FastEquatable implements Insertable<FeedArticle> {
|
||||
this.authors,
|
||||
this.tags,
|
||||
this.links,
|
||||
this.summaryHtml,
|
||||
this.summaryMarkdown,
|
||||
this.summaryPlain,
|
||||
this.contentHtml,
|
||||
this.contentMarkdown,
|
||||
this.contentPlain,
|
||||
this.icon,
|
||||
this.siteLink,
|
||||
});
|
||||
|
||||
factory FeedArticle.fromJson(Map<String, dynamic> json) =>
|
||||
@@ -82,12 +90,18 @@ class FeedArticle with FastEquatable implements Insertable<FeedArticle> {
|
||||
if (!nullToAbsent || links != null) {
|
||||
map['links'] = Variable<String>(Article.$converterlinksn.toSql(links));
|
||||
}
|
||||
if (!nullToAbsent || summaryHtml != null) {
|
||||
map['summaryHtml'] = Variable<String>(summaryHtml);
|
||||
}
|
||||
if (!nullToAbsent || summaryMarkdown != null) {
|
||||
map['summaryMarkdown'] = Variable<String>(summaryMarkdown);
|
||||
}
|
||||
if (!nullToAbsent || summaryPlain != null) {
|
||||
map['summaryPlain'] = Variable<String>(summaryPlain);
|
||||
}
|
||||
if (!nullToAbsent || contentHtml != null) {
|
||||
map['contentHtml'] = Variable<String>(contentHtml);
|
||||
}
|
||||
if (!nullToAbsent || contentMarkdown != null) {
|
||||
map['contentMarkdown'] = Variable<String>(contentMarkdown);
|
||||
}
|
||||
@@ -109,10 +123,13 @@ class FeedArticle with FastEquatable implements Insertable<FeedArticle> {
|
||||
authors,
|
||||
tags,
|
||||
links,
|
||||
summaryHtml,
|
||||
summaryMarkdown,
|
||||
summaryPlain,
|
||||
contentHtml,
|
||||
contentMarkdown,
|
||||
contentPlain,
|
||||
icon,
|
||||
siteLink,
|
||||
];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user