upgrade min sdk; run formatter
This commit is contained in:
@@ -14,8 +14,7 @@ String _$lightSeedColorFallbackHash() =>
|
|||||||
final lightSeedColorFallbackProvider = Provider<Color>.internal(
|
final lightSeedColorFallbackProvider = Provider<Color>.internal(
|
||||||
lightSeedColorFallback,
|
lightSeedColorFallback,
|
||||||
name: r'lightSeedColorFallbackProvider',
|
name: r'lightSeedColorFallbackProvider',
|
||||||
debugGetCreateSourceHash:
|
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||||
const bool.fromEnvironment('dart.vm.product')
|
|
||||||
? null
|
? null
|
||||||
: _$lightSeedColorFallbackHash,
|
: _$lightSeedColorFallbackHash,
|
||||||
dependencies: null,
|
dependencies: null,
|
||||||
@@ -33,8 +32,7 @@ String _$darkSeedColorFallbackHash() =>
|
|||||||
final darkSeedColorFallbackProvider = Provider<Color>.internal(
|
final darkSeedColorFallbackProvider = Provider<Color>.internal(
|
||||||
darkSeedColorFallback,
|
darkSeedColorFallback,
|
||||||
name: r'darkSeedColorFallbackProvider',
|
name: r'darkSeedColorFallbackProvider',
|
||||||
debugGetCreateSourceHash:
|
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||||
const bool.fromEnvironment('dart.vm.product')
|
|
||||||
? null
|
? null
|
||||||
: _$darkSeedColorFallbackHash,
|
: _$darkSeedColorFallbackHash,
|
||||||
dependencies: null,
|
dependencies: null,
|
||||||
|
|||||||
@@ -13,8 +13,9 @@ String _$formatHash() => r'fe7fcdd19b512784a36f3838c57701030475e429';
|
|||||||
final formatProvider = AsyncNotifierProvider<Format, void>.internal(
|
final formatProvider = AsyncNotifierProvider<Format, void>.internal(
|
||||||
Format.new,
|
Format.new,
|
||||||
name: r'formatProvider',
|
name: r'formatProvider',
|
||||||
debugGetCreateSourceHash:
|
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||||
const bool.fromEnvironment('dart.vm.product') ? null : _$formatHash,
|
? null
|
||||||
|
: _$formatHash,
|
||||||
dependencies: null,
|
dependencies: null,
|
||||||
allTransitiveDependencies: null,
|
allTransitiveDependencies: null,
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -14,8 +14,7 @@ final willAcceptDropProvider =
|
|||||||
AutoDisposeNotifierProvider<WillAcceptDrop, DropTargetData?>.internal(
|
AutoDisposeNotifierProvider<WillAcceptDrop, DropTargetData?>.internal(
|
||||||
WillAcceptDrop.new,
|
WillAcceptDrop.new,
|
||||||
name: r'willAcceptDropProvider',
|
name: r'willAcceptDropProvider',
|
||||||
debugGetCreateSourceHash:
|
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||||
const bool.fromEnvironment('dart.vm.product')
|
|
||||||
? null
|
? null
|
||||||
: _$willAcceptDropHash,
|
: _$willAcceptDropHash,
|
||||||
dependencies: null,
|
dependencies: null,
|
||||||
|
|||||||
@@ -13,8 +13,9 @@ String _$routerHash() => r'25fc899b87c080600f6e1d87d510db333378bdfd';
|
|||||||
final routerProvider = Provider<GoRouter>.internal(
|
final routerProvider = Provider<GoRouter>.internal(
|
||||||
router,
|
router,
|
||||||
name: r'routerProvider',
|
name: r'routerProvider',
|
||||||
debugGetCreateSourceHash:
|
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||||
const bool.fromEnvironment('dart.vm.product') ? null : _$routerHash,
|
? null
|
||||||
|
: _$routerHash,
|
||||||
dependencies: null,
|
dependencies: null,
|
||||||
allTransitiveDependencies: null,
|
allTransitiveDependencies: null,
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -64,8 +64,7 @@ class BangSearchRoute extends GoRouteData {
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context, GoRouterState state) {
|
Widget build(BuildContext context, GoRouterState state) {
|
||||||
return BangSearchScreen(
|
return BangSearchScreen(
|
||||||
initialSearchText:
|
initialSearchText: (searchText.isEmpty || searchText == emptySearchText)
|
||||||
(searchText.isEmpty || searchText == emptySearchText)
|
|
||||||
? null
|
? null
|
||||||
: searchText,
|
: searchText,
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -72,8 +72,7 @@ class SearchRoute extends GoRouteData {
|
|||||||
Widget build(BuildContext context, GoRouterState state) {
|
Widget build(BuildContext context, GoRouterState state) {
|
||||||
return SearchScreen(
|
return SearchScreen(
|
||||||
tabType: tabType,
|
tabType: tabType,
|
||||||
initialSearchText:
|
initialSearchText: (searchText.isEmpty || searchText == emptySearchText)
|
||||||
(searchText.isEmpty || searchText == emptySearchText)
|
|
||||||
? null
|
? null
|
||||||
: searchText,
|
: searchText,
|
||||||
);
|
);
|
||||||
@@ -124,8 +123,8 @@ class ContextMenuRoute extends GoRouteData {
|
|||||||
@override
|
@override
|
||||||
Page<void> buildPage(BuildContext context, GoRouterState state) {
|
Page<void> buildPage(BuildContext context, GoRouterState state) {
|
||||||
return DialogPage(
|
return DialogPage(
|
||||||
builder:
|
builder: (_) =>
|
||||||
(_) => ContextMenuDialog(hitResult: HitResultJson.fromJson($extra)),
|
ContextMenuDialog(hitResult: HitResultJson.fromJson($extra)),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -61,23 +61,19 @@ class _$WebPageInfoCWProxyImpl implements _$WebPageInfoCWProxy {
|
|||||||
Object? feeds = const $CopyWithPlaceholder(),
|
Object? feeds = const $CopyWithPlaceholder(),
|
||||||
}) {
|
}) {
|
||||||
return WebPageInfo(
|
return WebPageInfo(
|
||||||
url:
|
url: url == const $CopyWithPlaceholder()
|
||||||
url == const $CopyWithPlaceholder()
|
|
||||||
? _value.url
|
? _value.url
|
||||||
// ignore: cast_nullable_to_non_nullable
|
// ignore: cast_nullable_to_non_nullable
|
||||||
: url as Uri,
|
: url as Uri,
|
||||||
title:
|
title: title == const $CopyWithPlaceholder()
|
||||||
title == const $CopyWithPlaceholder()
|
|
||||||
? _value.title
|
? _value.title
|
||||||
// ignore: cast_nullable_to_non_nullable
|
// ignore: cast_nullable_to_non_nullable
|
||||||
: title as String?,
|
: title as String?,
|
||||||
favicon:
|
favicon: favicon == const $CopyWithPlaceholder()
|
||||||
favicon == const $CopyWithPlaceholder()
|
|
||||||
? _value.favicon
|
? _value.favicon
|
||||||
// ignore: cast_nullable_to_non_nullable
|
// ignore: cast_nullable_to_non_nullable
|
||||||
: favicon as BrowserIcon?,
|
: favicon as BrowserIcon?,
|
||||||
feeds:
|
feeds: feeds == const $CopyWithPlaceholder()
|
||||||
feeds == const $CopyWithPlaceholder()
|
|
||||||
? _value.feeds
|
? _value.feeds
|
||||||
// ignore: cast_nullable_to_non_nullable
|
// ignore: cast_nullable_to_non_nullable
|
||||||
: feeds as Set<Uri>?,
|
: feeds as Set<Uri>?,
|
||||||
|
|||||||
@@ -11,14 +11,14 @@ String _$appInitializationServiceHash() =>
|
|||||||
|
|
||||||
/// See also [AppInitializationService].
|
/// See also [AppInitializationService].
|
||||||
@ProviderFor(AppInitializationService)
|
@ProviderFor(AppInitializationService)
|
||||||
final appInitializationServiceProvider = NotifierProvider<
|
final appInitializationServiceProvider =
|
||||||
|
NotifierProvider<
|
||||||
AppInitializationService,
|
AppInitializationService,
|
||||||
Result<({bool initialized, String? stage, List<ErrorMessage> errors})>
|
Result<({bool initialized, String? stage, List<ErrorMessage> errors})>
|
||||||
>.internal(
|
>.internal(
|
||||||
AppInitializationService.new,
|
AppInitializationService.new,
|
||||||
name: r'appInitializationServiceProvider',
|
name: r'appInitializationServiceProvider',
|
||||||
debugGetCreateSourceHash:
|
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||||
const bool.fromEnvironment('dart.vm.product')
|
|
||||||
? null
|
? null
|
||||||
: _$appInitializationServiceHash,
|
: _$appInitializationServiceHash,
|
||||||
dependencies: null,
|
dependencies: null,
|
||||||
|
|||||||
@@ -37,8 +37,10 @@ const _typeMap = {
|
|||||||
|
|
||||||
Iterable<ResourceSize> sizesToList(String? sizes) sync* {
|
Iterable<ResourceSize> sizesToList(String? sizes) sync* {
|
||||||
if (sizes != null) {
|
if (sizes != null) {
|
||||||
final splitted =
|
final splitted = sizes
|
||||||
sizes.split(' ').where((size) => size.contains('x')).toList();
|
.split(' ')
|
||||||
|
.where((size) => size.contains('x'))
|
||||||
|
.toList();
|
||||||
|
|
||||||
for (final size in splitted) {
|
for (final size in splitted) {
|
||||||
final dimensions = size.split('x');
|
final dimensions = size.split('x');
|
||||||
@@ -87,8 +89,7 @@ class GenericWebsiteService extends _$GenericWebsiteService {
|
|||||||
url: resource['url'] as String,
|
url: resource['url'] as String,
|
||||||
type: resource['type'] as IconType,
|
type: resource['type'] as IconType,
|
||||||
mimeType: resource['mimeType'] as String?,
|
mimeType: resource['mimeType'] as String?,
|
||||||
sizes:
|
sizes: (resource['sizes'] as List<List<int>>)
|
||||||
(resource['sizes'] as List<List<int>>)
|
|
||||||
.map((s) => ResourceSize(height: s[0], width: s[1]))
|
.map((s) => ResourceSize(height: s[0], width: s[1]))
|
||||||
.toList(),
|
.toList(),
|
||||||
maskable: resource['maskable'] as bool,
|
maskable: resource['maskable'] as bool,
|
||||||
@@ -211,8 +212,10 @@ class GenericWebsiteService extends _$GenericWebsiteService {
|
|||||||
|
|
||||||
final title = document.querySelector('title')?.text;
|
final title = document.querySelector('title')?.text;
|
||||||
final resources = _extractIcons(baseUri, document);
|
final resources = _extractIcons(baseUri, document);
|
||||||
final feeds =
|
final feeds = await FeedFinder(
|
||||||
await FeedFinder(url: baseUri, document: document).parse();
|
url: baseUri,
|
||||||
|
document: document,
|
||||||
|
).parse();
|
||||||
|
|
||||||
return {
|
return {
|
||||||
'title': title,
|
'title': title,
|
||||||
@@ -235,8 +238,7 @@ class GenericWebsiteService extends _$GenericWebsiteService {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
final resources =
|
final resources = (result['resources']! as List<Map<String, dynamic>>)
|
||||||
(result['resources']! as List<Map<String, dynamic>>)
|
|
||||||
.map(_deserializeResource)
|
.map(_deserializeResource)
|
||||||
.toList();
|
.toList();
|
||||||
|
|
||||||
|
|||||||
@@ -15,8 +15,7 @@ final genericWebsiteServiceProvider =
|
|||||||
NotifierProvider<GenericWebsiteService, void>.internal(
|
NotifierProvider<GenericWebsiteService, void>.internal(
|
||||||
GenericWebsiteService.new,
|
GenericWebsiteService.new,
|
||||||
name: r'genericWebsiteServiceProvider',
|
name: r'genericWebsiteServiceProvider',
|
||||||
debugGetCreateSourceHash:
|
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||||
const bool.fromEnvironment('dart.vm.product')
|
|
||||||
? null
|
? null
|
||||||
: _$genericWebsiteServiceHash,
|
: _$genericWebsiteServiceHash,
|
||||||
dependencies: null,
|
dependencies: null,
|
||||||
|
|||||||
@@ -13,8 +13,9 @@ String _$packageInfoHash() => r'cc57db7b4684ab0d5df0f050b8ea045a3658e89a';
|
|||||||
final packageInfoProvider = FutureProvider<PackageInfo>.internal(
|
final packageInfoProvider = FutureProvider<PackageInfo>.internal(
|
||||||
packageInfo,
|
packageInfo,
|
||||||
name: r'packageInfoProvider',
|
name: r'packageInfoProvider',
|
||||||
debugGetCreateSourceHash:
|
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||||
const bool.fromEnvironment('dart.vm.product') ? null : _$packageInfoHash,
|
? null
|
||||||
|
: _$packageInfoHash,
|
||||||
dependencies: null,
|
dependencies: null,
|
||||||
allTransitiveDependencies: null,
|
allTransitiveDependencies: null,
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -13,8 +13,7 @@ String _$widgetPinnableHash() => r'f91041f0f051ad0f00dd765cafea5571ca8c8088';
|
|||||||
final widgetPinnableProvider = FutureProvider<bool>.internal(
|
final widgetPinnableProvider = FutureProvider<bool>.internal(
|
||||||
widgetPinnable,
|
widgetPinnable,
|
||||||
name: r'widgetPinnableProvider',
|
name: r'widgetPinnableProvider',
|
||||||
debugGetCreateSourceHash:
|
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||||
const bool.fromEnvironment('dart.vm.product')
|
|
||||||
? null
|
? null
|
||||||
: _$widgetPinnableHash,
|
: _$widgetPinnableHash,
|
||||||
dependencies: null,
|
dependencies: null,
|
||||||
@@ -33,8 +32,7 @@ final appWidgetLaunchStreamProvider =
|
|||||||
AutoDisposeProvider<Raw<Stream<ReceivedIntentParameter>>>.internal(
|
AutoDisposeProvider<Raw<Stream<ReceivedIntentParameter>>>.internal(
|
||||||
appWidgetLaunchStream,
|
appWidgetLaunchStream,
|
||||||
name: r'appWidgetLaunchStreamProvider',
|
name: r'appWidgetLaunchStreamProvider',
|
||||||
debugGetCreateSourceHash:
|
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||||
const bool.fromEnvironment('dart.vm.product')
|
|
||||||
? null
|
? null
|
||||||
: _$appWidgetLaunchStreamHash,
|
: _$appWidgetLaunchStreamHash,
|
||||||
dependencies: null,
|
dependencies: null,
|
||||||
|
|||||||
@@ -22,7 +22,10 @@ class BangDao extends DatabaseAccessor<BangDatabase> with _$BangDaoMixin {
|
|||||||
|
|
||||||
SingleSelectable<int> getBangCount({Iterable<BangGroup>? groups}) {
|
SingleSelectable<int> getBangCount({Iterable<BangGroup>? groups}) {
|
||||||
return db.bang.count(
|
return db.bang.count(
|
||||||
where: groups.mapNotNull((groups) => (t) => t.group.isInValues(groups)),
|
where: groups.mapNotNull(
|
||||||
|
(groups) =>
|
||||||
|
(t) => t.group.isInValues(groups),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -10,8 +10,7 @@ class SyncDao extends DatabaseAccessor<BangDatabase> with _$SyncDaoMixin {
|
|||||||
SyncDao(super.db);
|
SyncDao(super.db);
|
||||||
|
|
||||||
SingleOrNullSelectable<DateTime?> getLastSyncOfGroup(BangGroup group) {
|
SingleOrNullSelectable<DateTime?> getLastSyncOfGroup(BangGroup group) {
|
||||||
final query =
|
final query = selectOnly(db.bangSync)
|
||||||
selectOnly(db.bangSync)
|
|
||||||
..addColumns([db.bangSync.lastSync])
|
..addColumns([db.bangSync.lastSync])
|
||||||
..where(db.bangSync.group.equalsValue(group));
|
..where(db.bangSync.group.equalsValue(group));
|
||||||
|
|
||||||
|
|||||||
@@ -96,23 +96,19 @@ class BangTable extends Table with TableInfo<BangTable, Bang> {
|
|||||||
Bang map(Map<String, dynamic> data, {String? tablePrefix}) {
|
Bang map(Map<String, dynamic> data, {String? tablePrefix}) {
|
||||||
final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : '';
|
final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : '';
|
||||||
return Bang(
|
return Bang(
|
||||||
websiteName:
|
websiteName: attachedDatabase.typeMapping.read(
|
||||||
attachedDatabase.typeMapping.read(
|
|
||||||
DriftSqlType.string,
|
DriftSqlType.string,
|
||||||
data['${effectivePrefix}website_name'],
|
data['${effectivePrefix}website_name'],
|
||||||
)!,
|
)!,
|
||||||
domain:
|
domain: attachedDatabase.typeMapping.read(
|
||||||
attachedDatabase.typeMapping.read(
|
|
||||||
DriftSqlType.string,
|
DriftSqlType.string,
|
||||||
data['${effectivePrefix}domain'],
|
data['${effectivePrefix}domain'],
|
||||||
)!,
|
)!,
|
||||||
trigger:
|
trigger: attachedDatabase.typeMapping.read(
|
||||||
attachedDatabase.typeMapping.read(
|
|
||||||
DriftSqlType.string,
|
DriftSqlType.string,
|
||||||
data['${effectivePrefix}trigger'],
|
data['${effectivePrefix}trigger'],
|
||||||
)!,
|
)!,
|
||||||
urlTemplate:
|
urlTemplate: attachedDatabase.typeMapping.read(
|
||||||
attachedDatabase.typeMapping.read(
|
|
||||||
DriftSqlType.string,
|
DriftSqlType.string,
|
||||||
data['${effectivePrefix}url_template'],
|
data['${effectivePrefix}url_template'],
|
||||||
)!,
|
)!,
|
||||||
@@ -331,8 +327,7 @@ class BangSync extends Table with TableInfo<BangSync, BangSyncData> {
|
|||||||
data['${effectivePrefix}group'],
|
data['${effectivePrefix}group'],
|
||||||
)!,
|
)!,
|
||||||
),
|
),
|
||||||
lastSync:
|
lastSync: attachedDatabase.typeMapping.read(
|
||||||
attachedDatabase.typeMapping.read(
|
|
||||||
DriftSqlType.dateTime,
|
DriftSqlType.dateTime,
|
||||||
data['${effectivePrefix}last_sync'],
|
data['${effectivePrefix}last_sync'],
|
||||||
)!,
|
)!,
|
||||||
@@ -512,18 +507,15 @@ class BangFrequency extends Table
|
|||||||
BangFrequencyData map(Map<String, dynamic> data, {String? tablePrefix}) {
|
BangFrequencyData map(Map<String, dynamic> data, {String? tablePrefix}) {
|
||||||
final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : '';
|
final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : '';
|
||||||
return BangFrequencyData(
|
return BangFrequencyData(
|
||||||
trigger:
|
trigger: attachedDatabase.typeMapping.read(
|
||||||
attachedDatabase.typeMapping.read(
|
|
||||||
DriftSqlType.string,
|
DriftSqlType.string,
|
||||||
data['${effectivePrefix}trigger'],
|
data['${effectivePrefix}trigger'],
|
||||||
)!,
|
)!,
|
||||||
frequency:
|
frequency: attachedDatabase.typeMapping.read(
|
||||||
attachedDatabase.typeMapping.read(
|
|
||||||
DriftSqlType.int,
|
DriftSqlType.int,
|
||||||
data['${effectivePrefix}frequency'],
|
data['${effectivePrefix}frequency'],
|
||||||
)!,
|
)!,
|
||||||
lastUsed:
|
lastUsed: attachedDatabase.typeMapping.read(
|
||||||
attachedDatabase.typeMapping.read(
|
|
||||||
DriftSqlType.dateTime,
|
DriftSqlType.dateTime,
|
||||||
data['${effectivePrefix}last_used'],
|
data['${effectivePrefix}last_used'],
|
||||||
)!,
|
)!,
|
||||||
@@ -736,18 +728,15 @@ class BangHistory extends Table with TableInfo<BangHistory, BangHistoryData> {
|
|||||||
BangHistoryData map(Map<String, dynamic> data, {String? tablePrefix}) {
|
BangHistoryData map(Map<String, dynamic> data, {String? tablePrefix}) {
|
||||||
final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : '';
|
final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : '';
|
||||||
return BangHistoryData(
|
return BangHistoryData(
|
||||||
searchQuery:
|
searchQuery: attachedDatabase.typeMapping.read(
|
||||||
attachedDatabase.typeMapping.read(
|
|
||||||
DriftSqlType.string,
|
DriftSqlType.string,
|
||||||
data['${effectivePrefix}search_query'],
|
data['${effectivePrefix}search_query'],
|
||||||
)!,
|
)!,
|
||||||
trigger:
|
trigger: attachedDatabase.typeMapping.read(
|
||||||
attachedDatabase.typeMapping.read(
|
|
||||||
DriftSqlType.string,
|
DriftSqlType.string,
|
||||||
data['${effectivePrefix}trigger'],
|
data['${effectivePrefix}trigger'],
|
||||||
)!,
|
)!,
|
||||||
searchDate:
|
searchDate: attachedDatabase.typeMapping.read(
|
||||||
attachedDatabase.typeMapping.read(
|
|
||||||
DriftSqlType.dateTime,
|
DriftSqlType.dateTime,
|
||||||
data['${effectivePrefix}search_date'],
|
data['${effectivePrefix}search_date'],
|
||||||
)!,
|
)!,
|
||||||
@@ -813,11 +802,13 @@ class BangHistoryData extends DataClass implements Insertable<BangHistoryData> {
|
|||||||
);
|
);
|
||||||
BangHistoryData copyWithCompanion(BangHistoryCompanion data) {
|
BangHistoryData copyWithCompanion(BangHistoryCompanion data) {
|
||||||
return BangHistoryData(
|
return BangHistoryData(
|
||||||
searchQuery:
|
searchQuery: data.searchQuery.present
|
||||||
data.searchQuery.present ? data.searchQuery.value : this.searchQuery,
|
? data.searchQuery.value
|
||||||
|
: this.searchQuery,
|
||||||
trigger: data.trigger.present ? data.trigger.value : this.trigger,
|
trigger: data.trigger.present ? data.trigger.value : this.trigger,
|
||||||
searchDate:
|
searchDate: data.searchDate.present
|
||||||
data.searchDate.present ? data.searchDate.value : this.searchDate,
|
? data.searchDate.value
|
||||||
|
: this.searchDate,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -954,13 +945,11 @@ class BangFts extends Table
|
|||||||
BangFt map(Map<String, dynamic> data, {String? tablePrefix}) {
|
BangFt map(Map<String, dynamic> data, {String? tablePrefix}) {
|
||||||
final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : '';
|
final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : '';
|
||||||
return BangFt(
|
return BangFt(
|
||||||
trigger:
|
trigger: attachedDatabase.typeMapping.read(
|
||||||
attachedDatabase.typeMapping.read(
|
|
||||||
DriftSqlType.string,
|
DriftSqlType.string,
|
||||||
data['${effectivePrefix}trigger'],
|
data['${effectivePrefix}trigger'],
|
||||||
)!,
|
)!,
|
||||||
websiteName:
|
websiteName: attachedDatabase.typeMapping.read(
|
||||||
attachedDatabase.typeMapping.read(
|
|
||||||
DriftSqlType.string,
|
DriftSqlType.string,
|
||||||
data['${effectivePrefix}website_name'],
|
data['${effectivePrefix}website_name'],
|
||||||
)!,
|
)!,
|
||||||
@@ -1017,8 +1006,9 @@ class BangFt extends DataClass implements Insertable<BangFt> {
|
|||||||
BangFt copyWithCompanion(BangFtsCompanion data) {
|
BangFt copyWithCompanion(BangFtsCompanion data) {
|
||||||
return BangFt(
|
return BangFt(
|
||||||
trigger: data.trigger.present ? data.trigger.value : this.trigger,
|
trigger: data.trigger.present ? data.trigger.value : this.trigger,
|
||||||
websiteName:
|
websiteName: data.websiteName.present
|
||||||
data.websiteName.present ? data.websiteName.value : this.websiteName,
|
? data.websiteName.value
|
||||||
|
: this.websiteName,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1140,23 +1130,19 @@ class BangDataView extends ViewInfo<BangDataView, BangData>
|
|||||||
BangData map(Map<String, dynamic> data, {String? tablePrefix}) {
|
BangData map(Map<String, dynamic> data, {String? tablePrefix}) {
|
||||||
final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : '';
|
final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : '';
|
||||||
return BangData(
|
return BangData(
|
||||||
websiteName:
|
websiteName: attachedDatabase.typeMapping.read(
|
||||||
attachedDatabase.typeMapping.read(
|
|
||||||
DriftSqlType.string,
|
DriftSqlType.string,
|
||||||
data['${effectivePrefix}website_name'],
|
data['${effectivePrefix}website_name'],
|
||||||
)!,
|
)!,
|
||||||
domain:
|
domain: attachedDatabase.typeMapping.read(
|
||||||
attachedDatabase.typeMapping.read(
|
|
||||||
DriftSqlType.string,
|
DriftSqlType.string,
|
||||||
data['${effectivePrefix}domain'],
|
data['${effectivePrefix}domain'],
|
||||||
)!,
|
)!,
|
||||||
trigger:
|
trigger: attachedDatabase.typeMapping.read(
|
||||||
attachedDatabase.typeMapping.read(
|
|
||||||
DriftSqlType.string,
|
DriftSqlType.string,
|
||||||
data['${effectivePrefix}trigger'],
|
data['${effectivePrefix}trigger'],
|
||||||
)!,
|
)!,
|
||||||
urlTemplate:
|
urlTemplate: attachedDatabase.typeMapping.read(
|
||||||
attachedDatabase.typeMapping.read(
|
|
||||||
DriftSqlType.string,
|
DriftSqlType.string,
|
||||||
data['${effectivePrefix}url_template'],
|
data['${effectivePrefix}url_template'],
|
||||||
)!,
|
)!,
|
||||||
@@ -1735,12 +1721,12 @@ class $BangTableTableManager
|
|||||||
TableManagerState(
|
TableManagerState(
|
||||||
db: db,
|
db: db,
|
||||||
table: table,
|
table: table,
|
||||||
createFilteringComposer:
|
createFilteringComposer: () =>
|
||||||
() => $BangTableFilterComposer($db: db, $table: table),
|
$BangTableFilterComposer($db: db, $table: table),
|
||||||
createOrderingComposer:
|
createOrderingComposer: () =>
|
||||||
() => $BangTableOrderingComposer($db: db, $table: table),
|
$BangTableOrderingComposer($db: db, $table: table),
|
||||||
createComputedFieldComposer:
|
createComputedFieldComposer: () =>
|
||||||
() => $BangTableAnnotationComposer($db: db, $table: table),
|
$BangTableAnnotationComposer($db: db, $table: table),
|
||||||
updateCompanionCallback:
|
updateCompanionCallback:
|
||||||
({
|
({
|
||||||
Value<String> trigger = const Value.absent(),
|
Value<String> trigger = const Value.absent(),
|
||||||
@@ -1785,20 +1771,13 @@ class $BangTableTableManager
|
|||||||
format: format,
|
format: format,
|
||||||
rowid: rowid,
|
rowid: rowid,
|
||||||
),
|
),
|
||||||
withReferenceMapper:
|
withReferenceMapper: (p0) => p0
|
||||||
(p0) =>
|
|
||||||
p0
|
|
||||||
.map(
|
.map(
|
||||||
(e) => (
|
(e) => (e.readTable(table), $BangTableReferences(db, table, e)),
|
||||||
e.readTable(table),
|
|
||||||
$BangTableReferences(db, table, e),
|
|
||||||
),
|
|
||||||
)
|
)
|
||||||
.toList(),
|
.toList(),
|
||||||
prefetchHooksCallback: ({
|
prefetchHooksCallback:
|
||||||
bangFrequencyRefs = false,
|
({bangFrequencyRefs = false, bangHistoryRefs = false}) {
|
||||||
bangHistoryRefs = false,
|
|
||||||
}) {
|
|
||||||
return PrefetchHooks(
|
return PrefetchHooks(
|
||||||
db: db,
|
db: db,
|
||||||
explicitlyWatchedTables: [
|
explicitlyWatchedTables: [
|
||||||
@@ -1817,9 +1796,7 @@ class $BangTableTableManager
|
|||||||
currentTable: table,
|
currentTable: table,
|
||||||
referencedTable: $BangTableReferences
|
referencedTable: $BangTableReferences
|
||||||
._bangFrequencyRefsTable(db),
|
._bangFrequencyRefsTable(db),
|
||||||
managerFromTypedResult:
|
managerFromTypedResult: (p0) => $BangTableReferences(
|
||||||
(p0) =>
|
|
||||||
$BangTableReferences(
|
|
||||||
db,
|
db,
|
||||||
table,
|
table,
|
||||||
p0,
|
p0,
|
||||||
@@ -1831,13 +1808,15 @@ class $BangTableTableManager
|
|||||||
typedResults: items,
|
typedResults: items,
|
||||||
),
|
),
|
||||||
if (bangHistoryRefs)
|
if (bangHistoryRefs)
|
||||||
await $_getPrefetchedData<Bang, BangTable, BangHistoryData>(
|
await $_getPrefetchedData<
|
||||||
|
Bang,
|
||||||
|
BangTable,
|
||||||
|
BangHistoryData
|
||||||
|
>(
|
||||||
currentTable: table,
|
currentTable: table,
|
||||||
referencedTable: $BangTableReferences
|
referencedTable: $BangTableReferences
|
||||||
._bangHistoryRefsTable(db),
|
._bangHistoryRefsTable(db),
|
||||||
managerFromTypedResult:
|
managerFromTypedResult: (p0) => $BangTableReferences(
|
||||||
(p0) =>
|
|
||||||
$BangTableReferences(
|
|
||||||
db,
|
db,
|
||||||
table,
|
table,
|
||||||
p0,
|
p0,
|
||||||
@@ -1958,12 +1937,12 @@ class $BangSyncTableManager
|
|||||||
TableManagerState(
|
TableManagerState(
|
||||||
db: db,
|
db: db,
|
||||||
table: table,
|
table: table,
|
||||||
createFilteringComposer:
|
createFilteringComposer: () =>
|
||||||
() => $BangSyncFilterComposer($db: db, $table: table),
|
$BangSyncFilterComposer($db: db, $table: table),
|
||||||
createOrderingComposer:
|
createOrderingComposer: () =>
|
||||||
() => $BangSyncOrderingComposer($db: db, $table: table),
|
$BangSyncOrderingComposer($db: db, $table: table),
|
||||||
createComputedFieldComposer:
|
createComputedFieldComposer: () =>
|
||||||
() => $BangSyncAnnotationComposer($db: db, $table: table),
|
$BangSyncAnnotationComposer($db: db, $table: table),
|
||||||
updateCompanionCallback:
|
updateCompanionCallback:
|
||||||
({
|
({
|
||||||
Value<BangGroup> group = const Value.absent(),
|
Value<BangGroup> group = const Value.absent(),
|
||||||
@@ -1974,15 +1953,8 @@ class $BangSyncTableManager
|
|||||||
Value<BangGroup> group = const Value.absent(),
|
Value<BangGroup> group = const Value.absent(),
|
||||||
required DateTime lastSync,
|
required DateTime lastSync,
|
||||||
}) => BangSyncCompanion.insert(group: group, lastSync: lastSync),
|
}) => BangSyncCompanion.insert(group: group, lastSync: lastSync),
|
||||||
withReferenceMapper:
|
withReferenceMapper: (p0) => p0
|
||||||
(p0) =>
|
.map((e) => (e.readTable(table), BaseReferences(db, table, e)))
|
||||||
p0
|
|
||||||
.map(
|
|
||||||
(e) => (
|
|
||||||
e.readTable(table),
|
|
||||||
BaseReferences(db, table, e),
|
|
||||||
),
|
|
||||||
)
|
|
||||||
.toList(),
|
.toList(),
|
||||||
prefetchHooksCallback: null,
|
prefetchHooksCallback: null,
|
||||||
),
|
),
|
||||||
@@ -2186,12 +2158,12 @@ class $BangFrequencyTableManager
|
|||||||
TableManagerState(
|
TableManagerState(
|
||||||
db: db,
|
db: db,
|
||||||
table: table,
|
table: table,
|
||||||
createFilteringComposer:
|
createFilteringComposer: () =>
|
||||||
() => $BangFrequencyFilterComposer($db: db, $table: table),
|
$BangFrequencyFilterComposer($db: db, $table: table),
|
||||||
createOrderingComposer:
|
createOrderingComposer: () =>
|
||||||
() => $BangFrequencyOrderingComposer($db: db, $table: table),
|
$BangFrequencyOrderingComposer($db: db, $table: table),
|
||||||
createComputedFieldComposer:
|
createComputedFieldComposer: () =>
|
||||||
() => $BangFrequencyAnnotationComposer($db: db, $table: table),
|
$BangFrequencyAnnotationComposer($db: db, $table: table),
|
||||||
updateCompanionCallback:
|
updateCompanionCallback:
|
||||||
({
|
({
|
||||||
Value<String> trigger = const Value.absent(),
|
Value<String> trigger = const Value.absent(),
|
||||||
@@ -2216,9 +2188,7 @@ class $BangFrequencyTableManager
|
|||||||
lastUsed: lastUsed,
|
lastUsed: lastUsed,
|
||||||
rowid: rowid,
|
rowid: rowid,
|
||||||
),
|
),
|
||||||
withReferenceMapper:
|
withReferenceMapper: (p0) => p0
|
||||||
(p0) =>
|
|
||||||
p0
|
|
||||||
.map(
|
.map(
|
||||||
(e) => (
|
(e) => (
|
||||||
e.readTable(table),
|
e.readTable(table),
|
||||||
@@ -2230,7 +2200,8 @@ class $BangFrequencyTableManager
|
|||||||
return PrefetchHooks(
|
return PrefetchHooks(
|
||||||
db: db,
|
db: db,
|
||||||
explicitlyWatchedTables: [],
|
explicitlyWatchedTables: [],
|
||||||
addJoins: <
|
addJoins:
|
||||||
|
<
|
||||||
T extends TableManagerState<
|
T extends TableManagerState<
|
||||||
dynamic,
|
dynamic,
|
||||||
dynamic,
|
dynamic,
|
||||||
@@ -2252,8 +2223,7 @@ class $BangFrequencyTableManager
|
|||||||
currentColumn: table.trigger,
|
currentColumn: table.trigger,
|
||||||
referencedTable: $BangFrequencyReferences
|
referencedTable: $BangFrequencyReferences
|
||||||
._triggerTable(db),
|
._triggerTable(db),
|
||||||
referencedColumn:
|
referencedColumn: $BangFrequencyReferences
|
||||||
$BangFrequencyReferences
|
|
||||||
._triggerTable(db)
|
._triggerTable(db)
|
||||||
.trigger,
|
.trigger,
|
||||||
)
|
)
|
||||||
@@ -2471,12 +2441,12 @@ class $BangHistoryTableManager
|
|||||||
TableManagerState(
|
TableManagerState(
|
||||||
db: db,
|
db: db,
|
||||||
table: table,
|
table: table,
|
||||||
createFilteringComposer:
|
createFilteringComposer: () =>
|
||||||
() => $BangHistoryFilterComposer($db: db, $table: table),
|
$BangHistoryFilterComposer($db: db, $table: table),
|
||||||
createOrderingComposer:
|
createOrderingComposer: () =>
|
||||||
() => $BangHistoryOrderingComposer($db: db, $table: table),
|
$BangHistoryOrderingComposer($db: db, $table: table),
|
||||||
createComputedFieldComposer:
|
createComputedFieldComposer: () =>
|
||||||
() => $BangHistoryAnnotationComposer($db: db, $table: table),
|
$BangHistoryAnnotationComposer($db: db, $table: table),
|
||||||
updateCompanionCallback:
|
updateCompanionCallback:
|
||||||
({
|
({
|
||||||
Value<String> searchQuery = const Value.absent(),
|
Value<String> searchQuery = const Value.absent(),
|
||||||
@@ -2501,21 +2471,18 @@ class $BangHistoryTableManager
|
|||||||
searchDate: searchDate,
|
searchDate: searchDate,
|
||||||
rowid: rowid,
|
rowid: rowid,
|
||||||
),
|
),
|
||||||
withReferenceMapper:
|
withReferenceMapper: (p0) => p0
|
||||||
(p0) =>
|
|
||||||
p0
|
|
||||||
.map(
|
.map(
|
||||||
(e) => (
|
(e) =>
|
||||||
e.readTable(table),
|
(e.readTable(table), $BangHistoryReferences(db, table, e)),
|
||||||
$BangHistoryReferences(db, table, e),
|
|
||||||
),
|
|
||||||
)
|
)
|
||||||
.toList(),
|
.toList(),
|
||||||
prefetchHooksCallback: ({trigger = false}) {
|
prefetchHooksCallback: ({trigger = false}) {
|
||||||
return PrefetchHooks(
|
return PrefetchHooks(
|
||||||
db: db,
|
db: db,
|
||||||
explicitlyWatchedTables: [],
|
explicitlyWatchedTables: [],
|
||||||
addJoins: <
|
addJoins:
|
||||||
|
<
|
||||||
T extends TableManagerState<
|
T extends TableManagerState<
|
||||||
dynamic,
|
dynamic,
|
||||||
dynamic,
|
dynamic,
|
||||||
@@ -2537,8 +2504,7 @@ class $BangHistoryTableManager
|
|||||||
currentColumn: table.trigger,
|
currentColumn: table.trigger,
|
||||||
referencedTable: $BangHistoryReferences
|
referencedTable: $BangHistoryReferences
|
||||||
._triggerTable(db),
|
._triggerTable(db),
|
||||||
referencedColumn:
|
referencedColumn: $BangHistoryReferences
|
||||||
$BangHistoryReferences
|
|
||||||
._triggerTable(db)
|
._triggerTable(db)
|
||||||
.trigger,
|
.trigger,
|
||||||
)
|
)
|
||||||
@@ -2658,12 +2624,12 @@ class $BangFtsTableManager
|
|||||||
TableManagerState(
|
TableManagerState(
|
||||||
db: db,
|
db: db,
|
||||||
table: table,
|
table: table,
|
||||||
createFilteringComposer:
|
createFilteringComposer: () =>
|
||||||
() => $BangFtsFilterComposer($db: db, $table: table),
|
$BangFtsFilterComposer($db: db, $table: table),
|
||||||
createOrderingComposer:
|
createOrderingComposer: () =>
|
||||||
() => $BangFtsOrderingComposer($db: db, $table: table),
|
$BangFtsOrderingComposer($db: db, $table: table),
|
||||||
createComputedFieldComposer:
|
createComputedFieldComposer: () =>
|
||||||
() => $BangFtsAnnotationComposer($db: db, $table: table),
|
$BangFtsAnnotationComposer($db: db, $table: table),
|
||||||
updateCompanionCallback:
|
updateCompanionCallback:
|
||||||
({
|
({
|
||||||
Value<String> trigger = const Value.absent(),
|
Value<String> trigger = const Value.absent(),
|
||||||
@@ -2684,15 +2650,8 @@ class $BangFtsTableManager
|
|||||||
websiteName: websiteName,
|
websiteName: websiteName,
|
||||||
rowid: rowid,
|
rowid: rowid,
|
||||||
),
|
),
|
||||||
withReferenceMapper:
|
withReferenceMapper: (p0) => p0
|
||||||
(p0) =>
|
.map((e) => (e.readTable(table), BaseReferences(db, table, e)))
|
||||||
p0
|
|
||||||
.map(
|
|
||||||
(e) => (
|
|
||||||
e.readTable(table),
|
|
||||||
BaseReferences(db, table, e),
|
|
||||||
),
|
|
||||||
)
|
|
||||||
.toList(),
|
.toList(),
|
||||||
prefetchHooksCallback: null,
|
prefetchHooksCallback: null,
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -72,12 +72,8 @@ class Bang with FastEquatable implements Insertable<Bang> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Uri getTemplateUrl(String? query) {
|
Uri getTemplateUrl(String? query) {
|
||||||
final url =
|
final url = (query != null)
|
||||||
(query != null)
|
? urlTemplate.replaceAll(_templateQueryPlaceholder, formatQuery(query))
|
||||||
? urlTemplate.replaceAll(
|
|
||||||
_templateQueryPlaceholder,
|
|
||||||
formatQuery(query),
|
|
||||||
)
|
|
||||||
: urlTemplate;
|
: urlTemplate;
|
||||||
|
|
||||||
var template = Uri.parse(url);
|
var template = Uri.parse(url);
|
||||||
|
|||||||
@@ -89,43 +89,35 @@ class _$BangCWProxyImpl implements _$BangCWProxy {
|
|||||||
Object? format = const $CopyWithPlaceholder(),
|
Object? format = const $CopyWithPlaceholder(),
|
||||||
}) {
|
}) {
|
||||||
return Bang(
|
return Bang(
|
||||||
websiteName:
|
websiteName: websiteName == const $CopyWithPlaceholder()
|
||||||
websiteName == const $CopyWithPlaceholder()
|
|
||||||
? _value.websiteName
|
? _value.websiteName
|
||||||
// ignore: cast_nullable_to_non_nullable
|
// ignore: cast_nullable_to_non_nullable
|
||||||
: websiteName as String,
|
: websiteName as String,
|
||||||
domain:
|
domain: domain == const $CopyWithPlaceholder()
|
||||||
domain == const $CopyWithPlaceholder()
|
|
||||||
? _value.domain
|
? _value.domain
|
||||||
// ignore: cast_nullable_to_non_nullable
|
// ignore: cast_nullable_to_non_nullable
|
||||||
: domain as String,
|
: domain as String,
|
||||||
trigger:
|
trigger: trigger == const $CopyWithPlaceholder()
|
||||||
trigger == const $CopyWithPlaceholder()
|
|
||||||
? _value.trigger
|
? _value.trigger
|
||||||
// ignore: cast_nullable_to_non_nullable
|
// ignore: cast_nullable_to_non_nullable
|
||||||
: trigger as String,
|
: trigger as String,
|
||||||
urlTemplate:
|
urlTemplate: urlTemplate == const $CopyWithPlaceholder()
|
||||||
urlTemplate == const $CopyWithPlaceholder()
|
|
||||||
? _value.urlTemplate
|
? _value.urlTemplate
|
||||||
// ignore: cast_nullable_to_non_nullable
|
// ignore: cast_nullable_to_non_nullable
|
||||||
: urlTemplate as String,
|
: urlTemplate as String,
|
||||||
group:
|
group: group == const $CopyWithPlaceholder()
|
||||||
group == const $CopyWithPlaceholder()
|
|
||||||
? _value.group
|
? _value.group
|
||||||
// ignore: cast_nullable_to_non_nullable
|
// ignore: cast_nullable_to_non_nullable
|
||||||
: group as BangGroup?,
|
: group as BangGroup?,
|
||||||
category:
|
category: category == const $CopyWithPlaceholder()
|
||||||
category == const $CopyWithPlaceholder()
|
|
||||||
? _value.category
|
? _value.category
|
||||||
// ignore: cast_nullable_to_non_nullable
|
// ignore: cast_nullable_to_non_nullable
|
||||||
: category as String?,
|
: category as String?,
|
||||||
subCategory:
|
subCategory: subCategory == const $CopyWithPlaceholder()
|
||||||
subCategory == const $CopyWithPlaceholder()
|
|
||||||
? _value.subCategory
|
? _value.subCategory
|
||||||
// ignore: cast_nullable_to_non_nullable
|
// ignore: cast_nullable_to_non_nullable
|
||||||
: subCategory as String?,
|
: subCategory as String?,
|
||||||
format:
|
format: format == const $CopyWithPlaceholder()
|
||||||
format == const $CopyWithPlaceholder()
|
|
||||||
? _value.format
|
? _value.format
|
||||||
// ignore: cast_nullable_to_non_nullable
|
// ignore: cast_nullable_to_non_nullable
|
||||||
: format as Set<BangFormat>?,
|
: format as Set<BangFormat>?,
|
||||||
@@ -150,8 +142,7 @@ Bang _$BangFromJson(Map<String, dynamic> json) => Bang(
|
|||||||
urlTemplate: json['u'] as String,
|
urlTemplate: json['u'] as String,
|
||||||
category: json['c'] as String?,
|
category: json['c'] as String?,
|
||||||
subCategory: json['sc'] as String?,
|
subCategory: json['sc'] as String?,
|
||||||
format:
|
format: (json['fmt'] as List<dynamic>?)
|
||||||
(json['fmt'] as List<dynamic>?)
|
|
||||||
?.map((e) => $enumDecode(_$BangFormatEnumMap, e))
|
?.map((e) => $enumDecode(_$BangFormatEnumMap, e))
|
||||||
.toSet(),
|
.toSet(),
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -103,53 +103,43 @@ class _$BangDataCWProxyImpl implements _$BangDataCWProxy {
|
|||||||
Object? icon = const $CopyWithPlaceholder(),
|
Object? icon = const $CopyWithPlaceholder(),
|
||||||
}) {
|
}) {
|
||||||
return BangData(
|
return BangData(
|
||||||
websiteName:
|
websiteName: websiteName == const $CopyWithPlaceholder()
|
||||||
websiteName == const $CopyWithPlaceholder()
|
|
||||||
? _value.websiteName
|
? _value.websiteName
|
||||||
// ignore: cast_nullable_to_non_nullable
|
// ignore: cast_nullable_to_non_nullable
|
||||||
: websiteName as String,
|
: websiteName as String,
|
||||||
domain:
|
domain: domain == const $CopyWithPlaceholder()
|
||||||
domain == const $CopyWithPlaceholder()
|
|
||||||
? _value.domain
|
? _value.domain
|
||||||
// ignore: cast_nullable_to_non_nullable
|
// ignore: cast_nullable_to_non_nullable
|
||||||
: domain as String,
|
: domain as String,
|
||||||
trigger:
|
trigger: trigger == const $CopyWithPlaceholder()
|
||||||
trigger == const $CopyWithPlaceholder()
|
|
||||||
? _value.trigger
|
? _value.trigger
|
||||||
// ignore: cast_nullable_to_non_nullable
|
// ignore: cast_nullable_to_non_nullable
|
||||||
: trigger as String,
|
: trigger as String,
|
||||||
urlTemplate:
|
urlTemplate: urlTemplate == const $CopyWithPlaceholder()
|
||||||
urlTemplate == const $CopyWithPlaceholder()
|
|
||||||
? _value.urlTemplate
|
? _value.urlTemplate
|
||||||
// ignore: cast_nullable_to_non_nullable
|
// ignore: cast_nullable_to_non_nullable
|
||||||
: urlTemplate as String,
|
: urlTemplate as String,
|
||||||
category:
|
category: category == const $CopyWithPlaceholder()
|
||||||
category == const $CopyWithPlaceholder()
|
|
||||||
? _value.category
|
? _value.category
|
||||||
// ignore: cast_nullable_to_non_nullable
|
// ignore: cast_nullable_to_non_nullable
|
||||||
: category as String?,
|
: category as String?,
|
||||||
subCategory:
|
subCategory: subCategory == const $CopyWithPlaceholder()
|
||||||
subCategory == const $CopyWithPlaceholder()
|
|
||||||
? _value.subCategory
|
? _value.subCategory
|
||||||
// ignore: cast_nullable_to_non_nullable
|
// ignore: cast_nullable_to_non_nullable
|
||||||
: subCategory as String?,
|
: subCategory as String?,
|
||||||
format:
|
format: format == const $CopyWithPlaceholder()
|
||||||
format == const $CopyWithPlaceholder()
|
|
||||||
? _value.format
|
? _value.format
|
||||||
// ignore: cast_nullable_to_non_nullable
|
// ignore: cast_nullable_to_non_nullable
|
||||||
: format as Set<BangFormat>?,
|
: format as Set<BangFormat>?,
|
||||||
frequency:
|
frequency: frequency == const $CopyWithPlaceholder()
|
||||||
frequency == const $CopyWithPlaceholder()
|
|
||||||
? _value.frequency
|
? _value.frequency
|
||||||
// ignore: cast_nullable_to_non_nullable
|
// ignore: cast_nullable_to_non_nullable
|
||||||
: frequency as int?,
|
: frequency as int?,
|
||||||
lastUsed:
|
lastUsed: lastUsed == const $CopyWithPlaceholder()
|
||||||
lastUsed == const $CopyWithPlaceholder()
|
|
||||||
? _value.lastUsed
|
? _value.lastUsed
|
||||||
// ignore: cast_nullable_to_non_nullable
|
// ignore: cast_nullable_to_non_nullable
|
||||||
: lastUsed as DateTime?,
|
: lastUsed as DateTime?,
|
||||||
icon:
|
icon: icon == const $CopyWithPlaceholder()
|
||||||
icon == const $CopyWithPlaceholder()
|
|
||||||
? _value.icon
|
? _value.icon
|
||||||
// ignore: cast_nullable_to_non_nullable
|
// ignore: cast_nullable_to_non_nullable
|
||||||
: icon as BrowserIcon?,
|
: icon as BrowserIcon?,
|
||||||
|
|||||||
@@ -13,8 +13,9 @@ String _$bangDatabaseHash() => r'e31cf4b499300aff65174a16fb74c7dd8ec3d6f0';
|
|||||||
final bangDatabaseProvider = Provider<BangDatabase>.internal(
|
final bangDatabaseProvider = Provider<BangDatabase>.internal(
|
||||||
bangDatabase,
|
bangDatabase,
|
||||||
name: r'bangDatabaseProvider',
|
name: r'bangDatabaseProvider',
|
||||||
debugGetCreateSourceHash:
|
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||||
const bool.fromEnvironment('dart.vm.product') ? null : _$bangDatabaseHash,
|
? null
|
||||||
|
: _$bangDatabaseHash,
|
||||||
dependencies: null,
|
dependencies: null,
|
||||||
allTransitiveDependencies: null,
|
allTransitiveDependencies: null,
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -30,8 +30,7 @@ class BangDataSourceService extends _$BangDataSourceService {
|
|||||||
client.close();
|
client.close();
|
||||||
}
|
}
|
||||||
}, [url.toString()]).then(
|
}, [url.toString()]).then(
|
||||||
(json) =>
|
(json) => json.map((e) {
|
||||||
json.map((e) {
|
|
||||||
var bang = Bang.fromJson(e as Map<String, dynamic>);
|
var bang = Bang.fromJson(e as Map<String, dynamic>);
|
||||||
|
|
||||||
if (group != null) {
|
if (group != null) {
|
||||||
|
|||||||
@@ -15,8 +15,7 @@ final bangDataSourceServiceProvider =
|
|||||||
AutoDisposeNotifierProvider<BangDataSourceService, void>.internal(
|
AutoDisposeNotifierProvider<BangDataSourceService, void>.internal(
|
||||||
BangDataSourceService.new,
|
BangDataSourceService.new,
|
||||||
name: r'bangDataSourceServiceProvider',
|
name: r'bangDataSourceServiceProvider',
|
||||||
debugGetCreateSourceHash:
|
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||||
const bool.fromEnvironment('dart.vm.product')
|
|
||||||
? null
|
? null
|
||||||
: _$bangDataSourceServiceHash,
|
: _$bangDataSourceServiceHash,
|
||||||
dependencies: null,
|
dependencies: null,
|
||||||
|
|||||||
@@ -14,8 +14,7 @@ String _$defaultSearchBangDataHash() =>
|
|||||||
final defaultSearchBangDataProvider = StreamProvider<BangData?>.internal(
|
final defaultSearchBangDataProvider = StreamProvider<BangData?>.internal(
|
||||||
defaultSearchBangData,
|
defaultSearchBangData,
|
||||||
name: r'defaultSearchBangDataProvider',
|
name: r'defaultSearchBangDataProvider',
|
||||||
debugGetCreateSourceHash:
|
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||||
const bool.fromEnvironment('dart.vm.product')
|
|
||||||
? null
|
? null
|
||||||
: _$defaultSearchBangDataHash,
|
: _$defaultSearchBangDataHash,
|
||||||
dependencies: null,
|
dependencies: null,
|
||||||
@@ -33,8 +32,7 @@ final bangCategoriesProvider =
|
|||||||
AutoDisposeStreamProvider<Map<String, List<String>>>.internal(
|
AutoDisposeStreamProvider<Map<String, List<String>>>.internal(
|
||||||
bangCategories,
|
bangCategories,
|
||||||
name: r'bangCategoriesProvider',
|
name: r'bangCategoriesProvider',
|
||||||
debugGetCreateSourceHash:
|
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||||
const bool.fromEnvironment('dart.vm.product')
|
|
||||||
? null
|
? null
|
||||||
: _$bangCategoriesHash,
|
: _$bangCategoriesHash,
|
||||||
dependencies: null,
|
dependencies: null,
|
||||||
@@ -135,8 +133,7 @@ class BangListProvider extends AutoDisposeStreamProvider<List<BangData>> {
|
|||||||
),
|
),
|
||||||
from: bangListProvider,
|
from: bangListProvider,
|
||||||
name: r'bangListProvider',
|
name: r'bangListProvider',
|
||||||
debugGetCreateSourceHash:
|
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||||
const bool.fromEnvironment('dart.vm.product')
|
|
||||||
? null
|
? null
|
||||||
: _$bangListHash,
|
: _$bangListHash,
|
||||||
dependencies: BangListFamily._dependencies,
|
dependencies: BangListFamily._dependencies,
|
||||||
@@ -253,8 +250,7 @@ final frequentBangListProvider =
|
|||||||
AutoDisposeStreamProvider<List<BangData>>.internal(
|
AutoDisposeStreamProvider<List<BangData>>.internal(
|
||||||
frequentBangList,
|
frequentBangList,
|
||||||
name: r'frequentBangListProvider',
|
name: r'frequentBangListProvider',
|
||||||
debugGetCreateSourceHash:
|
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||||
const bool.fromEnvironment('dart.vm.product')
|
|
||||||
? null
|
? null
|
||||||
: _$frequentBangListHash,
|
: _$frequentBangListHash,
|
||||||
dependencies: null,
|
dependencies: null,
|
||||||
@@ -272,8 +268,7 @@ final searchHistoryProvider =
|
|||||||
AutoDisposeStreamProvider<List<SearchHistoryEntry>>.internal(
|
AutoDisposeStreamProvider<List<SearchHistoryEntry>>.internal(
|
||||||
searchHistory,
|
searchHistory,
|
||||||
name: r'searchHistoryProvider',
|
name: r'searchHistoryProvider',
|
||||||
debugGetCreateSourceHash:
|
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||||
const bool.fromEnvironment('dart.vm.product')
|
|
||||||
? null
|
? null
|
||||||
: _$searchHistoryHash,
|
: _$searchHistoryHash,
|
||||||
dependencies: null,
|
dependencies: null,
|
||||||
@@ -330,8 +325,7 @@ class LastSyncOfGroupProvider extends AutoDisposeStreamProvider<DateTime?> {
|
|||||||
(ref) => lastSyncOfGroup(ref as LastSyncOfGroupRef, group),
|
(ref) => lastSyncOfGroup(ref as LastSyncOfGroupRef, group),
|
||||||
from: lastSyncOfGroupProvider,
|
from: lastSyncOfGroupProvider,
|
||||||
name: r'lastSyncOfGroupProvider',
|
name: r'lastSyncOfGroupProvider',
|
||||||
debugGetCreateSourceHash:
|
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||||
const bool.fromEnvironment('dart.vm.product')
|
|
||||||
? null
|
? null
|
||||||
: _$lastSyncOfGroupHash,
|
: _$lastSyncOfGroupHash,
|
||||||
dependencies: LastSyncOfGroupFamily._dependencies,
|
dependencies: LastSyncOfGroupFamily._dependencies,
|
||||||
@@ -451,8 +445,7 @@ class BangCountOfGroupProvider extends AutoDisposeStreamProvider<int> {
|
|||||||
(ref) => bangCountOfGroup(ref as BangCountOfGroupRef, group),
|
(ref) => bangCountOfGroup(ref as BangCountOfGroupRef, group),
|
||||||
from: bangCountOfGroupProvider,
|
from: bangCountOfGroupProvider,
|
||||||
name: r'bangCountOfGroupProvider',
|
name: r'bangCountOfGroupProvider',
|
||||||
debugGetCreateSourceHash:
|
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||||
const bool.fromEnvironment('dart.vm.product')
|
|
||||||
? null
|
? null
|
||||||
: _$bangCountOfGroupHash,
|
: _$bangCountOfGroupHash,
|
||||||
dependencies: BangCountOfGroupFamily._dependencies,
|
dependencies: BangCountOfGroupFamily._dependencies,
|
||||||
|
|||||||
@@ -14,8 +14,7 @@ final bangSearchProvider =
|
|||||||
AutoDisposeStreamNotifierProvider<BangSearch, List<BangData>>.internal(
|
AutoDisposeStreamNotifierProvider<BangSearch, List<BangData>>.internal(
|
||||||
BangSearch.new,
|
BangSearch.new,
|
||||||
name: r'bangSearchProvider',
|
name: r'bangSearchProvider',
|
||||||
debugGetCreateSourceHash:
|
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||||
const bool.fromEnvironment('dart.vm.product')
|
|
||||||
? null
|
? null
|
||||||
: _$bangSearchHash,
|
: _$bangSearchHash,
|
||||||
dependencies: null,
|
dependencies: null,
|
||||||
@@ -27,14 +26,16 @@ String _$seamlessBangHash() => r'8bd7a2cbe4c302ae08f85167290666a7437f8b9b';
|
|||||||
|
|
||||||
/// See also [SeamlessBang].
|
/// See also [SeamlessBang].
|
||||||
@ProviderFor(SeamlessBang)
|
@ProviderFor(SeamlessBang)
|
||||||
final seamlessBangProvider = AutoDisposeNotifierProvider<
|
final seamlessBangProvider =
|
||||||
|
AutoDisposeNotifierProvider<
|
||||||
SeamlessBang,
|
SeamlessBang,
|
||||||
AsyncValue<List<BangData>>
|
AsyncValue<List<BangData>>
|
||||||
>.internal(
|
>.internal(
|
||||||
SeamlessBang.new,
|
SeamlessBang.new,
|
||||||
name: r'seamlessBangProvider',
|
name: r'seamlessBangProvider',
|
||||||
debugGetCreateSourceHash:
|
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||||
const bool.fromEnvironment('dart.vm.product') ? null : _$seamlessBangHash,
|
? null
|
||||||
|
: _$seamlessBangHash,
|
||||||
dependencies: null,
|
dependencies: null,
|
||||||
allTransitiveDependencies: null,
|
allTransitiveDependencies: null,
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -15,8 +15,7 @@ final bangDataRepositoryProvider =
|
|||||||
NotifierProvider<BangDataRepository, void>.internal(
|
NotifierProvider<BangDataRepository, void>.internal(
|
||||||
BangDataRepository.new,
|
BangDataRepository.new,
|
||||||
name: r'bangDataRepositoryProvider',
|
name: r'bangDataRepositoryProvider',
|
||||||
debugGetCreateSourceHash:
|
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||||
const bool.fromEnvironment('dart.vm.product')
|
|
||||||
? null
|
? null
|
||||||
: _$bangDataRepositoryHash,
|
: _$bangDataRepositoryHash,
|
||||||
dependencies: null,
|
dependencies: null,
|
||||||
|
|||||||
@@ -19,8 +19,9 @@ class BangSyncRepository extends _$BangSyncRepository {
|
|||||||
required Duration? syncInterval,
|
required Duration? syncInterval,
|
||||||
}) async {
|
}) async {
|
||||||
if (syncInterval != null) {
|
if (syncInterval != null) {
|
||||||
final lastSync =
|
final lastSync = await db.syncDao
|
||||||
await db.syncDao.getLastSyncOfGroup(group).getSingleOrNull();
|
.getLastSyncOfGroup(group)
|
||||||
|
.getSingleOrNull();
|
||||||
|
|
||||||
if (lastSync != null &&
|
if (lastSync != null &&
|
||||||
DateTime.now().difference(lastSync) < syncInterval) {
|
DateTime.now().difference(lastSync) < syncInterval) {
|
||||||
|
|||||||
@@ -15,8 +15,7 @@ final bangSyncRepositoryProvider =
|
|||||||
NotifierProvider<BangSyncRepository, void>.internal(
|
NotifierProvider<BangSyncRepository, void>.internal(
|
||||||
BangSyncRepository.new,
|
BangSyncRepository.new,
|
||||||
name: r'bangSyncRepositoryProvider',
|
name: r'bangSyncRepositoryProvider',
|
||||||
debugGetCreateSourceHash:
|
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||||
const bool.fromEnvironment('dart.vm.product')
|
|
||||||
? null
|
? null
|
||||||
: _$bangSyncRepositoryHash,
|
: _$bangSyncRepositoryHash,
|
||||||
dependencies: null,
|
dependencies: null,
|
||||||
|
|||||||
@@ -54,23 +54,18 @@ class BangCategoriesScreen extends HookConsumerWidget {
|
|||||||
expanded.value = {...expanded.value}..remove(key);
|
expanded.value = {...expanded.value}..remove(key);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
children:
|
children: categories.entries
|
||||||
categories.entries
|
|
||||||
.map(
|
.map(
|
||||||
(category) => ExpansionPanel(
|
(category) => ExpansionPanel(
|
||||||
canTapOnHeader: true,
|
canTapOnHeader: true,
|
||||||
isExpanded: expanded.value.contains(
|
isExpanded: expanded.value.contains(category.key),
|
||||||
category.key,
|
headerBuilder: (context, isExpanded) =>
|
||||||
),
|
|
||||||
headerBuilder:
|
|
||||||
(context, isExpanded) =>
|
|
||||||
ListTile(title: Text(category.key)),
|
ListTile(title: Text(category.key)),
|
||||||
body: Padding(
|
body: Padding(
|
||||||
padding: const EdgeInsets.only(left: 16.0),
|
padding: const EdgeInsets.only(left: 16.0),
|
||||||
child: Column(
|
child: Column(
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
children:
|
children: category.value
|
||||||
category.value
|
|
||||||
.map(
|
.map(
|
||||||
(subCategory) => ListTile(
|
(subCategory) => ListTile(
|
||||||
title: Text(subCategory),
|
title: Text(subCategory),
|
||||||
@@ -95,8 +90,7 @@ class BangCategoriesScreen extends HookConsumerWidget {
|
|||||||
},
|
},
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
error:
|
error: (error, stackTrace) => Center(
|
||||||
(error, stackTrace) => Center(
|
|
||||||
child: FailureWidget(
|
child: FailureWidget(
|
||||||
title: 'Failed to load Bang Categories',
|
title: 'Failed to load Bang Categories',
|
||||||
exception: error,
|
exception: error,
|
||||||
|
|||||||
@@ -47,8 +47,7 @@ class BangListScreen extends HookConsumerWidget {
|
|||||||
},
|
},
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
error:
|
error: (error, stackTrace) => SliverToBoxAdapter(
|
||||||
(error, stackTrace) => SliverToBoxAdapter(
|
|
||||||
child: Center(
|
child: Center(
|
||||||
child: FailureWidget(
|
child: FailureWidget(
|
||||||
title: 'Failed to load Bangs',
|
title: 'Failed to load Bangs',
|
||||||
@@ -56,8 +55,7 @@ class BangListScreen extends HookConsumerWidget {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
loading:
|
loading: () => const SliverToBoxAdapter(
|
||||||
() => const SliverToBoxAdapter(
|
|
||||||
child: Center(child: CircularProgressIndicator()),
|
child: Center(child: CircularProgressIndicator()),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -60,8 +60,7 @@ class BangSearchScreen extends HookConsumerWidget {
|
|||||||
),
|
),
|
||||||
body: resultsAsync.when(
|
body: resultsAsync.when(
|
||||||
skipLoadingOnReload: true,
|
skipLoadingOnReload: true,
|
||||||
data:
|
data: (bangs) => FadingScroll(
|
||||||
(bangs) => FadingScroll(
|
|
||||||
fadingSize: 25,
|
fadingSize: 25,
|
||||||
builder: (context, controller) {
|
builder: (context, controller) {
|
||||||
return ListView.builder(
|
return ListView.builder(
|
||||||
@@ -79,12 +78,8 @@ class BangSearchScreen extends HookConsumerWidget {
|
|||||||
);
|
);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
error:
|
error: (error, stackTrace) => Center(
|
||||||
(error, stackTrace) => Center(
|
child: FailureWidget(title: 'Bang Search failed', exception: error),
|
||||||
child: FailureWidget(
|
|
||||||
title: 'Bang Search failed',
|
|
||||||
exception: error,
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
loading: () => const SizedBox.shrink(),
|
loading: () => const SizedBox.shrink(),
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -83,8 +83,8 @@ class SiteSearch extends HookConsumerWidget {
|
|||||||
width: double.maxFinite,
|
width: double.maxFinite,
|
||||||
child: SelectableChips(
|
child: SelectableChips(
|
||||||
itemId: (bang) => bang.trigger,
|
itemId: (bang) => bang.trigger,
|
||||||
itemAvatar:
|
itemAvatar: (bang) =>
|
||||||
(bang) => UrlIcon([bang.getTemplateUrl('')], iconSize: 20),
|
UrlIcon([bang.getTemplateUrl('')], iconSize: 20),
|
||||||
itemLabel: (bang) => Text(bang.websiteName),
|
itemLabel: (bang) => Text(bang.websiteName),
|
||||||
availableItems: availableBangs,
|
availableItems: availableBangs,
|
||||||
selectedItem: selectedBang,
|
selectedItem: selectedBang,
|
||||||
|
|||||||
@@ -15,8 +15,7 @@ final bottomSheetControllerProvider =
|
|||||||
AutoDisposeNotifierProvider<BottomSheetController, Sheet?>.internal(
|
AutoDisposeNotifierProvider<BottomSheetController, Sheet?>.internal(
|
||||||
BottomSheetController.new,
|
BottomSheetController.new,
|
||||||
name: r'bottomSheetControllerProvider',
|
name: r'bottomSheetControllerProvider',
|
||||||
debugGetCreateSourceHash:
|
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||||
const bool.fromEnvironment('dart.vm.product')
|
|
||||||
? null
|
? null
|
||||||
: _$bottomSheetControllerHash,
|
: _$bottomSheetControllerHash,
|
||||||
dependencies: null,
|
dependencies: null,
|
||||||
@@ -32,8 +31,7 @@ final bottomSheetExtendProvider =
|
|||||||
StreamNotifierProvider<BottomSheetExtend, double>.internal(
|
StreamNotifierProvider<BottomSheetExtend, double>.internal(
|
||||||
BottomSheetExtend.new,
|
BottomSheetExtend.new,
|
||||||
name: r'bottomSheetExtendProvider',
|
name: r'bottomSheetExtendProvider',
|
||||||
debugGetCreateSourceHash:
|
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||||
const bool.fromEnvironment('dart.vm.product')
|
|
||||||
? null
|
? null
|
||||||
: _$bottomSheetExtendHash,
|
: _$bottomSheetExtendHash,
|
||||||
dependencies: null,
|
dependencies: null,
|
||||||
|
|||||||
@@ -14,8 +14,7 @@ final overlayControllerProvider =
|
|||||||
AutoDisposeNotifierProvider<OverlayController, Widget?>.internal(
|
AutoDisposeNotifierProvider<OverlayController, Widget?>.internal(
|
||||||
OverlayController.new,
|
OverlayController.new,
|
||||||
name: r'overlayControllerProvider',
|
name: r'overlayControllerProvider',
|
||||||
debugGetCreateSourceHash:
|
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||||
const bool.fromEnvironment('dart.vm.product')
|
|
||||||
? null
|
? null
|
||||||
: _$overlayControllerHash,
|
: _$overlayControllerHash,
|
||||||
dependencies: null,
|
dependencies: null,
|
||||||
|
|||||||
@@ -129,68 +129,55 @@ class _$TabStateCWProxyImpl implements _$TabStateCWProxy {
|
|||||||
}) {
|
}) {
|
||||||
return TabState(
|
return TabState(
|
||||||
id: _value.id,
|
id: _value.id,
|
||||||
contextId:
|
contextId: contextId == const $CopyWithPlaceholder()
|
||||||
contextId == const $CopyWithPlaceholder()
|
|
||||||
? _value.contextId
|
? _value.contextId
|
||||||
// ignore: cast_nullable_to_non_nullable
|
// ignore: cast_nullable_to_non_nullable
|
||||||
: contextId as String?,
|
: contextId as String?,
|
||||||
url:
|
url: url == const $CopyWithPlaceholder()
|
||||||
url == const $CopyWithPlaceholder()
|
|
||||||
? _value.url
|
? _value.url
|
||||||
// ignore: cast_nullable_to_non_nullable
|
// ignore: cast_nullable_to_non_nullable
|
||||||
: url as Uri,
|
: url as Uri,
|
||||||
title:
|
title: title == const $CopyWithPlaceholder()
|
||||||
title == const $CopyWithPlaceholder()
|
|
||||||
? _value.title
|
? _value.title
|
||||||
// ignore: cast_nullable_to_non_nullable
|
// ignore: cast_nullable_to_non_nullable
|
||||||
: title as String,
|
: title as String,
|
||||||
icon:
|
icon: icon == const $CopyWithPlaceholder()
|
||||||
icon == const $CopyWithPlaceholder()
|
|
||||||
? _value.icon
|
? _value.icon
|
||||||
// ignore: cast_nullable_to_non_nullable
|
// ignore: cast_nullable_to_non_nullable
|
||||||
: icon as EquatableImage?,
|
: icon as EquatableImage?,
|
||||||
thumbnail:
|
thumbnail: thumbnail == const $CopyWithPlaceholder()
|
||||||
thumbnail == const $CopyWithPlaceholder()
|
|
||||||
? _value.thumbnail
|
? _value.thumbnail
|
||||||
// ignore: cast_nullable_to_non_nullable
|
// ignore: cast_nullable_to_non_nullable
|
||||||
: thumbnail as EquatableImage?,
|
: thumbnail as EquatableImage?,
|
||||||
progress:
|
progress: progress == const $CopyWithPlaceholder()
|
||||||
progress == const $CopyWithPlaceholder()
|
|
||||||
? _value.progress
|
? _value.progress
|
||||||
// ignore: cast_nullable_to_non_nullable
|
// ignore: cast_nullable_to_non_nullable
|
||||||
: progress as int,
|
: progress as int,
|
||||||
isPrivate:
|
isPrivate: isPrivate == const $CopyWithPlaceholder()
|
||||||
isPrivate == const $CopyWithPlaceholder()
|
|
||||||
? _value.isPrivate
|
? _value.isPrivate
|
||||||
// ignore: cast_nullable_to_non_nullable
|
// ignore: cast_nullable_to_non_nullable
|
||||||
: isPrivate as bool,
|
: isPrivate as bool,
|
||||||
isFullScreen:
|
isFullScreen: isFullScreen == const $CopyWithPlaceholder()
|
||||||
isFullScreen == const $CopyWithPlaceholder()
|
|
||||||
? _value.isFullScreen
|
? _value.isFullScreen
|
||||||
// ignore: cast_nullable_to_non_nullable
|
// ignore: cast_nullable_to_non_nullable
|
||||||
: isFullScreen as bool,
|
: isFullScreen as bool,
|
||||||
isLoading:
|
isLoading: isLoading == const $CopyWithPlaceholder()
|
||||||
isLoading == const $CopyWithPlaceholder()
|
|
||||||
? _value.isLoading
|
? _value.isLoading
|
||||||
// ignore: cast_nullable_to_non_nullable
|
// ignore: cast_nullable_to_non_nullable
|
||||||
: isLoading as bool,
|
: isLoading as bool,
|
||||||
securityInfoState:
|
securityInfoState: securityInfoState == const $CopyWithPlaceholder()
|
||||||
securityInfoState == const $CopyWithPlaceholder()
|
|
||||||
? _value.securityInfoState
|
? _value.securityInfoState
|
||||||
// ignore: cast_nullable_to_non_nullable
|
// ignore: cast_nullable_to_non_nullable
|
||||||
: securityInfoState as SecurityState,
|
: securityInfoState as SecurityState,
|
||||||
historyState:
|
historyState: historyState == const $CopyWithPlaceholder()
|
||||||
historyState == const $CopyWithPlaceholder()
|
|
||||||
? _value.historyState
|
? _value.historyState
|
||||||
// ignore: cast_nullable_to_non_nullable
|
// ignore: cast_nullable_to_non_nullable
|
||||||
: historyState as HistoryState,
|
: historyState as HistoryState,
|
||||||
readerableState:
|
readerableState: readerableState == const $CopyWithPlaceholder()
|
||||||
readerableState == const $CopyWithPlaceholder()
|
|
||||||
? _value.readerableState
|
? _value.readerableState
|
||||||
// ignore: cast_nullable_to_non_nullable
|
// ignore: cast_nullable_to_non_nullable
|
||||||
: readerableState as ReaderableState,
|
: readerableState as ReaderableState,
|
||||||
findResultState:
|
findResultState: findResultState == const $CopyWithPlaceholder()
|
||||||
findResultState == const $CopyWithPlaceholder()
|
|
||||||
? _value.findResultState
|
? _value.findResultState
|
||||||
// ignore: cast_nullable_to_non_nullable
|
// ignore: cast_nullable_to_non_nullable
|
||||||
: findResultState as FindResultState,
|
: findResultState as FindResultState,
|
||||||
|
|||||||
@@ -85,38 +85,31 @@ class _$WebExtensionStateCWProxyImpl implements _$WebExtensionStateCWProxy {
|
|||||||
Object? icon = const $CopyWithPlaceholder(),
|
Object? icon = const $CopyWithPlaceholder(),
|
||||||
}) {
|
}) {
|
||||||
return WebExtensionState(
|
return WebExtensionState(
|
||||||
extensionId:
|
extensionId: extensionId == const $CopyWithPlaceholder()
|
||||||
extensionId == const $CopyWithPlaceholder()
|
|
||||||
? _value.extensionId
|
? _value.extensionId
|
||||||
// ignore: cast_nullable_to_non_nullable
|
// ignore: cast_nullable_to_non_nullable
|
||||||
: extensionId as String,
|
: extensionId as String,
|
||||||
enabled:
|
enabled: enabled == const $CopyWithPlaceholder()
|
||||||
enabled == const $CopyWithPlaceholder()
|
|
||||||
? _value.enabled
|
? _value.enabled
|
||||||
// ignore: cast_nullable_to_non_nullable
|
// ignore: cast_nullable_to_non_nullable
|
||||||
: enabled as bool,
|
: enabled as bool,
|
||||||
title:
|
title: title == const $CopyWithPlaceholder()
|
||||||
title == const $CopyWithPlaceholder()
|
|
||||||
? _value.title
|
? _value.title
|
||||||
// ignore: cast_nullable_to_non_nullable
|
// ignore: cast_nullable_to_non_nullable
|
||||||
: title as String?,
|
: title as String?,
|
||||||
badgeText:
|
badgeText: badgeText == const $CopyWithPlaceholder()
|
||||||
badgeText == const $CopyWithPlaceholder()
|
|
||||||
? _value.badgeText
|
? _value.badgeText
|
||||||
// ignore: cast_nullable_to_non_nullable
|
// ignore: cast_nullable_to_non_nullable
|
||||||
: badgeText as String?,
|
: badgeText as String?,
|
||||||
badgeTextColor:
|
badgeTextColor: badgeTextColor == const $CopyWithPlaceholder()
|
||||||
badgeTextColor == const $CopyWithPlaceholder()
|
|
||||||
? _value.badgeTextColor
|
? _value.badgeTextColor
|
||||||
// ignore: cast_nullable_to_non_nullable
|
// ignore: cast_nullable_to_non_nullable
|
||||||
: badgeTextColor as Color?,
|
: badgeTextColor as Color?,
|
||||||
badgeBackgroundColor:
|
badgeBackgroundColor: badgeBackgroundColor == const $CopyWithPlaceholder()
|
||||||
badgeBackgroundColor == const $CopyWithPlaceholder()
|
|
||||||
? _value.badgeBackgroundColor
|
? _value.badgeBackgroundColor
|
||||||
// ignore: cast_nullable_to_non_nullable
|
// ignore: cast_nullable_to_non_nullable
|
||||||
: badgeBackgroundColor as Color?,
|
: badgeBackgroundColor as Color?,
|
||||||
icon:
|
icon: icon == const $CopyWithPlaceholder()
|
||||||
icon == const $CopyWithPlaceholder()
|
|
||||||
? _value.icon
|
? _value.icon
|
||||||
// ignore: cast_nullable_to_non_nullable
|
// ignore: cast_nullable_to_non_nullable
|
||||||
: icon as EquatableImage?,
|
: icon as EquatableImage?,
|
||||||
|
|||||||
@@ -15,8 +15,7 @@ final selectionActionServiceProvider =
|
|||||||
Provider<GeckoSelectionActionService>.internal(
|
Provider<GeckoSelectionActionService>.internal(
|
||||||
selectionActionService,
|
selectionActionService,
|
||||||
name: r'selectionActionServiceProvider',
|
name: r'selectionActionServiceProvider',
|
||||||
debugGetCreateSourceHash:
|
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||||
const bool.fromEnvironment('dart.vm.product')
|
|
||||||
? null
|
? null
|
||||||
: _$selectionActionServiceHash,
|
: _$selectionActionServiceHash,
|
||||||
dependencies: null,
|
dependencies: null,
|
||||||
@@ -33,8 +32,9 @@ String _$eventServiceHash() => r'166b01f636fbdd4355dbc55a18ca4f83e0006de8';
|
|||||||
final eventServiceProvider = Provider<GeckoEventService>.internal(
|
final eventServiceProvider = Provider<GeckoEventService>.internal(
|
||||||
eventService,
|
eventService,
|
||||||
name: r'eventServiceProvider',
|
name: r'eventServiceProvider',
|
||||||
debugGetCreateSourceHash:
|
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||||
const bool.fromEnvironment('dart.vm.product') ? null : _$eventServiceHash,
|
? null
|
||||||
|
: _$eventServiceHash,
|
||||||
dependencies: null,
|
dependencies: null,
|
||||||
allTransitiveDependencies: null,
|
allTransitiveDependencies: null,
|
||||||
);
|
);
|
||||||
@@ -49,8 +49,9 @@ String _$addonServiceHash() => r'c7aca09b99c3810908176f3464f5f90a185aa5e7';
|
|||||||
final addonServiceProvider = Provider<GeckoAddonService>.internal(
|
final addonServiceProvider = Provider<GeckoAddonService>.internal(
|
||||||
addonService,
|
addonService,
|
||||||
name: r'addonServiceProvider',
|
name: r'addonServiceProvider',
|
||||||
debugGetCreateSourceHash:
|
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||||
const bool.fromEnvironment('dart.vm.product') ? null : _$addonServiceHash,
|
? null
|
||||||
|
: _$addonServiceHash,
|
||||||
dependencies: null,
|
dependencies: null,
|
||||||
allTransitiveDependencies: null,
|
allTransitiveDependencies: null,
|
||||||
);
|
);
|
||||||
@@ -65,8 +66,7 @@ String _$tabContentServiceHash() => r'd9a991add907ecc138c62790883e59d8e9aa9266';
|
|||||||
final tabContentServiceProvider = Provider<GeckoTabContentService>.internal(
|
final tabContentServiceProvider = Provider<GeckoTabContentService>.internal(
|
||||||
tabContentService,
|
tabContentService,
|
||||||
name: r'tabContentServiceProvider',
|
name: r'tabContentServiceProvider',
|
||||||
debugGetCreateSourceHash:
|
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||||
const bool.fromEnvironment('dart.vm.product')
|
|
||||||
? null
|
? null
|
||||||
: _$tabContentServiceHash,
|
: _$tabContentServiceHash,
|
||||||
dependencies: null,
|
dependencies: null,
|
||||||
@@ -85,8 +85,7 @@ final engineSuggestionsServiceProvider =
|
|||||||
Provider<GeckoSuggestionsService>.internal(
|
Provider<GeckoSuggestionsService>.internal(
|
||||||
engineSuggestionsService,
|
engineSuggestionsService,
|
||||||
name: r'engineSuggestionsServiceProvider',
|
name: r'engineSuggestionsServiceProvider',
|
||||||
debugGetCreateSourceHash:
|
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||||
const bool.fromEnvironment('dart.vm.product')
|
|
||||||
? null
|
? null
|
||||||
: _$engineSuggestionsServiceHash,
|
: _$engineSuggestionsServiceHash,
|
||||||
dependencies: null,
|
dependencies: null,
|
||||||
@@ -104,8 +103,7 @@ final engineReadyStateProvider =
|
|||||||
NotifierProvider<EngineReadyState, bool>.internal(
|
NotifierProvider<EngineReadyState, bool>.internal(
|
||||||
EngineReadyState.new,
|
EngineReadyState.new,
|
||||||
name: r'engineReadyStateProvider',
|
name: r'engineReadyStateProvider',
|
||||||
debugGetCreateSourceHash:
|
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||||
const bool.fromEnvironment('dart.vm.product')
|
|
||||||
? null
|
? null
|
||||||
: _$engineReadyStateHash,
|
: _$engineReadyStateHash,
|
||||||
dependencies: null,
|
dependencies: null,
|
||||||
|
|||||||
@@ -15,8 +15,7 @@ final browserExtensionServiceProvider =
|
|||||||
Provider<GeckoBrowserExtensionService>.internal(
|
Provider<GeckoBrowserExtensionService>.internal(
|
||||||
browserExtensionService,
|
browserExtensionService,
|
||||||
name: r'browserExtensionServiceProvider',
|
name: r'browserExtensionServiceProvider',
|
||||||
debugGetCreateSourceHash:
|
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||||
const bool.fromEnvironment('dart.vm.product')
|
|
||||||
? null
|
? null
|
||||||
: _$browserExtensionServiceHash,
|
: _$browserExtensionServiceHash,
|
||||||
dependencies: null,
|
dependencies: null,
|
||||||
@@ -33,8 +32,7 @@ String _$feedRequestedHash() => r'4f179d0878072a77a87422ff6afdac53a3d57c04';
|
|||||||
final feedRequestedProvider = AutoDisposeStreamProvider<String>.internal(
|
final feedRequestedProvider = AutoDisposeStreamProvider<String>.internal(
|
||||||
feedRequested,
|
feedRequested,
|
||||||
name: r'feedRequestedProvider',
|
name: r'feedRequestedProvider',
|
||||||
debugGetCreateSourceHash:
|
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||||
const bool.fromEnvironment('dart.vm.product')
|
|
||||||
? null
|
? null
|
||||||
: _$feedRequestedHash,
|
: _$feedRequestedHash,
|
||||||
dependencies: null,
|
dependencies: null,
|
||||||
|
|||||||
@@ -13,8 +13,9 @@ String _$selectedTabHash() => r'12b670dd76c3416e8d62bafd63bf69a83a603e3a';
|
|||||||
final selectedTabProvider = NotifierProvider<SelectedTab, String?>.internal(
|
final selectedTabProvider = NotifierProvider<SelectedTab, String?>.internal(
|
||||||
SelectedTab.new,
|
SelectedTab.new,
|
||||||
name: r'selectedTabProvider',
|
name: r'selectedTabProvider',
|
||||||
debugGetCreateSourceHash:
|
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||||
const bool.fromEnvironment('dart.vm.product') ? null : _$selectedTabHash,
|
? null
|
||||||
|
: _$selectedTabHash,
|
||||||
dependencies: null,
|
dependencies: null,
|
||||||
allTransitiveDependencies: null,
|
allTransitiveDependencies: null,
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -14,8 +14,9 @@ final tabListProvider =
|
|||||||
NotifierProvider<TabList, EquatableValue<List<String>>>.internal(
|
NotifierProvider<TabList, EquatableValue<List<String>>>.internal(
|
||||||
TabList.new,
|
TabList.new,
|
||||||
name: r'tabListProvider',
|
name: r'tabListProvider',
|
||||||
debugGetCreateSourceHash:
|
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||||
const bool.fromEnvironment('dart.vm.product') ? null : _$tabListHash,
|
? null
|
||||||
|
: _$tabListHash,
|
||||||
dependencies: null,
|
dependencies: null,
|
||||||
allTransitiveDependencies: null,
|
allTransitiveDependencies: null,
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -48,8 +48,7 @@ class TabSession extends _$TabSession {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
void build({required String? tabId}) {
|
void build({required String? tabId}) {
|
||||||
_sessionService =
|
_sessionService = (tabId != null)
|
||||||
(tabId != null)
|
|
||||||
? GeckoSessionService(tabId: tabId)
|
? GeckoSessionService(tabId: tabId)
|
||||||
: GeckoSessionService.forActiveTab();
|
: GeckoSessionService.forActiveTab();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,8 +15,7 @@ final selectedTabSessionNotifierProvider =
|
|||||||
AutoDisposeProvider<Raw<TabSession>>.internal(
|
AutoDisposeProvider<Raw<TabSession>>.internal(
|
||||||
selectedTabSessionNotifier,
|
selectedTabSessionNotifier,
|
||||||
name: r'selectedTabSessionNotifierProvider',
|
name: r'selectedTabSessionNotifierProvider',
|
||||||
debugGetCreateSourceHash:
|
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||||
const bool.fromEnvironment('dart.vm.product')
|
|
||||||
? null
|
? null
|
||||||
: _$selectedTabSessionNotifierHash,
|
: _$selectedTabSessionNotifierHash,
|
||||||
dependencies: null,
|
dependencies: null,
|
||||||
@@ -100,8 +99,7 @@ class TabSessionProvider
|
|||||||
() => TabSession()..tabId = tabId,
|
() => TabSession()..tabId = tabId,
|
||||||
from: tabSessionProvider,
|
from: tabSessionProvider,
|
||||||
name: r'tabSessionProvider',
|
name: r'tabSessionProvider',
|
||||||
debugGetCreateSourceHash:
|
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||||
const bool.fromEnvironment('dart.vm.product')
|
|
||||||
? null
|
? null
|
||||||
: _$tabSessionHash,
|
: _$tabSessionHash,
|
||||||
dependencies: TabSessionFamily._dependencies,
|
dependencies: TabSessionFamily._dependencies,
|
||||||
|
|||||||
@@ -26,8 +26,7 @@ class TabStates extends _$TabStates {
|
|||||||
..[contentState.id] = current.copyWith(
|
..[contentState.id] = current.copyWith(
|
||||||
contextId: contentState.contextId,
|
contextId: contentState.contextId,
|
||||||
url: Uri.parse(contentState.url),
|
url: Uri.parse(contentState.url),
|
||||||
title:
|
title: (contentState.title.isNotEmpty)
|
||||||
(contentState.title.isNotEmpty)
|
|
||||||
? contentState.title
|
? contentState.title
|
||||||
: current.title,
|
: current.title,
|
||||||
progress: contentState.progress,
|
progress: contentState.progress,
|
||||||
@@ -76,13 +75,10 @@ class TabStates extends _$TabStates {
|
|||||||
state = {...state}
|
state = {...state}
|
||||||
..[tabId] = current.copyWith.historyState(
|
..[tabId] = current.copyWith.historyState(
|
||||||
HistoryState(
|
HistoryState(
|
||||||
items:
|
items: history.items.nonNulls
|
||||||
history.items.nonNulls
|
|
||||||
.map(
|
.map(
|
||||||
(item) => HistoryItem(
|
(item) =>
|
||||||
url: Uri.parse(item.url),
|
HistoryItem(url: Uri.parse(item.url), title: item.title),
|
||||||
title: item.title,
|
|
||||||
),
|
|
||||||
)
|
)
|
||||||
.toList(),
|
.toList(),
|
||||||
currentIndex: history.currentIndex,
|
currentIndex: history.currentIndex,
|
||||||
|
|||||||
@@ -71,8 +71,7 @@ class TabStateProvider extends AutoDisposeProvider<TabState?> {
|
|||||||
(ref) => tabState(ref as TabStateRef, tabId),
|
(ref) => tabState(ref as TabStateRef, tabId),
|
||||||
from: tabStateProvider,
|
from: tabStateProvider,
|
||||||
name: r'tabStateProvider',
|
name: r'tabStateProvider',
|
||||||
debugGetCreateSourceHash:
|
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||||
const bool.fromEnvironment('dart.vm.product')
|
|
||||||
? null
|
? null
|
||||||
: _$tabStateHash,
|
: _$tabStateHash,
|
||||||
dependencies: TabStateFamily._dependencies,
|
dependencies: TabStateFamily._dependencies,
|
||||||
@@ -149,8 +148,7 @@ String _$selectedTabStateHash() => r'dbd36af7af286bd9d079f30e8e11bbda23bf7728';
|
|||||||
final selectedTabStateProvider = AutoDisposeProvider<TabState?>.internal(
|
final selectedTabStateProvider = AutoDisposeProvider<TabState?>.internal(
|
||||||
selectedTabState,
|
selectedTabState,
|
||||||
name: r'selectedTabStateProvider',
|
name: r'selectedTabStateProvider',
|
||||||
debugGetCreateSourceHash:
|
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||||
const bool.fromEnvironment('dart.vm.product')
|
|
||||||
? null
|
? null
|
||||||
: _$selectedTabStateHash,
|
: _$selectedTabStateHash,
|
||||||
dependencies: null,
|
dependencies: null,
|
||||||
@@ -168,8 +166,7 @@ final tabStatesProvider =
|
|||||||
NotifierProvider<TabStates, Map<String, TabState>>.internal(
|
NotifierProvider<TabStates, Map<String, TabState>>.internal(
|
||||||
TabStates.new,
|
TabStates.new,
|
||||||
name: r'tabStatesProvider',
|
name: r'tabStatesProvider',
|
||||||
debugGetCreateSourceHash:
|
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||||
const bool.fromEnvironment('dart.vm.product')
|
|
||||||
? null
|
? null
|
||||||
: _$tabStatesHash,
|
: _$tabStatesHash,
|
||||||
dependencies: null,
|
dependencies: null,
|
||||||
|
|||||||
@@ -86,8 +86,7 @@ class WebExtensionsStateProvider
|
|||||||
() => WebExtensionsState()..actionType = actionType,
|
() => WebExtensionsState()..actionType = actionType,
|
||||||
from: webExtensionsStateProvider,
|
from: webExtensionsStateProvider,
|
||||||
name: r'webExtensionsStateProvider',
|
name: r'webExtensionsStateProvider',
|
||||||
debugGetCreateSourceHash:
|
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||||
const bool.fromEnvironment('dart.vm.product')
|
|
||||||
? null
|
? null
|
||||||
: _$webExtensionsStateHash,
|
: _$webExtensionsStateHash,
|
||||||
dependencies: WebExtensionsStateFamily._dependencies,
|
dependencies: WebExtensionsStateFamily._dependencies,
|
||||||
|
|||||||
@@ -49,8 +49,9 @@ class TabRepository extends _$TabRepository {
|
|||||||
HistoryMetadataKey? historyMetadata,
|
HistoryMetadataKey? historyMetadata,
|
||||||
Map<String, String>? additionalHeaders,
|
Map<String, String>? additionalHeaders,
|
||||||
}) async {
|
}) async {
|
||||||
final selectedContainer =
|
final selectedContainer = await ref
|
||||||
await ref.read(selectedContainerProvider.notifier).fetchData();
|
.read(selectedContainerProvider.notifier)
|
||||||
|
.fetchData();
|
||||||
|
|
||||||
return ref.read(tabDatabaseProvider).tabDao.upsertContainerTabTransactional(
|
return ref.read(tabDatabaseProvider).tabDao.upsertContainerTabTransactional(
|
||||||
() {
|
() {
|
||||||
@@ -124,8 +125,8 @@ class TabRepository extends _$TabRepository {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (containerData.metadata.useProxy) {
|
if (containerData.metadata.useProxy) {
|
||||||
final proxyPluginHealthy =
|
final proxyPluginHealthy = await GeckoContainerProxyService()
|
||||||
await GeckoContainerProxyService().healthcheck();
|
.healthcheck();
|
||||||
|
|
||||||
if (!proxyPluginHealthy) {
|
if (!proxyPluginHealthy) {
|
||||||
logger.w(
|
logger.w(
|
||||||
@@ -170,8 +171,7 @@ class TabRepository extends _$TabRepository {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//We only take containers without authentication!
|
//We only take containers without authentication!
|
||||||
final availableContainers =
|
final availableContainers = await ref
|
||||||
await ref
|
|
||||||
.read(containerRepositoryProvider.notifier)
|
.read(containerRepositoryProvider.notifier)
|
||||||
.getAllContainersWithCount();
|
.getAllContainersWithCount();
|
||||||
|
|
||||||
|
|||||||
@@ -13,8 +13,7 @@ String _$tabRepositoryHash() => r'9b7ef03bec41f149b3cb456b73d7ee0e1b2804df';
|
|||||||
final tabRepositoryProvider = NotifierProvider<TabRepository, void>.internal(
|
final tabRepositoryProvider = NotifierProvider<TabRepository, void>.internal(
|
||||||
TabRepository.new,
|
TabRepository.new,
|
||||||
name: r'tabRepositoryProvider',
|
name: r'tabRepositoryProvider',
|
||||||
debugGetCreateSourceHash:
|
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||||
const bool.fromEnvironment('dart.vm.product')
|
|
||||||
? null
|
? null
|
||||||
: _$tabRepositoryHash,
|
: _$tabRepositoryHash,
|
||||||
dependencies: null,
|
dependencies: null,
|
||||||
|
|||||||
@@ -92,13 +92,11 @@ EquatableValue<List<String>> seamlessFilteredTabIds(
|
|||||||
TabSearchPartition searchPartition,
|
TabSearchPartition searchPartition,
|
||||||
ContainerFilter containerFilter,
|
ContainerFilter containerFilter,
|
||||||
) {
|
) {
|
||||||
final tabSearchResults =
|
final tabSearchResults = ref
|
||||||
ref
|
|
||||||
.watch(
|
.watch(
|
||||||
tabSearchRepositoryProvider(searchPartition).select(
|
tabSearchRepositoryProvider(searchPartition).select(
|
||||||
(value) => EquatableValue(
|
(value) =>
|
||||||
value.valueOrNull?.map((tab) => tab.id).toList(),
|
EquatableValue(value.valueOrNull?.map((tab) => tab.id).toList()),
|
||||||
),
|
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
.value;
|
.value;
|
||||||
@@ -120,8 +118,7 @@ EquatableValue<List<TabPreview>> seamlessFilteredTabPreviews(
|
|||||||
TabSearchPartition searchPartition,
|
TabSearchPartition searchPartition,
|
||||||
ContainerFilter containerFilter,
|
ContainerFilter containerFilter,
|
||||||
) {
|
) {
|
||||||
final tabSearchResults =
|
final tabSearchResults = ref
|
||||||
ref
|
|
||||||
.watch(
|
.watch(
|
||||||
tabSearchRepositoryProvider(
|
tabSearchRepositoryProvider(
|
||||||
searchPartition,
|
searchPartition,
|
||||||
|
|||||||
@@ -74,8 +74,7 @@ class AvailableTabIdsProvider
|
|||||||
(ref) => availableTabIds(ref as AvailableTabIdsRef, containerFilter),
|
(ref) => availableTabIds(ref as AvailableTabIdsRef, containerFilter),
|
||||||
from: availableTabIdsProvider,
|
from: availableTabIdsProvider,
|
||||||
name: r'availableTabIdsProvider',
|
name: r'availableTabIdsProvider',
|
||||||
debugGetCreateSourceHash:
|
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||||
const bool.fromEnvironment('dart.vm.product')
|
|
||||||
? null
|
? null
|
||||||
: _$availableTabIdsHash,
|
: _$availableTabIdsHash,
|
||||||
dependencies: AvailableTabIdsFamily._dependencies,
|
dependencies: AvailableTabIdsFamily._dependencies,
|
||||||
@@ -202,8 +201,7 @@ class AvailableTabStatesProvider
|
|||||||
availableTabStates(ref as AvailableTabStatesRef, containerFilter),
|
availableTabStates(ref as AvailableTabStatesRef, containerFilter),
|
||||||
from: availableTabStatesProvider,
|
from: availableTabStatesProvider,
|
||||||
name: r'availableTabStatesProvider',
|
name: r'availableTabStatesProvider',
|
||||||
debugGetCreateSourceHash:
|
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||||
const bool.fromEnvironment('dart.vm.product')
|
|
||||||
? null
|
? null
|
||||||
: _$availableTabStatesHash,
|
: _$availableTabStatesHash,
|
||||||
dependencies: AvailableTabStatesFamily._dependencies,
|
dependencies: AvailableTabStatesFamily._dependencies,
|
||||||
@@ -342,8 +340,7 @@ class SeamlessFilteredTabIdsProvider
|
|||||||
),
|
),
|
||||||
from: seamlessFilteredTabIdsProvider,
|
from: seamlessFilteredTabIdsProvider,
|
||||||
name: r'seamlessFilteredTabIdsProvider',
|
name: r'seamlessFilteredTabIdsProvider',
|
||||||
debugGetCreateSourceHash:
|
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||||
const bool.fromEnvironment('dart.vm.product')
|
|
||||||
? null
|
? null
|
||||||
: _$seamlessFilteredTabIdsHash,
|
: _$seamlessFilteredTabIdsHash,
|
||||||
dependencies: SeamlessFilteredTabIdsFamily._dependencies,
|
dependencies: SeamlessFilteredTabIdsFamily._dependencies,
|
||||||
@@ -494,8 +491,7 @@ class SeamlessFilteredTabPreviewsProvider
|
|||||||
),
|
),
|
||||||
from: seamlessFilteredTabPreviewsProvider,
|
from: seamlessFilteredTabPreviewsProvider,
|
||||||
name: r'seamlessFilteredTabPreviewsProvider',
|
name: r'seamlessFilteredTabPreviewsProvider',
|
||||||
debugGetCreateSourceHash:
|
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||||
const bool.fromEnvironment('dart.vm.product')
|
|
||||||
? null
|
? null
|
||||||
: _$seamlessFilteredTabPreviewsHash,
|
: _$seamlessFilteredTabPreviewsHash,
|
||||||
dependencies: SeamlessFilteredTabPreviewsFamily._dependencies,
|
dependencies: SeamlessFilteredTabPreviewsFamily._dependencies,
|
||||||
@@ -641,8 +637,7 @@ class SelectedBangTriggerProvider
|
|||||||
() => SelectedBangTrigger()..domain = domain,
|
() => SelectedBangTrigger()..domain = domain,
|
||||||
from: selectedBangTriggerProvider,
|
from: selectedBangTriggerProvider,
|
||||||
name: r'selectedBangTriggerProvider',
|
name: r'selectedBangTriggerProvider',
|
||||||
debugGetCreateSourceHash:
|
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||||
const bool.fromEnvironment('dart.vm.product')
|
|
||||||
? null
|
? null
|
||||||
: _$selectedBangTriggerHash,
|
: _$selectedBangTriggerHash,
|
||||||
dependencies: SelectedBangTriggerFamily._dependencies,
|
dependencies: SelectedBangTriggerFamily._dependencies,
|
||||||
@@ -773,8 +768,7 @@ class SelectedBangDataProvider
|
|||||||
() => SelectedBangData()..domain = domain,
|
() => SelectedBangData()..domain = domain,
|
||||||
from: selectedBangDataProvider,
|
from: selectedBangDataProvider,
|
||||||
name: r'selectedBangDataProvider',
|
name: r'selectedBangDataProvider',
|
||||||
debugGetCreateSourceHash:
|
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||||
const bool.fromEnvironment('dart.vm.product')
|
|
||||||
? null
|
? null
|
||||||
: _$selectedBangDataHash,
|
: _$selectedBangDataHash,
|
||||||
dependencies: SelectedBangDataFamily._dependencies,
|
dependencies: SelectedBangDataFamily._dependencies,
|
||||||
|
|||||||
@@ -11,14 +11,14 @@ String _$engineBoundIntentStreamHash() =>
|
|||||||
|
|
||||||
/// See also [EngineBoundIntentStream].
|
/// See also [EngineBoundIntentStream].
|
||||||
@ProviderFor(EngineBoundIntentStream)
|
@ProviderFor(EngineBoundIntentStream)
|
||||||
final engineBoundIntentStreamProvider = AutoDisposeStreamNotifierProvider<
|
final engineBoundIntentStreamProvider =
|
||||||
|
AutoDisposeStreamNotifierProvider<
|
||||||
EngineBoundIntentStream,
|
EngineBoundIntentStream,
|
||||||
SharedContent
|
SharedContent
|
||||||
>.internal(
|
>.internal(
|
||||||
EngineBoundIntentStream.new,
|
EngineBoundIntentStream.new,
|
||||||
name: r'engineBoundIntentStreamProvider',
|
name: r'engineBoundIntentStreamProvider',
|
||||||
debugGetCreateSourceHash:
|
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||||
const bool.fromEnvironment('dart.vm.product')
|
|
||||||
? null
|
? null
|
||||||
: _$engineBoundIntentStreamHash,
|
: _$engineBoundIntentStreamHash,
|
||||||
dependencies: null,
|
dependencies: null,
|
||||||
|
|||||||
@@ -15,8 +15,7 @@ final browserViewLifecycleProvider =
|
|||||||
NotifierProvider<BrowserViewLifecycle, AppLifecycleState?>.internal(
|
NotifierProvider<BrowserViewLifecycle, AppLifecycleState?>.internal(
|
||||||
BrowserViewLifecycle.new,
|
BrowserViewLifecycle.new,
|
||||||
name: r'browserViewLifecycleProvider',
|
name: r'browserViewLifecycleProvider',
|
||||||
debugGetCreateSourceHash:
|
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||||
const bool.fromEnvironment('dart.vm.product')
|
|
||||||
? null
|
? null
|
||||||
: _$browserViewLifecycleHash,
|
: _$browserViewLifecycleHash,
|
||||||
dependencies: null,
|
dependencies: null,
|
||||||
|
|||||||
@@ -15,8 +15,7 @@ final browserAddonServiceProvider =
|
|||||||
AutoDisposeNotifierProvider<BrowserAddonService, void>.internal(
|
AutoDisposeNotifierProvider<BrowserAddonService, void>.internal(
|
||||||
BrowserAddonService.new,
|
BrowserAddonService.new,
|
||||||
name: r'browserAddonServiceProvider',
|
name: r'browserAddonServiceProvider',
|
||||||
debugGetCreateSourceHash:
|
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||||
const bool.fromEnvironment('dart.vm.product')
|
|
||||||
? null
|
? null
|
||||||
: _$browserAddonServiceHash,
|
: _$browserAddonServiceHash,
|
||||||
dependencies: null,
|
dependencies: null,
|
||||||
|
|||||||
@@ -15,8 +15,7 @@ final browserDataServiceProvider =
|
|||||||
NotifierProvider<BrowserDataService, void>.internal(
|
NotifierProvider<BrowserDataService, void>.internal(
|
||||||
BrowserDataService.new,
|
BrowserDataService.new,
|
||||||
name: r'browserDataServiceProvider',
|
name: r'browserDataServiceProvider',
|
||||||
debugGetCreateSourceHash:
|
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||||
const bool.fromEnvironment('dart.vm.product')
|
|
||||||
? null
|
? null
|
||||||
: _$browserDataServiceHash,
|
: _$browserDataServiceHash,
|
||||||
dependencies: null,
|
dependencies: null,
|
||||||
|
|||||||
+1
-2
@@ -15,8 +15,7 @@ final engineSettingsReplicationServiceProvider =
|
|||||||
NotifierProvider<EngineSettingsReplicationService, void>.internal(
|
NotifierProvider<EngineSettingsReplicationService, void>.internal(
|
||||||
EngineSettingsReplicationService.new,
|
EngineSettingsReplicationService.new,
|
||||||
name: r'engineSettingsReplicationServiceProvider',
|
name: r'engineSettingsReplicationServiceProvider',
|
||||||
debugGetCreateSourceHash:
|
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||||
const bool.fromEnvironment('dart.vm.product')
|
|
||||||
? null
|
? null
|
||||||
: _$engineSettingsReplicationServiceHash,
|
: _$engineSettingsReplicationServiceHash,
|
||||||
dependencies: null,
|
dependencies: null,
|
||||||
|
|||||||
+1
-2
@@ -15,8 +15,7 @@ final proxySettingsReplicationProvider =
|
|||||||
NotifierProvider<ProxySettingsReplication, void>.internal(
|
NotifierProvider<ProxySettingsReplication, void>.internal(
|
||||||
ProxySettingsReplication.new,
|
ProxySettingsReplication.new,
|
||||||
name: r'proxySettingsReplicationProvider',
|
name: r'proxySettingsReplicationProvider',
|
||||||
debugGetCreateSourceHash:
|
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||||
const bool.fromEnvironment('dart.vm.product')
|
|
||||||
? null
|
? null
|
||||||
: _$proxySettingsReplicationHash,
|
: _$proxySettingsReplicationHash,
|
||||||
dependencies: null,
|
dependencies: null,
|
||||||
|
|||||||
+3
-6
@@ -89,13 +89,11 @@ class WebPageDialog extends HookConsumerWidget {
|
|||||||
searchInNewTab: false,
|
searchInNewTab: false,
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
error:
|
error: (error, stackTrace) => FailureWidget(
|
||||||
(error, stackTrace) => FailureWidget(
|
|
||||||
title: 'Could not load bangs',
|
title: 'Could not load bangs',
|
||||||
exception: error,
|
exception: error,
|
||||||
),
|
),
|
||||||
loading:
|
loading: () => SiteSearch(
|
||||||
() => SiteSearch(
|
|
||||||
domain: url.host,
|
domain: url.host,
|
||||||
availableBangs: const [
|
availableBangs: const [
|
||||||
// BangData(
|
// BangData(
|
||||||
@@ -200,8 +198,7 @@ class WebPageDialog extends HookConsumerWidget {
|
|||||||
leading: const Icon(Icons.mobile_screen_share),
|
leading: const Icon(Icons.mobile_screen_share),
|
||||||
title: const Text('Share screenshot'),
|
title: const Text('Share screenshot'),
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
final screenshot =
|
final screenshot = await ref
|
||||||
await ref
|
|
||||||
.read(selectedTabSessionNotifierProvider)
|
.read(selectedTabSessionNotifierProvider)
|
||||||
.requestScreenshot();
|
.requestScreenshot();
|
||||||
|
|
||||||
|
|||||||
@@ -111,8 +111,7 @@ class BrowserScreen extends HookConsumerWidget {
|
|||||||
return displayedOverlay!;
|
return displayedOverlay!;
|
||||||
},
|
},
|
||||||
child: Listener(
|
child: Listener(
|
||||||
onPointerDown:
|
onPointerDown: (displayedSheet != null)
|
||||||
(displayedSheet != null)
|
|
||||||
? (_) {
|
? (_) {
|
||||||
ref
|
ref
|
||||||
.read(bottomSheetControllerProvider.notifier)
|
.read(bottomSheetControllerProvider.notifier)
|
||||||
@@ -220,8 +219,7 @@ class BrowserScreen extends HookConsumerWidget {
|
|||||||
},
|
},
|
||||||
),
|
),
|
||||||
floatingActionButton: ReaderAppearanceButton(),
|
floatingActionButton: ReaderAppearanceButton(),
|
||||||
bottomSheet:
|
bottomSheet: (displayedSheet != null)
|
||||||
(displayedSheet != null)
|
|
||||||
? NotificationListener<DraggableScrollableNotification>(
|
? NotificationListener<DraggableScrollableNotification>(
|
||||||
onNotification: (notification) {
|
onNotification: (notification) {
|
||||||
if (notification.extent <= 0.1) {
|
if (notification.extent <= 0.1) {
|
||||||
|
|||||||
+5
-11
@@ -86,12 +86,10 @@ class BrowserBottomAppBar extends HookConsumerWidget {
|
|||||||
child: AppBar(
|
child: AppBar(
|
||||||
automaticallyImplyLeading: false,
|
automaticallyImplyLeading: false,
|
||||||
titleSpacing: 8.0,
|
titleSpacing: 8.0,
|
||||||
backgroundColor:
|
backgroundColor: (isPrivateTab && displayedSheet is! ViewTabsSheet)
|
||||||
(isPrivateTab && displayedSheet is! ViewTabsSheet)
|
|
||||||
? const Color(0x648000D7)
|
? const Color(0x648000D7)
|
||||||
: null,
|
: null,
|
||||||
title:
|
title: (selectedTabId != null && displayedSheet is! ViewTabsSheet)
|
||||||
(selectedTabId != null && displayedSheet is! ViewTabsSheet)
|
|
||||||
? const AppBarTitle()
|
? const AppBarTitle()
|
||||||
: null,
|
: null,
|
||||||
actions: [
|
actions: [
|
||||||
@@ -349,8 +347,7 @@ class BrowserBottomAppBar extends HookConsumerWidget {
|
|||||||
return Row(
|
return Row(
|
||||||
children: [
|
children: [
|
||||||
Expanded(
|
Expanded(
|
||||||
child:
|
child: (history?.canGoBack == true || isLoading)
|
||||||
(history?.canGoBack == true || isLoading)
|
|
||||||
? IconButton(
|
? IconButton(
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
final controller = ref.read(
|
final controller = ref.read(
|
||||||
@@ -372,9 +369,7 @@ class BrowserBottomAppBar extends HookConsumerWidget {
|
|||||||
: IconButton(
|
: IconButton(
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
await ref
|
await ref
|
||||||
.read(
|
.read(tabRepositoryProvider.notifier)
|
||||||
tabRepositoryProvider.notifier,
|
|
||||||
)
|
|
||||||
.closeTab(selectedTabId);
|
.closeTab(selectedTabId);
|
||||||
trippleDotMenuController.close();
|
trippleDotMenuController.close();
|
||||||
},
|
},
|
||||||
@@ -384,8 +379,7 @@ class BrowserBottomAppBar extends HookConsumerWidget {
|
|||||||
const SizedBox(height: 48, child: VerticalDivider()),
|
const SizedBox(height: 48, child: VerticalDivider()),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: IconButton(
|
child: IconButton(
|
||||||
onPressed:
|
onPressed: (history?.canGoForward == true)
|
||||||
(history?.canGoForward == true)
|
|
||||||
? () async {
|
? () async {
|
||||||
final controller = ref.read(
|
final controller = ref.read(
|
||||||
tabSessionProvider(
|
tabSessionProvider(
|
||||||
|
|||||||
@@ -43,8 +43,7 @@ class TabPreview extends HookWidget {
|
|||||||
borderRadius: const BorderRadius.all(Radius.circular(16.0)),
|
borderRadius: const BorderRadius.all(Radius.circular(16.0)),
|
||||||
),
|
),
|
||||||
child: Material(
|
child: Material(
|
||||||
color:
|
color: tab.isPrivate
|
||||||
tab.isPrivate
|
|
||||||
? const Color(0xFF25003E)
|
? const Color(0xFF25003E)
|
||||||
: colorScheme.surfaceContainerHighest,
|
: colorScheme.surfaceContainerHighest,
|
||||||
borderRadius: const BorderRadius.all(Radius.circular(14.0)),
|
borderRadius: const BorderRadius.all(Radius.circular(14.0)),
|
||||||
@@ -63,8 +62,7 @@ class TabPreview extends HookWidget {
|
|||||||
overflow: TextOverflow.ellipsis,
|
overflow: TextOverflow.ellipsis,
|
||||||
tab.title,
|
tab.title,
|
||||||
maxLines: 2,
|
maxLines: 2,
|
||||||
style:
|
style: tab.isPrivate
|
||||||
tab.isPrivate
|
|
||||||
? const TextStyle(color: Colors.white)
|
? const TextStyle(color: Colors.white)
|
||||||
: null,
|
: null,
|
||||||
),
|
),
|
||||||
|
|||||||
+1
-2
@@ -34,8 +34,7 @@ class TabsActionButton extends HookConsumerWidget {
|
|||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
border: Border.all(
|
border: Border.all(
|
||||||
width: 2.0,
|
width: 2.0,
|
||||||
color:
|
color: isActive
|
||||||
isActive
|
|
||||||
? theme.colorScheme.primary
|
? theme.colorScheme.primary
|
||||||
: DefaultTextStyle.of(context).style.color!,
|
: DefaultTextStyle.of(context).style.color!,
|
||||||
),
|
),
|
||||||
|
|||||||
+2
-4
@@ -45,13 +45,11 @@ class _$FindInPageStateCWProxyImpl implements _$FindInPageStateCWProxy {
|
|||||||
Object? lastSearchText = const $CopyWithPlaceholder(),
|
Object? lastSearchText = const $CopyWithPlaceholder(),
|
||||||
}) {
|
}) {
|
||||||
return FindInPageState(
|
return FindInPageState(
|
||||||
visible:
|
visible: visible == const $CopyWithPlaceholder()
|
||||||
visible == const $CopyWithPlaceholder()
|
|
||||||
? _value.visible
|
? _value.visible
|
||||||
// ignore: cast_nullable_to_non_nullable
|
// ignore: cast_nullable_to_non_nullable
|
||||||
: visible as bool,
|
: visible as bool,
|
||||||
lastSearchText:
|
lastSearchText: lastSearchText == const $CopyWithPlaceholder()
|
||||||
lastSearchText == const $CopyWithPlaceholder()
|
|
||||||
? _value.lastSearchText
|
? _value.lastSearchText
|
||||||
// ignore: cast_nullable_to_non_nullable
|
// ignore: cast_nullable_to_non_nullable
|
||||||
: lastSearchText as String?,
|
: lastSearchText as String?,
|
||||||
|
|||||||
+1
-2
@@ -81,8 +81,7 @@ class FindInPageRepositoryProvider
|
|||||||
() => FindInPageRepository()..tabId = tabId,
|
() => FindInPageRepository()..tabId = tabId,
|
||||||
from: findInPageRepositoryProvider,
|
from: findInPageRepositoryProvider,
|
||||||
name: r'findInPageRepositoryProvider',
|
name: r'findInPageRepositoryProvider',
|
||||||
debugGetCreateSourceHash:
|
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||||
const bool.fromEnvironment('dart.vm.product')
|
|
||||||
? null
|
? null
|
||||||
: _$findInPageRepositoryHash,
|
: _$findInPageRepositoryHash,
|
||||||
dependencies: FindInPageRepositoryFamily._dependencies,
|
dependencies: FindInPageRepositoryFamily._dependencies,
|
||||||
|
|||||||
+1
-2
@@ -15,8 +15,7 @@ final findInPageControllerProvider =
|
|||||||
AutoDisposeNotifierProvider<FindInPageController, FindInPageState>.internal(
|
AutoDisposeNotifierProvider<FindInPageController, FindInPageState>.internal(
|
||||||
FindInPageController.new,
|
FindInPageController.new,
|
||||||
name: r'findInPageControllerProvider',
|
name: r'findInPageControllerProvider',
|
||||||
debugGetCreateSourceHash:
|
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||||
const bool.fromEnvironment('dart.vm.product')
|
|
||||||
? null
|
? null
|
||||||
: _$findInPageControllerHash,
|
: _$findInPageControllerHash,
|
||||||
dependencies: null,
|
dependencies: null,
|
||||||
|
|||||||
+8
-16
@@ -50,13 +50,11 @@ class _$PreferenceSettingGroupCWProxyImpl
|
|||||||
Object? settings = const $CopyWithPlaceholder(),
|
Object? settings = const $CopyWithPlaceholder(),
|
||||||
}) {
|
}) {
|
||||||
return PreferenceSettingGroup(
|
return PreferenceSettingGroup(
|
||||||
description:
|
description: description == const $CopyWithPlaceholder()
|
||||||
description == const $CopyWithPlaceholder()
|
|
||||||
? _value.description
|
? _value.description
|
||||||
// ignore: cast_nullable_to_non_nullable
|
// ignore: cast_nullable_to_non_nullable
|
||||||
: description as String?,
|
: description as String?,
|
||||||
settings:
|
settings: settings == const $CopyWithPlaceholder()
|
||||||
settings == const $CopyWithPlaceholder()
|
|
||||||
? _value.settings
|
? _value.settings
|
||||||
// ignore: cast_nullable_to_non_nullable
|
// ignore: cast_nullable_to_non_nullable
|
||||||
: settings as Map<String, PreferenceSetting>,
|
: settings as Map<String, PreferenceSetting>,
|
||||||
@@ -144,33 +142,27 @@ class _$PreferenceSettingCWProxyImpl implements _$PreferenceSettingCWProxy {
|
|||||||
Object? shouldBeDefault = const $CopyWithPlaceholder(),
|
Object? shouldBeDefault = const $CopyWithPlaceholder(),
|
||||||
}) {
|
}) {
|
||||||
return PreferenceSetting(
|
return PreferenceSetting(
|
||||||
value:
|
value: value == const $CopyWithPlaceholder()
|
||||||
value == const $CopyWithPlaceholder()
|
|
||||||
? _value.value
|
? _value.value
|
||||||
// ignore: cast_nullable_to_non_nullable
|
// ignore: cast_nullable_to_non_nullable
|
||||||
: value as Object,
|
: value as Object,
|
||||||
title:
|
title: title == const $CopyWithPlaceholder()
|
||||||
title == const $CopyWithPlaceholder()
|
|
||||||
? _value.title
|
? _value.title
|
||||||
// ignore: cast_nullable_to_non_nullable
|
// ignore: cast_nullable_to_non_nullable
|
||||||
: title as String?,
|
: title as String?,
|
||||||
description:
|
description: description == const $CopyWithPlaceholder()
|
||||||
description == const $CopyWithPlaceholder()
|
|
||||||
? _value.description
|
? _value.description
|
||||||
// ignore: cast_nullable_to_non_nullable
|
// ignore: cast_nullable_to_non_nullable
|
||||||
: description as String?,
|
: description as String?,
|
||||||
actualValue:
|
actualValue: actualValue == const $CopyWithPlaceholder()
|
||||||
actualValue == const $CopyWithPlaceholder()
|
|
||||||
? _value.actualValue
|
? _value.actualValue
|
||||||
// ignore: cast_nullable_to_non_nullable
|
// ignore: cast_nullable_to_non_nullable
|
||||||
: actualValue as Object?,
|
: actualValue as Object?,
|
||||||
requireUserOptIn:
|
requireUserOptIn: requireUserOptIn == const $CopyWithPlaceholder()
|
||||||
requireUserOptIn == const $CopyWithPlaceholder()
|
|
||||||
? _value.requireUserOptIn
|
? _value.requireUserOptIn
|
||||||
// ignore: cast_nullable_to_non_nullable
|
// ignore: cast_nullable_to_non_nullable
|
||||||
: requireUserOptIn as bool,
|
: requireUserOptIn as bool,
|
||||||
shouldBeDefault:
|
shouldBeDefault: shouldBeDefault == const $CopyWithPlaceholder()
|
||||||
shouldBeDefault == const $CopyWithPlaceholder()
|
|
||||||
? _value.shouldBeDefault
|
? _value.shouldBeDefault
|
||||||
// ignore: cast_nullable_to_non_nullable
|
// ignore: cast_nullable_to_non_nullable
|
||||||
: shouldBeDefault as bool,
|
: shouldBeDefault as bool,
|
||||||
|
|||||||
+1
-2
@@ -107,8 +107,7 @@ class UnifiedPreferenceSettingsRepository
|
|||||||
_preferenceSettingGroupsProvider(partition).future,
|
_preferenceSettingGroupsProvider(partition).future,
|
||||||
);
|
);
|
||||||
|
|
||||||
final prefs =
|
final prefs = _statelessGroups!.values
|
||||||
_statelessGroups!.values
|
|
||||||
.map((group) => group.settings.keys)
|
.map((group) => group.settings.keys)
|
||||||
.flattened
|
.flattened
|
||||||
.toList();
|
.toList();
|
||||||
|
|||||||
+11
-19
@@ -15,8 +15,7 @@ final _preferenceSettingContentProvider =
|
|||||||
FutureProvider<Map<String, dynamic>>.internal(
|
FutureProvider<Map<String, dynamic>>.internal(
|
||||||
_preferenceSettingContent,
|
_preferenceSettingContent,
|
||||||
name: r'_preferenceSettingContentProvider',
|
name: r'_preferenceSettingContentProvider',
|
||||||
debugGetCreateSourceHash:
|
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||||
const bool.fromEnvironment('dart.vm.product')
|
|
||||||
? null
|
? null
|
||||||
: _$preferenceSettingContentHash,
|
: _$preferenceSettingContentHash,
|
||||||
dependencies: null,
|
dependencies: null,
|
||||||
@@ -99,8 +98,7 @@ class _PreferenceSettingGroupsProvider
|
|||||||
),
|
),
|
||||||
from: _preferenceSettingGroupsProvider,
|
from: _preferenceSettingGroupsProvider,
|
||||||
name: r'_preferenceSettingGroupsProvider',
|
name: r'_preferenceSettingGroupsProvider',
|
||||||
debugGetCreateSourceHash:
|
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||||
const bool.fromEnvironment('dart.vm.product')
|
|
||||||
? null
|
? null
|
||||||
: _$preferenceSettingGroupsHash,
|
: _$preferenceSettingGroupsHash,
|
||||||
dependencies: _PreferenceSettingGroupsFamily._dependencies,
|
dependencies: _PreferenceSettingGroupsFamily._dependencies,
|
||||||
@@ -238,8 +236,7 @@ class _PreferenceSettingGroupProvider
|
|||||||
),
|
),
|
||||||
from: _preferenceSettingGroupProvider,
|
from: _preferenceSettingGroupProvider,
|
||||||
name: r'_preferenceSettingGroupProvider',
|
name: r'_preferenceSettingGroupProvider',
|
||||||
debugGetCreateSourceHash:
|
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||||
const bool.fromEnvironment('dart.vm.product')
|
|
||||||
? null
|
? null
|
||||||
: _$preferenceSettingGroupHash,
|
: _$preferenceSettingGroupHash,
|
||||||
dependencies: _PreferenceSettingGroupFamily._dependencies,
|
dependencies: _PreferenceSettingGroupFamily._dependencies,
|
||||||
@@ -334,14 +331,14 @@ String _$preferenceRepositoryHash() =>
|
|||||||
|
|
||||||
/// See also [_PreferenceRepository].
|
/// See also [_PreferenceRepository].
|
||||||
@ProviderFor(_PreferenceRepository)
|
@ProviderFor(_PreferenceRepository)
|
||||||
final _preferenceRepositoryProvider = AutoDisposeNotifierProvider<
|
final _preferenceRepositoryProvider =
|
||||||
|
AutoDisposeNotifierProvider<
|
||||||
_PreferenceRepository,
|
_PreferenceRepository,
|
||||||
Raw<Stream<Map<String, Object>>>
|
Raw<Stream<Map<String, Object>>>
|
||||||
>.internal(
|
>.internal(
|
||||||
_PreferenceRepository.new,
|
_PreferenceRepository.new,
|
||||||
name: r'_preferenceRepositoryProvider',
|
name: r'_preferenceRepositoryProvider',
|
||||||
debugGetCreateSourceHash:
|
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||||
const bool.fromEnvironment('dart.vm.product')
|
|
||||||
? null
|
? null
|
||||||
: _$preferenceRepositoryHash,
|
: _$preferenceRepositoryHash,
|
||||||
dependencies: null,
|
dependencies: null,
|
||||||
@@ -418,13 +415,11 @@ class UnifiedPreferenceSettingsRepositoryProvider
|
|||||||
() => UnifiedPreferenceSettingsRepository()..partition = partition,
|
() => UnifiedPreferenceSettingsRepository()..partition = partition,
|
||||||
from: unifiedPreferenceSettingsRepositoryProvider,
|
from: unifiedPreferenceSettingsRepositoryProvider,
|
||||||
name: r'unifiedPreferenceSettingsRepositoryProvider',
|
name: r'unifiedPreferenceSettingsRepositoryProvider',
|
||||||
debugGetCreateSourceHash:
|
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||||
const bool.fromEnvironment('dart.vm.product')
|
|
||||||
? null
|
? null
|
||||||
: _$unifiedPreferenceSettingsRepositoryHash,
|
: _$unifiedPreferenceSettingsRepositoryHash,
|
||||||
dependencies: UnifiedPreferenceSettingsRepositoryFamily._dependencies,
|
dependencies: UnifiedPreferenceSettingsRepositoryFamily._dependencies,
|
||||||
allTransitiveDependencies:
|
allTransitiveDependencies: UnifiedPreferenceSettingsRepositoryFamily
|
||||||
UnifiedPreferenceSettingsRepositoryFamily
|
|
||||||
._allTransitiveDependencies,
|
._allTransitiveDependencies,
|
||||||
partition: partition,
|
partition: partition,
|
||||||
);
|
);
|
||||||
@@ -580,14 +575,12 @@ class PreferenceSettingsGroupRepositoryProvider
|
|||||||
PreferencePartition partition,
|
PreferencePartition partition,
|
||||||
String groupName,
|
String groupName,
|
||||||
) : this._internal(
|
) : this._internal(
|
||||||
() =>
|
() => PreferenceSettingsGroupRepository()
|
||||||
PreferenceSettingsGroupRepository()
|
|
||||||
..partition = partition
|
..partition = partition
|
||||||
..groupName = groupName,
|
..groupName = groupName,
|
||||||
from: preferenceSettingsGroupRepositoryProvider,
|
from: preferenceSettingsGroupRepositoryProvider,
|
||||||
name: r'preferenceSettingsGroupRepositoryProvider',
|
name: r'preferenceSettingsGroupRepositoryProvider',
|
||||||
debugGetCreateSourceHash:
|
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||||
const bool.fromEnvironment('dart.vm.product')
|
|
||||||
? null
|
? null
|
||||||
: _$preferenceSettingsGroupRepositoryHash,
|
: _$preferenceSettingsGroupRepositoryHash,
|
||||||
dependencies: PreferenceSettingsGroupRepositoryFamily._dependencies,
|
dependencies: PreferenceSettingsGroupRepositoryFamily._dependencies,
|
||||||
@@ -623,8 +616,7 @@ class PreferenceSettingsGroupRepositoryProvider
|
|||||||
return ProviderOverride(
|
return ProviderOverride(
|
||||||
origin: this,
|
origin: this,
|
||||||
override: PreferenceSettingsGroupRepositoryProvider._internal(
|
override: PreferenceSettingsGroupRepositoryProvider._internal(
|
||||||
() =>
|
() => create()
|
||||||
create()
|
|
||||||
..partition = partition
|
..partition = partition
|
||||||
..groupName = groupName,
|
..groupName = groupName,
|
||||||
from: from,
|
from: from,
|
||||||
|
|||||||
@@ -13,8 +13,7 @@ String _$readerableServiceHash() => r'03182c8afc41f5184322a3206473cbfa96df5819';
|
|||||||
final readerableServiceProvider = Provider<GeckoReaderableService>.internal(
|
final readerableServiceProvider = Provider<GeckoReaderableService>.internal(
|
||||||
readerableService,
|
readerableService,
|
||||||
name: r'readerableServiceProvider',
|
name: r'readerableServiceProvider',
|
||||||
debugGetCreateSourceHash:
|
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||||
const bool.fromEnvironment('dart.vm.product')
|
|
||||||
? null
|
? null
|
||||||
: _$readerableServiceHash,
|
: _$readerableServiceHash,
|
||||||
dependencies: null,
|
dependencies: null,
|
||||||
@@ -33,8 +32,7 @@ final appearanceButtonVisibilityProvider =
|
|||||||
AutoDisposeStreamProvider<bool>.internal(
|
AutoDisposeStreamProvider<bool>.internal(
|
||||||
appearanceButtonVisibility,
|
appearanceButtonVisibility,
|
||||||
name: r'appearanceButtonVisibilityProvider',
|
name: r'appearanceButtonVisibilityProvider',
|
||||||
debugGetCreateSourceHash:
|
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||||
const bool.fromEnvironment('dart.vm.product')
|
|
||||||
? null
|
? null
|
||||||
: _$appearanceButtonVisibilityHash,
|
: _$appearanceButtonVisibilityHash,
|
||||||
dependencies: null,
|
dependencies: null,
|
||||||
|
|||||||
+1
-2
@@ -15,8 +15,7 @@ final readerableScreenControllerProvider =
|
|||||||
AsyncNotifierProvider<ReaderableScreenController, void>.internal(
|
AsyncNotifierProvider<ReaderableScreenController, void>.internal(
|
||||||
ReaderableScreenController.new,
|
ReaderableScreenController.new,
|
||||||
name: r'readerableScreenControllerProvider',
|
name: r'readerableScreenControllerProvider',
|
||||||
debugGetCreateSourceHash:
|
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||||
const bool.fromEnvironment('dart.vm.product')
|
|
||||||
? null
|
? null
|
||||||
: _$readerableScreenControllerHash,
|
: _$readerableScreenControllerHash,
|
||||||
dependencies: null,
|
dependencies: null,
|
||||||
|
|||||||
+6
-16
@@ -32,12 +32,8 @@ class ReaderButton extends HookConsumerWidget {
|
|||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
final icon =
|
final icon = readerabilityState.active
|
||||||
readerabilityState.active
|
? Icon(MdiIcons.bookOpen, color: Theme.of(context).colorScheme.primary)
|
||||||
? Icon(
|
|
||||||
MdiIcons.bookOpen,
|
|
||||||
color: Theme.of(context).colorScheme.primary,
|
|
||||||
)
|
|
||||||
: Icon(
|
: Icon(
|
||||||
MdiIcons.bookOpenOutline,
|
MdiIcons.bookOpenOutline,
|
||||||
color: Theme.of(context).colorScheme.onSurface,
|
color: Theme.of(context).colorScheme.onSurface,
|
||||||
@@ -50,10 +46,8 @@ class ReaderButton extends HookConsumerWidget {
|
|||||||
(enforceReadability && enableReadability),
|
(enforceReadability && enableReadability),
|
||||||
child: readerChanging.when(
|
child: readerChanging.when(
|
||||||
skipLoadingOnReload: true,
|
skipLoadingOnReload: true,
|
||||||
data:
|
data: (_) => InkWell(
|
||||||
(_) => InkWell(
|
onTap: readerChanging.isLoading
|
||||||
onTap:
|
|
||||||
readerChanging.isLoading
|
|
||||||
? null
|
? null
|
||||||
: () async {
|
: () async {
|
||||||
await ref
|
await ref
|
||||||
@@ -69,15 +63,11 @@ class ReaderButton extends HookConsumerWidget {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
error: (error, stackTrace) => SizedBox.shrink(),
|
error: (error, stackTrace) => SizedBox.shrink(),
|
||||||
loading:
|
loading: () => AnimateGradientShader(
|
||||||
() => AnimateGradientShader(
|
|
||||||
duration: const Duration(milliseconds: 500),
|
duration: const Duration(milliseconds: 500),
|
||||||
primaryEnd: Alignment.bottomLeft,
|
primaryEnd: Alignment.bottomLeft,
|
||||||
secondaryEnd: Alignment.topRight,
|
secondaryEnd: Alignment.topRight,
|
||||||
primaryColors: [
|
primaryColors: [colorScheme.primary, colorScheme.primaryContainer],
|
||||||
colorScheme.primary,
|
|
||||||
colorScheme.primaryContainer,
|
|
||||||
],
|
|
||||||
secondaryColors: [
|
secondaryColors: [
|
||||||
colorScheme.secondary,
|
colorScheme.secondary,
|
||||||
colorScheme.secondaryContainer,
|
colorScheme.secondaryContainer,
|
||||||
|
|||||||
@@ -37,8 +37,7 @@ AsyncValue<List<GeckoSuggestion>> engineHistorySuggestions(Ref ref) {
|
|||||||
return ref.watch(
|
return ref.watch(
|
||||||
engineSuggestionsProvider.select(
|
engineSuggestionsProvider.select(
|
||||||
(suggestions) => suggestions.whenData(
|
(suggestions) => suggestions.whenData(
|
||||||
(suggestions) =>
|
(suggestions) => suggestions
|
||||||
suggestions
|
|
||||||
.where(
|
.where(
|
||||||
(suggestion) =>
|
(suggestion) =>
|
||||||
suggestion.type == GeckoSuggestionType.history &&
|
suggestion.type == GeckoSuggestionType.history &&
|
||||||
|
|||||||
+4
-5
@@ -15,8 +15,7 @@ final engineHistorySuggestionsProvider =
|
|||||||
AutoDisposeProvider<AsyncValue<List<GeckoSuggestion>>>.internal(
|
AutoDisposeProvider<AsyncValue<List<GeckoSuggestion>>>.internal(
|
||||||
engineHistorySuggestions,
|
engineHistorySuggestions,
|
||||||
name: r'engineHistorySuggestionsProvider',
|
name: r'engineHistorySuggestionsProvider',
|
||||||
debugGetCreateSourceHash:
|
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||||
const bool.fromEnvironment('dart.vm.product')
|
|
||||||
? null
|
? null
|
||||||
: _$engineHistorySuggestionsHash,
|
: _$engineHistorySuggestionsHash,
|
||||||
dependencies: null,
|
dependencies: null,
|
||||||
@@ -31,14 +30,14 @@ String _$engineSuggestionsHash() => r'ba2c2d7f0a5e99fd9e639acd020b8cf3016c6126';
|
|||||||
|
|
||||||
/// See also [EngineSuggestions].
|
/// See also [EngineSuggestions].
|
||||||
@ProviderFor(EngineSuggestions)
|
@ProviderFor(EngineSuggestions)
|
||||||
final engineSuggestionsProvider = AutoDisposeStreamNotifierProvider<
|
final engineSuggestionsProvider =
|
||||||
|
AutoDisposeStreamNotifierProvider<
|
||||||
EngineSuggestions,
|
EngineSuggestions,
|
||||||
List<GeckoSuggestion>
|
List<GeckoSuggestion>
|
||||||
>.internal(
|
>.internal(
|
||||||
EngineSuggestions.new,
|
EngineSuggestions.new,
|
||||||
name: r'engineSuggestionsProvider',
|
name: r'engineSuggestionsProvider',
|
||||||
debugGetCreateSourceHash:
|
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||||
const bool.fromEnvironment('dart.vm.product')
|
|
||||||
? null
|
? null
|
||||||
: _$engineSuggestionsHash,
|
: _$engineSuggestionsHash,
|
||||||
dependencies: null,
|
dependencies: null,
|
||||||
|
|||||||
@@ -22,11 +22,8 @@ class SearchSuggestions extends _$SearchSuggestions {
|
|||||||
final defaultProvider = ref.watch(defaultSearchSuggestionsProvider);
|
final defaultProvider = ref.watch(defaultSearchSuggestionsProvider);
|
||||||
final resolvedProvider = suggestionsProvider ?? defaultProvider;
|
final resolvedProvider = suggestionsProvider ?? defaultProvider;
|
||||||
|
|
||||||
_addQueryBinding =
|
_addQueryBinding = ref
|
||||||
ref
|
.watch(searchSuggestionsRepositoryProvider(resolvedProvider).notifier)
|
||||||
.watch(
|
|
||||||
searchSuggestionsRepositoryProvider(resolvedProvider).notifier,
|
|
||||||
)
|
|
||||||
.addQuery;
|
.addQuery;
|
||||||
|
|
||||||
return ref.watch(searchSuggestionsRepositoryProvider(resolvedProvider));
|
return ref.watch(searchSuggestionsRepositoryProvider(resolvedProvider));
|
||||||
|
|||||||
+2
-4
@@ -15,8 +15,7 @@ final defaultSearchSuggestionsProvider =
|
|||||||
Provider<ISearchSuggestionProvider>.internal(
|
Provider<ISearchSuggestionProvider>.internal(
|
||||||
defaultSearchSuggestions,
|
defaultSearchSuggestions,
|
||||||
name: r'defaultSearchSuggestionsProvider',
|
name: r'defaultSearchSuggestionsProvider',
|
||||||
debugGetCreateSourceHash:
|
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||||
const bool.fromEnvironment('dart.vm.product')
|
|
||||||
? null
|
? null
|
||||||
: _$defaultSearchSuggestionsHash,
|
: _$defaultSearchSuggestionsHash,
|
||||||
dependencies: null,
|
dependencies: null,
|
||||||
@@ -104,8 +103,7 @@ class SearchSuggestionsProvider
|
|||||||
() => SearchSuggestions()..suggestionsProvider = suggestionsProvider,
|
() => SearchSuggestions()..suggestionsProvider = suggestionsProvider,
|
||||||
from: searchSuggestionsProvider,
|
from: searchSuggestionsProvider,
|
||||||
name: r'searchSuggestionsProvider',
|
name: r'searchSuggestionsProvider',
|
||||||
debugGetCreateSourceHash:
|
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||||
const bool.fromEnvironment('dart.vm.product')
|
|
||||||
? null
|
? null
|
||||||
: _$searchSuggestionsHash,
|
: _$searchSuggestionsHash,
|
||||||
dependencies: SearchSuggestionsFamily._dependencies,
|
dependencies: SearchSuggestionsFamily._dependencies,
|
||||||
|
|||||||
+1
-2
@@ -94,8 +94,7 @@ class SearchSuggestionsRepositoryProvider
|
|||||||
..suggestionsProvider = suggestionsProvider,
|
..suggestionsProvider = suggestionsProvider,
|
||||||
from: searchSuggestionsRepositoryProvider,
|
from: searchSuggestionsRepositoryProvider,
|
||||||
name: r'searchSuggestionsRepositoryProvider',
|
name: r'searchSuggestionsRepositoryProvider',
|
||||||
debugGetCreateSourceHash:
|
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||||
const bool.fromEnvironment('dart.vm.product')
|
|
||||||
? null
|
? null
|
||||||
: _$searchSuggestionsRepositoryHash,
|
: _$searchSuggestionsRepositoryHash,
|
||||||
dependencies: SearchSuggestionsRepositoryFamily._dependencies,
|
dependencies: SearchSuggestionsRepositoryFamily._dependencies,
|
||||||
|
|||||||
@@ -32,8 +32,7 @@ class BangChips extends HookConsumerWidget {
|
|||||||
) {
|
) {
|
||||||
return showDialog<bool>(
|
return showDialog<bool>(
|
||||||
context: context,
|
context: context,
|
||||||
builder:
|
builder: (context) => AlertDialog(
|
||||||
(context) => AlertDialog(
|
|
||||||
title: Text('Reset usage frequency of $triggerName?'),
|
title: Text('Reset usage frequency of $triggerName?'),
|
||||||
content: const Text('This will remove the Bang from quick select.'),
|
content: const Text('This will remove the Bang from quick select.'),
|
||||||
actions: <Widget>[
|
actions: <Widget>[
|
||||||
@@ -71,8 +70,7 @@ class BangChips extends HookConsumerWidget {
|
|||||||
Expanded(
|
Expanded(
|
||||||
child: SelectableChips(
|
child: SelectableChips(
|
||||||
itemId: (bang) => bang.trigger,
|
itemId: (bang) => bang.trigger,
|
||||||
itemAvatar:
|
itemAvatar: (bang) =>
|
||||||
(bang) =>
|
|
||||||
UrlIcon([bang.getTemplateUrl('')], iconSize: 20),
|
UrlIcon([bang.getTemplateUrl('')], iconSize: 20),
|
||||||
itemLabel: (bang) => Text(bang.websiteName),
|
itemLabel: (bang) => Text(bang.websiteName),
|
||||||
availableItems: availableBangs,
|
availableItems: availableBangs,
|
||||||
@@ -100,8 +98,7 @@ class BangChips extends HookConsumerWidget {
|
|||||||
final searchText = searchTextController?.text.trim();
|
final searchText = searchTextController?.text.trim();
|
||||||
|
|
||||||
final trigger = await BangSearchRoute(
|
final trigger = await BangSearchRoute(
|
||||||
searchText:
|
searchText: (searchText.isEmpty)
|
||||||
(searchText.isEmpty)
|
|
||||||
? BangSearchRoute.emptySearchText
|
? BangSearchRoute.emptySearchText
|
||||||
: searchText!,
|
: searchText!,
|
||||||
).push<String?>(context);
|
).push<String?>(context);
|
||||||
|
|||||||
@@ -77,8 +77,7 @@ class SearchField extends HookConsumerWidget {
|
|||||||
autofocus: autofocus,
|
autofocus: autofocus,
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
border: InputBorder.none,
|
border: InputBorder.none,
|
||||||
prefixIcon:
|
prefixIcon: (showBangIcon && activeBang != null)
|
||||||
(showBangIcon && activeBang != null)
|
|
||||||
? Padding(
|
? Padding(
|
||||||
padding: const EdgeInsetsDirectional.all(12.0),
|
padding: const EdgeInsetsDirectional.all(12.0),
|
||||||
child: UrlIcon([
|
child: UrlIcon([
|
||||||
@@ -89,8 +88,7 @@ class SearchField extends HookConsumerWidget {
|
|||||||
label: label ?? const Text('Search'),
|
label: label ?? const Text('Search'),
|
||||||
// hintText: 'Ask anything...',
|
// hintText: 'Ask anything...',
|
||||||
floatingLabelBehavior: FloatingLabelBehavior.always,
|
floatingLabelBehavior: FloatingLabelBehavior.always,
|
||||||
suffixIcon:
|
suffixIcon: hasText
|
||||||
hasText
|
|
||||||
? IconButton(
|
? IconButton(
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
textEditingController.clear();
|
textEditingController.clear();
|
||||||
|
|||||||
+11
-20
@@ -64,8 +64,7 @@ class FeedSearch extends HookConsumerWidget {
|
|||||||
SliverSkeletonizer(
|
SliverSkeletonizer(
|
||||||
enabled: articlesAsync.isLoading,
|
enabled: articlesAsync.isLoading,
|
||||||
child: articlesAsync.when(
|
child: articlesAsync.when(
|
||||||
data:
|
data: (articles) => SliverList.builder(
|
||||||
(articles) => SliverList.builder(
|
|
||||||
itemCount: articles.length,
|
itemCount: articles.length,
|
||||||
itemBuilder: (context, index) {
|
itemBuilder: (context, index) {
|
||||||
final article = articles[index];
|
final article = articles[index];
|
||||||
@@ -96,16 +95,15 @@ class FeedSearch extends HookConsumerWidget {
|
|||||||
article.feedId.base,
|
article.feedId.base,
|
||||||
], iconSize: 24.0),
|
], iconSize: 24.0),
|
||||||
),
|
),
|
||||||
title:
|
title: (titleHighlight.isNotEmpty)
|
||||||
(titleHighlight.isNotEmpty)
|
|
||||||
? MarkdownBody(
|
? MarkdownBody(
|
||||||
data: titleHighlight!,
|
data: titleHighlight!,
|
||||||
styleSheet: MarkdownStyleSheet(
|
styleSheet: MarkdownStyleSheet(
|
||||||
p: Theme.of(
|
p: Theme.of(context).textTheme.titleMedium
|
||||||
|
?.copyWith(
|
||||||
|
color: Theme.of(
|
||||||
context,
|
context,
|
||||||
).textTheme.titleMedium?.copyWith(
|
).colorScheme.onSurface,
|
||||||
color:
|
|
||||||
Theme.of(context).colorScheme.onSurface,
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
@@ -120,19 +118,13 @@ class FeedSearch extends HookConsumerWidget {
|
|||||||
MarkdownBody(
|
MarkdownBody(
|
||||||
data: searchSnippet!,
|
data: searchSnippet!,
|
||||||
styleSheet: MarkdownStyleSheet(
|
styleSheet: MarkdownStyleSheet(
|
||||||
p: Theme.of(
|
p: Theme.of(context).textTheme.bodyMedium?.copyWith(
|
||||||
context,
|
color: Theme.of(
|
||||||
).textTheme.bodyMedium?.copyWith(
|
|
||||||
color:
|
|
||||||
Theme.of(
|
|
||||||
context,
|
context,
|
||||||
).colorScheme.onSurfaceVariant,
|
).colorScheme.onSurfaceVariant,
|
||||||
),
|
),
|
||||||
a: Theme.of(
|
a: Theme.of(context).textTheme.bodyMedium?.copyWith(
|
||||||
context,
|
color: Theme.of(
|
||||||
).textTheme.bodyMedium?.copyWith(
|
|
||||||
color:
|
|
||||||
Theme.of(
|
|
||||||
context,
|
context,
|
||||||
).colorScheme.onSurfaceVariant,
|
).colorScheme.onSurfaceVariant,
|
||||||
decoration: TextDecoration.none,
|
decoration: TextDecoration.none,
|
||||||
@@ -178,8 +170,7 @@ class FeedSearch extends HookConsumerWidget {
|
|||||||
),
|
),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
loading:
|
loading: () => SliverList.builder(
|
||||||
() => SliverList.builder(
|
|
||||||
itemCount: articlesAsync.valueOrNull?.length ?? 3,
|
itemCount: articlesAsync.valueOrNull?.length ?? 3,
|
||||||
itemBuilder: (context, index) {
|
itemBuilder: (context, index) {
|
||||||
return const ListTile(title: Bone.text());
|
return const ListTile(title: Bone.text());
|
||||||
|
|||||||
+1
-2
@@ -122,8 +122,7 @@ class HistorySuggestions extends HookConsumerWidget {
|
|||||||
),
|
),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
loading:
|
loading: () => SliverList.builder(
|
||||||
() => SliverList.builder(
|
|
||||||
itemCount: historySuggestionsAsync.valueOrNull?.length ?? 3,
|
itemCount: historySuggestionsAsync.valueOrNull?.length ?? 3,
|
||||||
itemBuilder: (context, index) {
|
itemBuilder: (context, index) {
|
||||||
return const ListTile(title: Bone.text());
|
return const ListTile(title: Bone.text());
|
||||||
|
|||||||
+6
-13
@@ -33,15 +33,12 @@ class TabSearch extends HookConsumerWidget {
|
|||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
final tabs =
|
final tabs = ref
|
||||||
ref
|
|
||||||
.watch(
|
.watch(
|
||||||
seamlessFilteredTabPreviewsProvider(
|
seamlessFilteredTabPreviewsProvider(
|
||||||
TabSearchPartition.search,
|
TabSearchPartition.search,
|
||||||
(selectedContainer.value != null)
|
(selectedContainer.value != null)
|
||||||
? ContainerFilterById(
|
? ContainerFilterById(containerId: selectedContainer.value!.id)
|
||||||
containerId: selectedContainer.value!.id,
|
|
||||||
)
|
|
||||||
: ContainerFilterDisabled(),
|
: ContainerFilterDisabled(),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
@@ -118,21 +115,17 @@ class TabSearch extends HookConsumerWidget {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
subtitle:
|
subtitle: (bodyHasMatch || urlHasMatch)
|
||||||
(bodyHasMatch || urlHasMatch)
|
|
||||||
? MarkdownBody(
|
? MarkdownBody(
|
||||||
data:
|
data: bodyHasMatch
|
||||||
bodyHasMatch
|
|
||||||
? result.content!
|
? result.content!
|
||||||
: result.highlightedUrl!,
|
: result.highlightedUrl!,
|
||||||
styleSheet: MarkdownStyleSheet(
|
styleSheet: MarkdownStyleSheet(
|
||||||
p: Theme.of(context).textTheme.bodyMedium?.copyWith(
|
p: Theme.of(context).textTheme.bodyMedium?.copyWith(
|
||||||
color:
|
color: Theme.of(context).colorScheme.onSurfaceVariant,
|
||||||
Theme.of(context).colorScheme.onSurfaceVariant,
|
|
||||||
),
|
),
|
||||||
a: Theme.of(context).textTheme.bodyMedium?.copyWith(
|
a: Theme.of(context).textTheme.bodyMedium?.copyWith(
|
||||||
color:
|
color: Theme.of(context).colorScheme.onSurfaceVariant,
|
||||||
Theme.of(context).colorScheme.onSurfaceVariant,
|
|
||||||
decoration: TextDecoration.none,
|
decoration: TextDecoration.none,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -42,8 +42,7 @@ class ContainerDao extends DatabaseAccessor<TabDatabase>
|
|||||||
}
|
}
|
||||||
|
|
||||||
Selectable<Color> getDistinctColors() {
|
Selectable<Color> getDistinctColors() {
|
||||||
final query =
|
final query = db.selectOnly(db.container, distinct: true)
|
||||||
db.selectOnly(db.container, distinct: true)
|
|
||||||
..addColumns([db.container.color])
|
..addColumns([db.container.color])
|
||||||
..where(db.container.color.isNotNull());
|
..where(db.container.color.isNotNull());
|
||||||
|
|
||||||
@@ -53,8 +52,7 @@ class ContainerDao extends DatabaseAccessor<TabDatabase>
|
|||||||
}
|
}
|
||||||
|
|
||||||
Selectable<String> getContainerTabIds(String? containerId) {
|
Selectable<String> getContainerTabIds(String? containerId) {
|
||||||
final query =
|
final query = selectOnly(db.tab)
|
||||||
selectOnly(db.tab)
|
|
||||||
..addColumns([db.tab.id])
|
..addColumns([db.tab.id])
|
||||||
..where(
|
..where(
|
||||||
(containerId != null)
|
(containerId != null)
|
||||||
@@ -67,11 +65,9 @@ class ContainerDao extends DatabaseAccessor<TabDatabase>
|
|||||||
}
|
}
|
||||||
|
|
||||||
Selectable<TabData> getContainerTabsData(String? containerId) {
|
Selectable<TabData> getContainerTabsData(String? containerId) {
|
||||||
final query =
|
final query = db.tab.select()
|
||||||
db.tab.select()
|
|
||||||
..where(
|
..where(
|
||||||
(t) =>
|
(t) => (containerId != null)
|
||||||
(containerId != null)
|
|
||||||
? t.containerId.equals(containerId)
|
? t.containerId.equals(containerId)
|
||||||
: t.containerId.isNull(),
|
: t.containerId.isNull(),
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -21,8 +21,7 @@ class TabDao extends DatabaseAccessor<TabDatabase> with _$TabDaoMixin {
|
|||||||
db.tab.select()..where((t) => t.id.equals(id));
|
db.tab.select()..where((t) => t.id.equals(id));
|
||||||
|
|
||||||
Selectable<String> getAllTabIds() {
|
Selectable<String> getAllTabIds() {
|
||||||
final query =
|
final query = selectOnly(db.tab)
|
||||||
selectOnly(db.tab)
|
|
||||||
..addColumns([db.tab.id])
|
..addColumns([db.tab.id])
|
||||||
..orderBy([OrderingTerm.asc(db.tab.orderKey)]);
|
..orderBy([OrderingTerm.asc(db.tab.orderKey)]);
|
||||||
|
|
||||||
@@ -30,8 +29,7 @@ class TabDao extends DatabaseAccessor<TabDatabase> with _$TabDaoMixin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
SingleOrNullSelectable<String?> getTabContainerId(String tabId) {
|
SingleOrNullSelectable<String?> getTabContainerId(String tabId) {
|
||||||
final query =
|
final query = selectOnly(db.tab)
|
||||||
selectOnly(db.tab)
|
|
||||||
..addColumns([db.tab.containerId])
|
..addColumns([db.tab.containerId])
|
||||||
..where(db.tab.id.equals(tabId));
|
..where(db.tab.id.equals(tabId));
|
||||||
|
|
||||||
@@ -154,12 +152,10 @@ class TabDao extends DatabaseAccessor<TabDatabase> with _$TabDaoMixin {
|
|||||||
batch.update(
|
batch.update(
|
||||||
db.tab,
|
db.tab,
|
||||||
TabCompanion(
|
TabCompanion(
|
||||||
url:
|
url: (previousState?.url != state.url)
|
||||||
(previousState?.url != state.url)
|
|
||||||
? Value(state.url)
|
? Value(state.url)
|
||||||
: const Value.absent(),
|
: const Value.absent(),
|
||||||
title:
|
title: (previousState?.title != state.title)
|
||||||
(previousState?.title != state.title)
|
|
||||||
? Value(state.title)
|
? Value(state.title)
|
||||||
: const Value.absent(),
|
: const Value.absent(),
|
||||||
),
|
),
|
||||||
@@ -174,8 +170,9 @@ class TabDao extends DatabaseAccessor<TabDatabase> with _$TabDaoMixin {
|
|||||||
return db.transaction(() async {
|
return db.transaction(() async {
|
||||||
await (db.tab.delete()..where((t) => t.id.isNotIn(retainTabIds))).go();
|
await (db.tab.delete()..where((t) => t.id.isNotIn(retainTabIds))).go();
|
||||||
|
|
||||||
var currentOrderKey =
|
var currentOrderKey = await db.containerDao
|
||||||
await db.containerDao.generateLeadingOrderKey(null).getSingle();
|
.generateLeadingOrderKey(null)
|
||||||
|
.getSingle();
|
||||||
|
|
||||||
await db.tab.insertAll(
|
await db.tab.insertAll(
|
||||||
retainTabIds.map((id) {
|
retainTabIds.map((id) {
|
||||||
|
|||||||
@@ -55,8 +55,7 @@ class Container extends Table with TableInfo<Container, ContainerData> {
|
|||||||
ContainerData map(Map<String, dynamic> data, {String? tablePrefix}) {
|
ContainerData map(Map<String, dynamic> data, {String? tablePrefix}) {
|
||||||
final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : '';
|
final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : '';
|
||||||
return ContainerData(
|
return ContainerData(
|
||||||
id:
|
id: attachedDatabase.typeMapping.read(
|
||||||
attachedDatabase.typeMapping.read(
|
|
||||||
DriftSqlType.string,
|
DriftSqlType.string,
|
||||||
data['${effectivePrefix}id'],
|
data['${effectivePrefix}id'],
|
||||||
)!,
|
)!,
|
||||||
@@ -306,8 +305,7 @@ class Tab extends Table with TableInfo<Tab, TabData> {
|
|||||||
TabData map(Map<String, dynamic> data, {String? tablePrefix}) {
|
TabData map(Map<String, dynamic> data, {String? tablePrefix}) {
|
||||||
final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : '';
|
final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : '';
|
||||||
return TabData(
|
return TabData(
|
||||||
id:
|
id: attachedDatabase.typeMapping.read(
|
||||||
attachedDatabase.typeMapping.read(
|
|
||||||
DriftSqlType.string,
|
DriftSqlType.string,
|
||||||
data['${effectivePrefix}id'],
|
data['${effectivePrefix}id'],
|
||||||
)!,
|
)!,
|
||||||
@@ -315,8 +313,7 @@ class Tab extends Table with TableInfo<Tab, TabData> {
|
|||||||
DriftSqlType.string,
|
DriftSqlType.string,
|
||||||
data['${effectivePrefix}container_id'],
|
data['${effectivePrefix}container_id'],
|
||||||
),
|
),
|
||||||
orderKey:
|
orderKey: attachedDatabase.typeMapping.read(
|
||||||
attachedDatabase.typeMapping.read(
|
|
||||||
DriftSqlType.string,
|
DriftSqlType.string,
|
||||||
data['${effectivePrefix}order_key'],
|
data['${effectivePrefix}order_key'],
|
||||||
)!,
|
)!,
|
||||||
@@ -350,8 +347,7 @@ class Tab extends Table with TableInfo<Tab, TabData> {
|
|||||||
DriftSqlType.string,
|
DriftSqlType.string,
|
||||||
data['${effectivePrefix}full_content_plain'],
|
data['${effectivePrefix}full_content_plain'],
|
||||||
),
|
),
|
||||||
timestamp:
|
timestamp: attachedDatabase.typeMapping.read(
|
||||||
attachedDatabase.typeMapping.read(
|
|
||||||
DriftSqlType.dateTime,
|
DriftSqlType.dateTime,
|
||||||
data['${effectivePrefix}timestamp'],
|
data['${effectivePrefix}timestamp'],
|
||||||
)!,
|
)!,
|
||||||
@@ -499,24 +495,19 @@ class TabData extends DataClass implements Insertable<TabData> {
|
|||||||
orderKey: orderKey ?? this.orderKey,
|
orderKey: orderKey ?? this.orderKey,
|
||||||
url: url.present ? url.value : this.url,
|
url: url.present ? url.value : this.url,
|
||||||
title: title.present ? title.value : this.title,
|
title: title.present ? title.value : this.title,
|
||||||
isProbablyReaderable:
|
isProbablyReaderable: isProbablyReaderable.present
|
||||||
isProbablyReaderable.present
|
|
||||||
? isProbablyReaderable.value
|
? isProbablyReaderable.value
|
||||||
: this.isProbablyReaderable,
|
: this.isProbablyReaderable,
|
||||||
extractedContentMarkdown:
|
extractedContentMarkdown: extractedContentMarkdown.present
|
||||||
extractedContentMarkdown.present
|
|
||||||
? extractedContentMarkdown.value
|
? extractedContentMarkdown.value
|
||||||
: this.extractedContentMarkdown,
|
: this.extractedContentMarkdown,
|
||||||
extractedContentPlain:
|
extractedContentPlain: extractedContentPlain.present
|
||||||
extractedContentPlain.present
|
|
||||||
? extractedContentPlain.value
|
? extractedContentPlain.value
|
||||||
: this.extractedContentPlain,
|
: this.extractedContentPlain,
|
||||||
fullContentMarkdown:
|
fullContentMarkdown: fullContentMarkdown.present
|
||||||
fullContentMarkdown.present
|
|
||||||
? fullContentMarkdown.value
|
? fullContentMarkdown.value
|
||||||
: this.fullContentMarkdown,
|
: this.fullContentMarkdown,
|
||||||
fullContentPlain:
|
fullContentPlain: fullContentPlain.present
|
||||||
fullContentPlain.present
|
|
||||||
? fullContentPlain.value
|
? fullContentPlain.value
|
||||||
: this.fullContentPlain,
|
: this.fullContentPlain,
|
||||||
timestamp: timestamp ?? this.timestamp,
|
timestamp: timestamp ?? this.timestamp,
|
||||||
@@ -524,29 +515,25 @@ class TabData extends DataClass implements Insertable<TabData> {
|
|||||||
TabData copyWithCompanion(TabCompanion data) {
|
TabData copyWithCompanion(TabCompanion data) {
|
||||||
return TabData(
|
return TabData(
|
||||||
id: data.id.present ? data.id.value : this.id,
|
id: data.id.present ? data.id.value : this.id,
|
||||||
containerId:
|
containerId: data.containerId.present
|
||||||
data.containerId.present ? data.containerId.value : this.containerId,
|
? data.containerId.value
|
||||||
|
: this.containerId,
|
||||||
orderKey: data.orderKey.present ? data.orderKey.value : this.orderKey,
|
orderKey: data.orderKey.present ? data.orderKey.value : this.orderKey,
|
||||||
url: data.url.present ? data.url.value : this.url,
|
url: data.url.present ? data.url.value : this.url,
|
||||||
title: data.title.present ? data.title.value : this.title,
|
title: data.title.present ? data.title.value : this.title,
|
||||||
isProbablyReaderable:
|
isProbablyReaderable: data.isProbablyReaderable.present
|
||||||
data.isProbablyReaderable.present
|
|
||||||
? data.isProbablyReaderable.value
|
? data.isProbablyReaderable.value
|
||||||
: this.isProbablyReaderable,
|
: this.isProbablyReaderable,
|
||||||
extractedContentMarkdown:
|
extractedContentMarkdown: data.extractedContentMarkdown.present
|
||||||
data.extractedContentMarkdown.present
|
|
||||||
? data.extractedContentMarkdown.value
|
? data.extractedContentMarkdown.value
|
||||||
: this.extractedContentMarkdown,
|
: this.extractedContentMarkdown,
|
||||||
extractedContentPlain:
|
extractedContentPlain: data.extractedContentPlain.present
|
||||||
data.extractedContentPlain.present
|
|
||||||
? data.extractedContentPlain.value
|
? data.extractedContentPlain.value
|
||||||
: this.extractedContentPlain,
|
: this.extractedContentPlain,
|
||||||
fullContentMarkdown:
|
fullContentMarkdown: data.fullContentMarkdown.present
|
||||||
data.fullContentMarkdown.present
|
|
||||||
? data.fullContentMarkdown.value
|
? data.fullContentMarkdown.value
|
||||||
: this.fullContentMarkdown,
|
: this.fullContentMarkdown,
|
||||||
fullContentPlain:
|
fullContentPlain: data.fullContentPlain.present
|
||||||
data.fullContentPlain.present
|
|
||||||
? data.fullContentPlain.value
|
? data.fullContentPlain.value
|
||||||
: this.fullContentPlain,
|
: this.fullContentPlain,
|
||||||
timestamp: data.timestamp.present ? data.timestamp.value : this.timestamp,
|
timestamp: data.timestamp.present ? data.timestamp.value : this.timestamp,
|
||||||
@@ -838,23 +825,19 @@ class TabFts extends Table
|
|||||||
TabFt map(Map<String, dynamic> data, {String? tablePrefix}) {
|
TabFt map(Map<String, dynamic> data, {String? tablePrefix}) {
|
||||||
final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : '';
|
final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : '';
|
||||||
return TabFt(
|
return TabFt(
|
||||||
title:
|
title: attachedDatabase.typeMapping.read(
|
||||||
attachedDatabase.typeMapping.read(
|
|
||||||
DriftSqlType.string,
|
DriftSqlType.string,
|
||||||
data['${effectivePrefix}title'],
|
data['${effectivePrefix}title'],
|
||||||
)!,
|
)!,
|
||||||
url:
|
url: attachedDatabase.typeMapping.read(
|
||||||
attachedDatabase.typeMapping.read(
|
|
||||||
DriftSqlType.string,
|
DriftSqlType.string,
|
||||||
data['${effectivePrefix}url'],
|
data['${effectivePrefix}url'],
|
||||||
)!,
|
)!,
|
||||||
extractedContentPlain:
|
extractedContentPlain: attachedDatabase.typeMapping.read(
|
||||||
attachedDatabase.typeMapping.read(
|
|
||||||
DriftSqlType.string,
|
DriftSqlType.string,
|
||||||
data['${effectivePrefix}extracted_content_plain'],
|
data['${effectivePrefix}extracted_content_plain'],
|
||||||
)!,
|
)!,
|
||||||
fullContentPlain:
|
fullContentPlain: attachedDatabase.typeMapping.read(
|
||||||
attachedDatabase.typeMapping.read(
|
|
||||||
DriftSqlType.string,
|
DriftSqlType.string,
|
||||||
data['${effectivePrefix}full_content_plain'],
|
data['${effectivePrefix}full_content_plain'],
|
||||||
)!,
|
)!,
|
||||||
@@ -936,12 +919,10 @@ class TabFt extends DataClass implements Insertable<TabFt> {
|
|||||||
return TabFt(
|
return TabFt(
|
||||||
title: data.title.present ? data.title.value : this.title,
|
title: data.title.present ? data.title.value : this.title,
|
||||||
url: data.url.present ? data.url.value : this.url,
|
url: data.url.present ? data.url.value : this.url,
|
||||||
extractedContentPlain:
|
extractedContentPlain: data.extractedContentPlain.present
|
||||||
data.extractedContentPlain.present
|
|
||||||
? data.extractedContentPlain.value
|
? data.extractedContentPlain.value
|
||||||
: this.extractedContentPlain,
|
: this.extractedContentPlain,
|
||||||
fullContentPlain:
|
fullContentPlain: data.fullContentPlain.present
|
||||||
data.fullContentPlain.present
|
|
||||||
? data.fullContentPlain.value
|
? data.fullContentPlain.value
|
||||||
: this.fullContentPlain,
|
: this.fullContentPlain,
|
||||||
);
|
);
|
||||||
@@ -1431,12 +1412,12 @@ class $ContainerTableManager
|
|||||||
TableManagerState(
|
TableManagerState(
|
||||||
db: db,
|
db: db,
|
||||||
table: table,
|
table: table,
|
||||||
createFilteringComposer:
|
createFilteringComposer: () =>
|
||||||
() => $ContainerFilterComposer($db: db, $table: table),
|
$ContainerFilterComposer($db: db, $table: table),
|
||||||
createOrderingComposer:
|
createOrderingComposer: () =>
|
||||||
() => $ContainerOrderingComposer($db: db, $table: table),
|
$ContainerOrderingComposer($db: db, $table: table),
|
||||||
createComputedFieldComposer:
|
createComputedFieldComposer: () =>
|
||||||
() => $ContainerAnnotationComposer($db: db, $table: table),
|
$ContainerAnnotationComposer($db: db, $table: table),
|
||||||
updateCompanionCallback:
|
updateCompanionCallback:
|
||||||
({
|
({
|
||||||
Value<String> id = const Value.absent(),
|
Value<String> id = const Value.absent(),
|
||||||
@@ -1465,14 +1446,9 @@ class $ContainerTableManager
|
|||||||
metadata: metadata,
|
metadata: metadata,
|
||||||
rowid: rowid,
|
rowid: rowid,
|
||||||
),
|
),
|
||||||
withReferenceMapper:
|
withReferenceMapper: (p0) => p0
|
||||||
(p0) =>
|
|
||||||
p0
|
|
||||||
.map(
|
.map(
|
||||||
(e) => (
|
(e) => (e.readTable(table), $ContainerReferences(db, table, e)),
|
||||||
e.readTable(table),
|
|
||||||
$ContainerReferences(db, table, e),
|
|
||||||
),
|
|
||||||
)
|
)
|
||||||
.toList(),
|
.toList(),
|
||||||
prefetchHooksCallback: ({tabRefs = false}) {
|
prefetchHooksCallback: ({tabRefs = false}) {
|
||||||
@@ -1490,10 +1466,10 @@ class $ContainerTableManager
|
|||||||
>(
|
>(
|
||||||
currentTable: table,
|
currentTable: table,
|
||||||
referencedTable: $ContainerReferences._tabRefsTable(db),
|
referencedTable: $ContainerReferences._tabRefsTable(db),
|
||||||
managerFromTypedResult:
|
managerFromTypedResult: (p0) =>
|
||||||
(p0) => $ContainerReferences(db, table, p0).tabRefs,
|
$ContainerReferences(db, table, p0).tabRefs,
|
||||||
referencedItemsForCurrentItem:
|
referencedItemsForCurrentItem: (item, referencedItems) =>
|
||||||
(item, referencedItems) => referencedItems.where(
|
referencedItems.where(
|
||||||
(e) => e.containerId == item.id,
|
(e) => e.containerId == item.id,
|
||||||
),
|
),
|
||||||
typedResults: items,
|
typedResults: items,
|
||||||
@@ -1829,12 +1805,12 @@ class $TabTableManager
|
|||||||
TableManagerState(
|
TableManagerState(
|
||||||
db: db,
|
db: db,
|
||||||
table: table,
|
table: table,
|
||||||
createFilteringComposer:
|
createFilteringComposer: () =>
|
||||||
() => $TabFilterComposer($db: db, $table: table),
|
$TabFilterComposer($db: db, $table: table),
|
||||||
createOrderingComposer:
|
createOrderingComposer: () =>
|
||||||
() => $TabOrderingComposer($db: db, $table: table),
|
$TabOrderingComposer($db: db, $table: table),
|
||||||
createComputedFieldComposer:
|
createComputedFieldComposer: () =>
|
||||||
() => $TabAnnotationComposer($db: db, $table: table),
|
$TabAnnotationComposer($db: db, $table: table),
|
||||||
updateCompanionCallback:
|
updateCompanionCallback:
|
||||||
({
|
({
|
||||||
Value<String> id = const Value.absent(),
|
Value<String> id = const Value.absent(),
|
||||||
@@ -1891,21 +1867,15 @@ class $TabTableManager
|
|||||||
timestamp: timestamp,
|
timestamp: timestamp,
|
||||||
rowid: rowid,
|
rowid: rowid,
|
||||||
),
|
),
|
||||||
withReferenceMapper:
|
withReferenceMapper: (p0) => p0
|
||||||
(p0) =>
|
.map((e) => (e.readTable(table), $TabReferences(db, table, e)))
|
||||||
p0
|
|
||||||
.map(
|
|
||||||
(e) => (
|
|
||||||
e.readTable(table),
|
|
||||||
$TabReferences(db, table, e),
|
|
||||||
),
|
|
||||||
)
|
|
||||||
.toList(),
|
.toList(),
|
||||||
prefetchHooksCallback: ({containerId = false}) {
|
prefetchHooksCallback: ({containerId = false}) {
|
||||||
return PrefetchHooks(
|
return PrefetchHooks(
|
||||||
db: db,
|
db: db,
|
||||||
explicitlyWatchedTables: [],
|
explicitlyWatchedTables: [],
|
||||||
addJoins: <
|
addJoins:
|
||||||
|
<
|
||||||
T extends TableManagerState<
|
T extends TableManagerState<
|
||||||
dynamic,
|
dynamic,
|
||||||
dynamic,
|
dynamic,
|
||||||
@@ -1925,11 +1895,11 @@ class $TabTableManager
|
|||||||
state.withJoin(
|
state.withJoin(
|
||||||
currentTable: table,
|
currentTable: table,
|
||||||
currentColumn: table.containerId,
|
currentColumn: table.containerId,
|
||||||
referencedTable: $TabReferences._containerIdTable(
|
referencedTable: $TabReferences
|
||||||
db,
|
._containerIdTable(db),
|
||||||
),
|
referencedColumn: $TabReferences
|
||||||
referencedColumn:
|
._containerIdTable(db)
|
||||||
$TabReferences._containerIdTable(db).id,
|
.id,
|
||||||
)
|
)
|
||||||
as T;
|
as T;
|
||||||
}
|
}
|
||||||
@@ -2079,12 +2049,12 @@ class $TabFtsTableManager
|
|||||||
TableManagerState(
|
TableManagerState(
|
||||||
db: db,
|
db: db,
|
||||||
table: table,
|
table: table,
|
||||||
createFilteringComposer:
|
createFilteringComposer: () =>
|
||||||
() => $TabFtsFilterComposer($db: db, $table: table),
|
$TabFtsFilterComposer($db: db, $table: table),
|
||||||
createOrderingComposer:
|
createOrderingComposer: () =>
|
||||||
() => $TabFtsOrderingComposer($db: db, $table: table),
|
$TabFtsOrderingComposer($db: db, $table: table),
|
||||||
createComputedFieldComposer:
|
createComputedFieldComposer: () =>
|
||||||
() => $TabFtsAnnotationComposer($db: db, $table: table),
|
$TabFtsAnnotationComposer($db: db, $table: table),
|
||||||
updateCompanionCallback:
|
updateCompanionCallback:
|
||||||
({
|
({
|
||||||
Value<String> title = const Value.absent(),
|
Value<String> title = const Value.absent(),
|
||||||
@@ -2113,15 +2083,8 @@ class $TabFtsTableManager
|
|||||||
fullContentPlain: fullContentPlain,
|
fullContentPlain: fullContentPlain,
|
||||||
rowid: rowid,
|
rowid: rowid,
|
||||||
),
|
),
|
||||||
withReferenceMapper:
|
withReferenceMapper: (p0) => p0
|
||||||
(p0) =>
|
.map((e) => (e.readTable(table), BaseReferences(db, table, e)))
|
||||||
p0
|
|
||||||
.map(
|
|
||||||
(e) => (
|
|
||||||
e.readTable(table),
|
|
||||||
BaseReferences(db, table, e),
|
|
||||||
),
|
|
||||||
)
|
|
||||||
.toList(),
|
.toList(),
|
||||||
prefetchHooksCallback: null,
|
prefetchHooksCallback: null,
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -63,13 +63,11 @@ class _$ContainerAuthSettingsCWProxyImpl
|
|||||||
? _value.authenticationRequired
|
? _value.authenticationRequired
|
||||||
// ignore: cast_nullable_to_non_nullable
|
// ignore: cast_nullable_to_non_nullable
|
||||||
: authenticationRequired as bool,
|
: authenticationRequired as bool,
|
||||||
lockOnAppBackground:
|
lockOnAppBackground: lockOnAppBackground == const $CopyWithPlaceholder()
|
||||||
lockOnAppBackground == const $CopyWithPlaceholder()
|
|
||||||
? _value.lockOnAppBackground
|
? _value.lockOnAppBackground
|
||||||
// ignore: cast_nullable_to_non_nullable
|
// ignore: cast_nullable_to_non_nullable
|
||||||
: lockOnAppBackground as bool,
|
: lockOnAppBackground as bool,
|
||||||
lockTimeout:
|
lockTimeout: lockTimeout == const $CopyWithPlaceholder()
|
||||||
lockTimeout == const $CopyWithPlaceholder()
|
|
||||||
? _value.lockTimeout
|
? _value.lockTimeout
|
||||||
// ignore: cast_nullable_to_non_nullable
|
// ignore: cast_nullable_to_non_nullable
|
||||||
: lockTimeout as Duration?,
|
: lockTimeout as Duration?,
|
||||||
@@ -141,23 +139,19 @@ class _$ContainerMetadataCWProxyImpl implements _$ContainerMetadataCWProxy {
|
|||||||
Object? useProxy = const $CopyWithPlaceholder(),
|
Object? useProxy = const $CopyWithPlaceholder(),
|
||||||
}) {
|
}) {
|
||||||
return ContainerMetadata(
|
return ContainerMetadata(
|
||||||
iconData:
|
iconData: iconData == const $CopyWithPlaceholder()
|
||||||
iconData == const $CopyWithPlaceholder()
|
|
||||||
? _value.iconData
|
? _value.iconData
|
||||||
// ignore: cast_nullable_to_non_nullable
|
// ignore: cast_nullable_to_non_nullable
|
||||||
: iconData as IconData?,
|
: iconData as IconData?,
|
||||||
contextualIdentity:
|
contextualIdentity: contextualIdentity == const $CopyWithPlaceholder()
|
||||||
contextualIdentity == const $CopyWithPlaceholder()
|
|
||||||
? _value.contextualIdentity
|
? _value.contextualIdentity
|
||||||
// ignore: cast_nullable_to_non_nullable
|
// ignore: cast_nullable_to_non_nullable
|
||||||
: contextualIdentity as String?,
|
: contextualIdentity as String?,
|
||||||
authSettings:
|
authSettings: authSettings == const $CopyWithPlaceholder()
|
||||||
authSettings == const $CopyWithPlaceholder()
|
|
||||||
? _value.authSettings
|
? _value.authSettings
|
||||||
// ignore: cast_nullable_to_non_nullable
|
// ignore: cast_nullable_to_non_nullable
|
||||||
: authSettings as ContainerAuthSettings,
|
: authSettings as ContainerAuthSettings,
|
||||||
useProxy:
|
useProxy: useProxy == const $CopyWithPlaceholder()
|
||||||
useProxy == const $CopyWithPlaceholder()
|
|
||||||
? _value.useProxy
|
? _value.useProxy
|
||||||
// ignore: cast_nullable_to_non_nullable
|
// ignore: cast_nullable_to_non_nullable
|
||||||
: useProxy as bool,
|
: useProxy as bool,
|
||||||
@@ -228,23 +222,19 @@ class _$ContainerDataCWProxyImpl implements _$ContainerDataCWProxy {
|
|||||||
Object? metadata = const $CopyWithPlaceholder(),
|
Object? metadata = const $CopyWithPlaceholder(),
|
||||||
}) {
|
}) {
|
||||||
return ContainerData(
|
return ContainerData(
|
||||||
id:
|
id: id == const $CopyWithPlaceholder()
|
||||||
id == const $CopyWithPlaceholder()
|
|
||||||
? _value.id
|
? _value.id
|
||||||
// ignore: cast_nullable_to_non_nullable
|
// ignore: cast_nullable_to_non_nullable
|
||||||
: id as String,
|
: id as String,
|
||||||
name:
|
name: name == const $CopyWithPlaceholder()
|
||||||
name == const $CopyWithPlaceholder()
|
|
||||||
? _value.name
|
? _value.name
|
||||||
// ignore: cast_nullable_to_non_nullable
|
// ignore: cast_nullable_to_non_nullable
|
||||||
: name as String?,
|
: name as String?,
|
||||||
color:
|
color: color == const $CopyWithPlaceholder()
|
||||||
color == const $CopyWithPlaceholder()
|
|
||||||
? _value.color
|
? _value.color
|
||||||
// ignore: cast_nullable_to_non_nullable
|
// ignore: cast_nullable_to_non_nullable
|
||||||
: color as Color,
|
: color as Color,
|
||||||
metadata:
|
metadata: metadata == const $CopyWithPlaceholder()
|
||||||
metadata == const $CopyWithPlaceholder()
|
|
||||||
? _value.metadata
|
? _value.metadata
|
||||||
// ignore: cast_nullable_to_non_nullable
|
// ignore: cast_nullable_to_non_nullable
|
||||||
: metadata as ContainerMetadata?,
|
: metadata as ContainerMetadata?,
|
||||||
@@ -267,8 +257,7 @@ ContainerAuthSettings _$ContainerAuthSettingsFromJson(
|
|||||||
) => ContainerAuthSettings(
|
) => ContainerAuthSettings(
|
||||||
authenticationRequired: json['authenticationRequired'] as bool,
|
authenticationRequired: json['authenticationRequired'] as bool,
|
||||||
lockOnAppBackground: json['lockOnAppBackground'] as bool,
|
lockOnAppBackground: json['lockOnAppBackground'] as bool,
|
||||||
lockTimeout:
|
lockTimeout: json['lockTimeout'] == null
|
||||||
json['lockTimeout'] == null
|
|
||||||
? null
|
? null
|
||||||
: Duration(microseconds: (json['lockTimeout'] as num).toInt()),
|
: Duration(microseconds: (json['lockTimeout'] as num).toInt()),
|
||||||
);
|
);
|
||||||
@@ -288,8 +277,7 @@ ContainerMetadata _$ContainerMetadataFromJson(Map<String, dynamic> json) =>
|
|||||||
const IconDataJsonConverter().fromJson,
|
const IconDataJsonConverter().fromJson,
|
||||||
),
|
),
|
||||||
contextualIdentity: json['contextualIdentity'] as String?,
|
contextualIdentity: json['contextualIdentity'] as String?,
|
||||||
authSettings:
|
authSettings: json['authSettings'] == null
|
||||||
json['authSettings'] == null
|
|
||||||
? null
|
? null
|
||||||
: ContainerAuthSettings.fromJson(
|
: ContainerAuthSettings.fromJson(
|
||||||
json['authSettings'] as Map<String, dynamic>,
|
json['authSettings'] as Map<String, dynamic>,
|
||||||
|
|||||||
@@ -13,8 +13,9 @@ String _$tabDatabaseHash() => r'422bd4789296dc271fabbd5906f2e2ab16bccaa3';
|
|||||||
final tabDatabaseProvider = Provider<TabDatabase>.internal(
|
final tabDatabaseProvider = Provider<TabDatabase>.internal(
|
||||||
tabDatabase,
|
tabDatabase,
|
||||||
name: r'tabDatabaseProvider',
|
name: r'tabDatabaseProvider',
|
||||||
debugGetCreateSourceHash:
|
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||||
const bool.fromEnvironment('dart.vm.product') ? null : _$tabDatabaseHash,
|
? null
|
||||||
|
: _$tabDatabaseHash,
|
||||||
dependencies: null,
|
dependencies: null,
|
||||||
allTransitiveDependencies: null,
|
allTransitiveDependencies: null,
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -26,8 +26,7 @@ AsyncValue<List<ContainerDataWithCount>> matchSortedContainersWithCount(
|
|||||||
}
|
}
|
||||||
|
|
||||||
return value.whenData(
|
return value.whenData(
|
||||||
(cb) =>
|
(cb) => TokenizedFilter.sort(
|
||||||
TokenizedFilter.sort(
|
|
||||||
items: cb,
|
items: cb,
|
||||||
toString: (item) => item.name,
|
toString: (item) => item.name,
|
||||||
query: searchText!,
|
query: searchText!,
|
||||||
|
|||||||
@@ -15,8 +15,7 @@ final containersWithCountProvider =
|
|||||||
AutoDisposeStreamProvider<List<ContainerDataWithCount>>.internal(
|
AutoDisposeStreamProvider<List<ContainerDataWithCount>>.internal(
|
||||||
containersWithCount,
|
containersWithCount,
|
||||||
name: r'containersWithCountProvider',
|
name: r'containersWithCountProvider',
|
||||||
debugGetCreateSourceHash:
|
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||||
const bool.fromEnvironment('dart.vm.product')
|
|
||||||
? null
|
? null
|
||||||
: _$containersWithCountHash,
|
: _$containersWithCountHash,
|
||||||
dependencies: null,
|
dependencies: null,
|
||||||
@@ -101,8 +100,7 @@ class MatchSortedContainersWithCountProvider
|
|||||||
),
|
),
|
||||||
from: matchSortedContainersWithCountProvider,
|
from: matchSortedContainersWithCountProvider,
|
||||||
name: r'matchSortedContainersWithCountProvider',
|
name: r'matchSortedContainersWithCountProvider',
|
||||||
debugGetCreateSourceHash:
|
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||||
const bool.fromEnvironment('dart.vm.product')
|
|
||||||
? null
|
? null
|
||||||
: _$matchSortedContainersWithCountHash,
|
: _$matchSortedContainersWithCountHash,
|
||||||
dependencies: MatchSortedContainersWithCountFamily._dependencies,
|
dependencies: MatchSortedContainersWithCountFamily._dependencies,
|
||||||
@@ -229,8 +227,7 @@ class ContainerTabIdsProvider extends AutoDisposeStreamProvider<List<String>> {
|
|||||||
(ref) => containerTabIds(ref as ContainerTabIdsRef, containerFilter),
|
(ref) => containerTabIds(ref as ContainerTabIdsRef, containerFilter),
|
||||||
from: containerTabIdsProvider,
|
from: containerTabIdsProvider,
|
||||||
name: r'containerTabIdsProvider',
|
name: r'containerTabIdsProvider',
|
||||||
debugGetCreateSourceHash:
|
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||||
const bool.fromEnvironment('dart.vm.product')
|
|
||||||
? null
|
? null
|
||||||
: _$containerTabIdsHash,
|
: _$containerTabIdsHash,
|
||||||
dependencies: ContainerTabIdsFamily._dependencies,
|
dependencies: ContainerTabIdsFamily._dependencies,
|
||||||
|
|||||||
@@ -52,8 +52,8 @@ class SelectedContainer extends _$SelectedContainer {
|
|||||||
|
|
||||||
if (passAuth) {
|
if (passAuth) {
|
||||||
if (container.metadata.useProxy) {
|
if (container.metadata.useProxy) {
|
||||||
final proxyPluginHealthy =
|
final proxyPluginHealthy = await GeckoContainerProxyService()
|
||||||
await GeckoContainerProxyService().healthcheck();
|
.healthcheck();
|
||||||
|
|
||||||
if (proxyPluginHealthy) {
|
if (proxyPluginHealthy) {
|
||||||
state = id;
|
state = id;
|
||||||
|
|||||||
@@ -15,8 +15,7 @@ final selectedContainerDataProvider =
|
|||||||
AutoDisposeStreamProvider<ContainerData?>.internal(
|
AutoDisposeStreamProvider<ContainerData?>.internal(
|
||||||
selectedContainerData,
|
selectedContainerData,
|
||||||
name: r'selectedContainerDataProvider',
|
name: r'selectedContainerDataProvider',
|
||||||
debugGetCreateSourceHash:
|
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||||
const bool.fromEnvironment('dart.vm.product')
|
|
||||||
? null
|
? null
|
||||||
: _$selectedContainerDataHash,
|
: _$selectedContainerDataHash,
|
||||||
dependencies: null,
|
dependencies: null,
|
||||||
@@ -34,8 +33,7 @@ final selectedContainerProvider =
|
|||||||
NotifierProvider<SelectedContainer, String?>.internal(
|
NotifierProvider<SelectedContainer, String?>.internal(
|
||||||
SelectedContainer.new,
|
SelectedContainer.new,
|
||||||
name: r'selectedContainerProvider',
|
name: r'selectedContainerProvider',
|
||||||
debugGetCreateSourceHash:
|
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||||
const bool.fromEnvironment('dart.vm.product')
|
|
||||||
? null
|
? null
|
||||||
: _$selectedContainerHash,
|
: _$selectedContainerHash,
|
||||||
dependencies: null,
|
dependencies: null,
|
||||||
|
|||||||
@@ -15,8 +15,7 @@ final containerRepositoryProvider =
|
|||||||
NotifierProvider<ContainerRepository, void>.internal(
|
NotifierProvider<ContainerRepository, void>.internal(
|
||||||
ContainerRepository.new,
|
ContainerRepository.new,
|
||||||
name: r'containerRepositoryProvider',
|
name: r'containerRepositoryProvider',
|
||||||
debugGetCreateSourceHash:
|
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||||
const bool.fromEnvironment('dart.vm.product')
|
|
||||||
? null
|
? null
|
||||||
: _$containerRepositoryHash,
|
: _$containerRepositoryHash,
|
||||||
dependencies: null,
|
dependencies: null,
|
||||||
|
|||||||
@@ -21,8 +21,7 @@ class TabDataRepository extends _$TabDataRepository {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Future<void> closeAllTabsByContainer(String? containerId) async {
|
Future<void> closeAllTabsByContainer(String? containerId) async {
|
||||||
final tabIds =
|
final tabIds = await ref
|
||||||
await ref
|
|
||||||
.read(tabDatabaseProvider)
|
.read(tabDatabaseProvider)
|
||||||
.containerDao
|
.containerDao
|
||||||
.getContainerTabIds(containerId)
|
.getContainerTabIds(containerId)
|
||||||
@@ -34,15 +33,13 @@ class TabDataRepository extends _$TabDataRepository {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Future<void> closeAllTabsByHost(String? containerId, String host) async {
|
Future<void> closeAllTabsByHost(String? containerId, String host) async {
|
||||||
final tabs =
|
final tabs = await ref
|
||||||
await ref
|
|
||||||
.read(tabDatabaseProvider)
|
.read(tabDatabaseProvider)
|
||||||
.containerDao
|
.containerDao
|
||||||
.getContainerTabsData(containerId)
|
.getContainerTabsData(containerId)
|
||||||
.get();
|
.get();
|
||||||
|
|
||||||
final filtered =
|
final filtered = tabs
|
||||||
tabs
|
|
||||||
.where((tab) => tab.url?.host == host)
|
.where((tab) => tab.url?.host == host)
|
||||||
.map((tab) => tab.id)
|
.map((tab) => tab.id)
|
||||||
.toList();
|
.toList();
|
||||||
|
|||||||
@@ -14,8 +14,7 @@ final tabDataRepositoryProvider =
|
|||||||
NotifierProvider<TabDataRepository, void>.internal(
|
NotifierProvider<TabDataRepository, void>.internal(
|
||||||
TabDataRepository.new,
|
TabDataRepository.new,
|
||||||
name: r'tabDataRepositoryProvider',
|
name: r'tabDataRepositoryProvider',
|
||||||
debugGetCreateSourceHash:
|
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||||
const bool.fromEnvironment('dart.vm.product')
|
|
||||||
? null
|
? null
|
||||||
: _$tabDataRepositoryHash,
|
: _$tabDataRepositoryHash,
|
||||||
dependencies: null,
|
dependencies: null,
|
||||||
|
|||||||
@@ -19,8 +19,7 @@ class TabSearchRepository extends _$TabSearchRepository {
|
|||||||
}) async {
|
}) async {
|
||||||
if (input.isNotEmpty) {
|
if (input.isNotEmpty) {
|
||||||
state = await AsyncValue.guard(
|
state = await AsyncValue.guard(
|
||||||
() =>
|
() => ref
|
||||||
ref
|
|
||||||
.read(tabDatabaseProvider)
|
.read(tabDatabaseProvider)
|
||||||
.tabDao
|
.tabDao
|
||||||
.queryTabs(
|
.queryTabs(
|
||||||
|
|||||||
@@ -87,8 +87,7 @@ class TabSearchRepositoryProvider
|
|||||||
() => TabSearchRepository()..partition = partition,
|
() => TabSearchRepository()..partition = partition,
|
||||||
from: tabSearchRepositoryProvider,
|
from: tabSearchRepositoryProvider,
|
||||||
name: r'tabSearchRepositoryProvider',
|
name: r'tabSearchRepositoryProvider',
|
||||||
debugGetCreateSourceHash:
|
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||||
const bool.fromEnvironment('dart.vm.product')
|
|
||||||
? null
|
? null
|
||||||
: _$tabSearchRepositoryHash,
|
: _$tabSearchRepositoryHash,
|
||||||
dependencies: TabSearchRepositoryFamily._dependencies,
|
dependencies: TabSearchRepositoryFamily._dependencies,
|
||||||
|
|||||||
@@ -149,8 +149,7 @@ class ContainerEditScreen extends HookConsumerWidget {
|
|||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
final color = await showDialog<Color?>(
|
final color = await showDialog<Color?>(
|
||||||
context: context,
|
context: context,
|
||||||
builder:
|
builder: (context) =>
|
||||||
(context) =>
|
|
||||||
ColorPickerDialog(selectedColor.value),
|
ColorPickerDialog(selectedColor.value),
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -164,11 +163,9 @@ class ContainerEditScreen extends HookConsumerWidget {
|
|||||||
title: const Text('Cookie Isolation'),
|
title: const Text('Cookie Isolation'),
|
||||||
secondary: const Icon(MdiIcons.cookieLock),
|
secondary: const Icon(MdiIcons.cookieLock),
|
||||||
contentPadding: EdgeInsets.zero,
|
contentPadding: EdgeInsets.zero,
|
||||||
onChanged:
|
onChanged: (_mode == _DialogMode.create)
|
||||||
(_mode == _DialogMode.create)
|
|
||||||
? (value) {
|
? (value) {
|
||||||
contextualIdentity.value =
|
contextualIdentity.value = value
|
||||||
value
|
|
||||||
? initialContainer
|
? initialContainer
|
||||||
.metadata
|
.metadata
|
||||||
.contextualIdentity ??
|
.contextualIdentity ??
|
||||||
@@ -230,8 +227,9 @@ class ContainerEditScreen extends HookConsumerWidget {
|
|||||||
title: const Text('Timeout'),
|
title: const Text('Timeout'),
|
||||||
controlAffinity: ListTileControlAffinity.leading,
|
controlAffinity: ListTileControlAffinity.leading,
|
||||||
onChanged: (value) {
|
onChanged: (value) {
|
||||||
final newValue =
|
final newValue = value!
|
||||||
value! ? _timeoutOptions[1].value : null;
|
? _timeoutOptions[1].value
|
||||||
|
: null;
|
||||||
|
|
||||||
authSettings.value = authSettings.value.copyWith
|
authSettings.value = authSettings.value.copyWith
|
||||||
.lockTimeout(newValue);
|
.lockTimeout(newValue);
|
||||||
|
|||||||
@@ -28,8 +28,7 @@ class ContainerListScreen extends HookConsumerWidget {
|
|||||||
enabled: containersAsync.isLoading,
|
enabled: containersAsync.isLoading,
|
||||||
child: containersAsync.when(
|
child: containersAsync.when(
|
||||||
skipLoadingOnReload: true,
|
skipLoadingOnReload: true,
|
||||||
data:
|
data: (containers) => FadingScroll(
|
||||||
(containers) => FadingScroll(
|
|
||||||
fadingSize: 25,
|
fadingSize: 25,
|
||||||
builder: (context, controller) {
|
builder: (context, controller) {
|
||||||
return ListView.builder(
|
return ListView.builder(
|
||||||
@@ -46,29 +45,23 @@ class ContainerListScreen extends HookConsumerWidget {
|
|||||||
SlidableAction(
|
SlidableAction(
|
||||||
onPressed: (context) async {
|
onPressed: (context) async {
|
||||||
final result = await ref
|
final result = await ref
|
||||||
.read(
|
.read(selectedContainerProvider.notifier)
|
||||||
selectedContainerProvider.notifier,
|
|
||||||
)
|
|
||||||
.setContainerId(container.id);
|
.setContainerId(container.id);
|
||||||
|
|
||||||
if (context.mounted &&
|
if (context.mounted &&
|
||||||
result ==
|
result ==
|
||||||
SetContainerResult
|
SetContainerResult.successHasProxy) {
|
||||||
.successHasProxy) {
|
|
||||||
await ref
|
await ref
|
||||||
.read(
|
.read(
|
||||||
startProxyControllerProvider
|
startProxyControllerProvider.notifier,
|
||||||
.notifier,
|
|
||||||
)
|
)
|
||||||
.maybeStartProxy(context);
|
.maybeStartProxy(context);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
foregroundColor:
|
foregroundColor: Theme.of(
|
||||||
Theme.of(
|
|
||||||
context,
|
context,
|
||||||
).colorScheme.onPrimaryContainer,
|
).colorScheme.onPrimaryContainer,
|
||||||
backgroundColor:
|
backgroundColor: Theme.of(
|
||||||
Theme.of(
|
|
||||||
context,
|
context,
|
||||||
).colorScheme.primaryContainer,
|
).colorScheme.primaryContainer,
|
||||||
icon: Icons.check,
|
icon: Icons.check,
|
||||||
@@ -78,17 +71,13 @@ class ContainerListScreen extends HookConsumerWidget {
|
|||||||
SlidableAction(
|
SlidableAction(
|
||||||
onPressed: (context) {
|
onPressed: (context) {
|
||||||
ref
|
ref
|
||||||
.read(
|
.read(selectedContainerProvider.notifier)
|
||||||
selectedContainerProvider.notifier,
|
|
||||||
)
|
|
||||||
.clearContainer();
|
.clearContainer();
|
||||||
},
|
},
|
||||||
foregroundColor:
|
foregroundColor: Theme.of(
|
||||||
Theme.of(
|
|
||||||
context,
|
context,
|
||||||
).colorScheme.onPrimaryContainer,
|
).colorScheme.onPrimaryContainer,
|
||||||
backgroundColor:
|
backgroundColor: Theme.of(
|
||||||
Theme.of(
|
|
||||||
context,
|
context,
|
||||||
).colorScheme.primaryContainer,
|
).colorScheme.primaryContainer,
|
||||||
icon: Icons.close,
|
icon: Icons.close,
|
||||||
@@ -102,17 +91,13 @@ class ContainerListScreen extends HookConsumerWidget {
|
|||||||
SlidableAction(
|
SlidableAction(
|
||||||
onPressed: (context) async {
|
onPressed: (context) async {
|
||||||
await ref
|
await ref
|
||||||
.read(
|
.read(containerRepositoryProvider.notifier)
|
||||||
containerRepositoryProvider.notifier,
|
|
||||||
)
|
|
||||||
.deleteContainer(container.id);
|
.deleteContainer(container.id);
|
||||||
},
|
},
|
||||||
backgroundColor:
|
backgroundColor: Theme.of(
|
||||||
Theme.of(
|
|
||||||
context,
|
context,
|
||||||
).colorScheme.errorContainer,
|
).colorScheme.errorContainer,
|
||||||
foregroundColor:
|
foregroundColor: Theme.of(
|
||||||
Theme.of(
|
|
||||||
context,
|
context,
|
||||||
).colorScheme.onErrorContainer,
|
).colorScheme.onErrorContainer,
|
||||||
icon: Icons.delete,
|
icon: Icons.delete,
|
||||||
@@ -130,11 +115,9 @@ class ContainerListScreen extends HookConsumerWidget {
|
|||||||
},
|
},
|
||||||
),
|
),
|
||||||
error: (error, stackTrace) => SizedBox.shrink(),
|
error: (error, stackTrace) => SizedBox.shrink(),
|
||||||
loading:
|
loading: () => ListView.builder(
|
||||||
() => ListView.builder(
|
|
||||||
itemCount: 3,
|
itemCount: 3,
|
||||||
itemBuilder:
|
itemBuilder: (context, index) => ContainerListTile(
|
||||||
(context, index) => ContainerListTile(
|
|
||||||
ContainerData(id: 'null', color: Colors.transparent),
|
ContainerData(id: 'null', color: Colors.transparent),
|
||||||
isSelected: false,
|
isSelected: false,
|
||||||
),
|
),
|
||||||
@@ -145,8 +128,7 @@ class ContainerListScreen extends HookConsumerWidget {
|
|||||||
),
|
),
|
||||||
floatingActionButton: FloatingActionButton.extended(
|
floatingActionButton: FloatingActionButton.extended(
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
final initialColor =
|
final initialColor = await ref
|
||||||
await ref
|
|
||||||
.read(containerRepositoryProvider.notifier)
|
.read(containerRepositoryProvider.notifier)
|
||||||
.unusedRandomContainerColor();
|
.unusedRandomContainerColor();
|
||||||
|
|
||||||
|
|||||||
@@ -68,8 +68,7 @@ class ContainerChips extends HookConsumerWidget {
|
|||||||
child: SelectableChips(
|
child: SelectableChips(
|
||||||
deleteIcon: false,
|
deleteIcon: false,
|
||||||
itemId: (container) => container.id,
|
itemId: (container) => container.id,
|
||||||
itemAvatar:
|
itemAvatar: (container) => Container(
|
||||||
(container) => Container(
|
|
||||||
width: 20.0,
|
width: 20.0,
|
||||||
height: 20.0,
|
height: 20.0,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
@@ -77,8 +76,8 @@ class ContainerChips extends HookConsumerWidget {
|
|||||||
shape: BoxShape.circle,
|
shape: BoxShape.circle,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
itemLabel:
|
itemLabel: (container) =>
|
||||||
(container) => Text(container.name ?? 'New Container'),
|
Text(container.name ?? 'New Container'),
|
||||||
itemBadgeCount: (container) => container.tabCount,
|
itemBadgeCount: (container) => container.tabCount,
|
||||||
itemWrap: (child, container) {
|
itemWrap: (child, container) {
|
||||||
return HookBuilder(
|
return HookBuilder(
|
||||||
@@ -150,8 +149,7 @@ class ContainerChips extends HookConsumerWidget {
|
|||||||
|
|
||||||
return OverlayPortal(
|
return OverlayPortal(
|
||||||
controller: overlayController,
|
controller: overlayController,
|
||||||
overlayChildBuilder:
|
overlayChildBuilder: (context) => Positioned(
|
||||||
(context) => Positioned(
|
|
||||||
top: position.dy,
|
top: position.dy,
|
||||||
left: position.dx,
|
left: position.dx,
|
||||||
child: IgnorePointer(
|
child: IgnorePointer(
|
||||||
|
|||||||
+19
-35
@@ -54,8 +54,7 @@ class _MaterialPickerState extends State<MaterialPicker> {
|
|||||||
clipBehavior: Clip.hardEdge,
|
clipBehavior: Clip.hardEdge,
|
||||||
decoration: const BoxDecoration(),
|
decoration: const BoxDecoration(),
|
||||||
child: Container(
|
child: Container(
|
||||||
margin:
|
margin: isPortrait
|
||||||
isPortrait
|
|
||||||
? const EdgeInsets.only(right: 10)
|
? const EdgeInsets.only(right: 10)
|
||||||
: const EdgeInsets.only(bottom: 10),
|
: const EdgeInsets.only(bottom: 10),
|
||||||
width: isPortrait ? 60 : null,
|
width: isPortrait ? 60 : null,
|
||||||
@@ -64,8 +63,7 @@ class _MaterialPickerState extends State<MaterialPicker> {
|
|||||||
color: Theme.of(context).cardColor,
|
color: Theme.of(context).cardColor,
|
||||||
boxShadow: [
|
boxShadow: [
|
||||||
BoxShadow(
|
BoxShadow(
|
||||||
color:
|
color: (Theme.of(context).brightness == Brightness.light)
|
||||||
(Theme.of(context).brightness == Brightness.light)
|
|
||||||
? (Theme.of(context).brightness == Brightness.light)
|
? (Theme.of(context).brightness == Brightness.light)
|
||||||
? Colors.grey[300]!
|
? Colors.grey[300]!
|
||||||
: Colors.black38
|
: Colors.black38
|
||||||
@@ -73,20 +71,17 @@ class _MaterialPickerState extends State<MaterialPicker> {
|
|||||||
blurRadius: 10,
|
blurRadius: 10,
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
border:
|
border: isPortrait
|
||||||
isPortrait
|
|
||||||
? Border(
|
? Border(
|
||||||
right: BorderSide(
|
right: BorderSide(
|
||||||
color:
|
color: (Theme.of(context).brightness == Brightness.light)
|
||||||
(Theme.of(context).brightness == Brightness.light)
|
|
||||||
? Colors.grey[300]!
|
? Colors.grey[300]!
|
||||||
: Colors.black38,
|
: Colors.black38,
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
: Border(
|
: Border(
|
||||||
top: BorderSide(
|
top: BorderSide(
|
||||||
color:
|
color: (Theme.of(context).brightness == Brightness.light)
|
||||||
(Theme.of(context).brightness == Brightness.light)
|
|
||||||
? Colors.grey[300]!
|
? Colors.grey[300]!
|
||||||
: Colors.black38,
|
: Colors.black38,
|
||||||
),
|
),
|
||||||
@@ -118,8 +113,7 @@ class _MaterialPickerState extends State<MaterialPicker> {
|
|||||||
},
|
},
|
||||||
child: Container(
|
child: Container(
|
||||||
color: const Color(0x00000000),
|
color: const Color(0x00000000),
|
||||||
padding:
|
padding: isPortrait
|
||||||
isPortrait
|
|
||||||
? const EdgeInsets.fromLTRB(0, 7, 0, 7)
|
? const EdgeInsets.fromLTRB(0, 7, 0, 7)
|
||||||
: const EdgeInsets.fromLTRB(7, 0, 7, 0),
|
: const EdgeInsets.fromLTRB(7, 0, 7, 0),
|
||||||
child: Align(
|
child: Align(
|
||||||
@@ -130,16 +124,13 @@ class _MaterialPickerState extends State<MaterialPicker> {
|
|||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: colorType,
|
color: colorType,
|
||||||
shape: BoxShape.circle,
|
shape: BoxShape.circle,
|
||||||
boxShadow:
|
boxShadow: _currentColorType == colors
|
||||||
_currentColorType == colors
|
|
||||||
? [
|
? [
|
||||||
if (colorType ==
|
if (colorType ==
|
||||||
Theme.of(context).cardColor)
|
Theme.of(context).cardColor)
|
||||||
BoxShadow(
|
BoxShadow(
|
||||||
color:
|
color:
|
||||||
(Theme.of(
|
(Theme.of(context).brightness ==
|
||||||
context,
|
|
||||||
).brightness ==
|
|
||||||
Brightness.light)
|
Brightness.light)
|
||||||
? Colors.grey[300]!
|
? Colors.grey[300]!
|
||||||
: Colors.black38,
|
: Colors.black38,
|
||||||
@@ -152,8 +143,7 @@ class _MaterialPickerState extends State<MaterialPicker> {
|
|||||||
),
|
),
|
||||||
]
|
]
|
||||||
: null,
|
: null,
|
||||||
border:
|
border: colorType == Theme.of(context).cardColor
|
||||||
colorType == Theme.of(context).cardColor
|
|
||||||
? Border.all(
|
? Border.all(
|
||||||
color:
|
color:
|
||||||
(Theme.of(context).brightness ==
|
(Theme.of(context).brightness ==
|
||||||
@@ -208,27 +198,23 @@ class _MaterialPickerState extends State<MaterialPicker> {
|
|||||||
},
|
},
|
||||||
child: Container(
|
child: Container(
|
||||||
color: const Color(0x00000000),
|
color: const Color(0x00000000),
|
||||||
margin:
|
margin: isPortrait
|
||||||
isPortrait
|
|
||||||
? const EdgeInsets.only(right: 10)
|
? const EdgeInsets.only(right: 10)
|
||||||
: const EdgeInsets.only(bottom: 10),
|
: const EdgeInsets.only(bottom: 10),
|
||||||
padding:
|
padding: isPortrait
|
||||||
isPortrait
|
|
||||||
? const EdgeInsets.fromLTRB(0, 7, 0, 7)
|
? const EdgeInsets.fromLTRB(0, 7, 0, 7)
|
||||||
: const EdgeInsets.fromLTRB(7, 0, 7, 0),
|
: const EdgeInsets.fromLTRB(7, 0, 7, 0),
|
||||||
child: Align(
|
child: Align(
|
||||||
child: AnimatedContainer(
|
child: AnimatedContainer(
|
||||||
curve: Curves.fastOutSlowIn,
|
curve: Curves.fastOutSlowIn,
|
||||||
duration: const Duration(milliseconds: 500),
|
duration: const Duration(milliseconds: 500),
|
||||||
width:
|
width: isPortrait
|
||||||
isPortrait
|
|
||||||
? (_currentShading == color ? 250 : 230)
|
? (_currentShading == color ? 250 : 230)
|
||||||
: (_currentShading == color ? 50 : 30),
|
: (_currentShading == color ? 50 : 30),
|
||||||
height: isPortrait ? 50 : 220,
|
height: isPortrait ? 50 : 220,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: color,
|
color: color,
|
||||||
boxShadow:
|
boxShadow: _currentShading == color
|
||||||
_currentShading == color
|
|
||||||
? [
|
? [
|
||||||
if ((color == Colors.white) ||
|
if ((color == Colors.white) ||
|
||||||
(color == Colors.black))
|
(color == Colors.black))
|
||||||
@@ -256,16 +242,14 @@ class _MaterialPickerState extends State<MaterialPicker> {
|
|||||||
)
|
)
|
||||||
: null,
|
: null,
|
||||||
),
|
),
|
||||||
child:
|
child: widget.enableLabel
|
||||||
widget.enableLabel
|
|
||||||
? isPortrait
|
? isPortrait
|
||||||
? Row(
|
? Row(
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
' ${colors.values.first}',
|
' ${colors.values.first}',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color:
|
color: useWhiteForeground(color)
|
||||||
useWhiteForeground(color)
|
|
||||||
? Colors.white
|
? Colors.white
|
||||||
: Colors.black,
|
: Colors.black,
|
||||||
),
|
),
|
||||||
@@ -291,8 +275,9 @@ class _MaterialPickerState extends State<MaterialPicker> {
|
|||||||
duration: const Duration(
|
duration: const Duration(
|
||||||
milliseconds: 300,
|
milliseconds: 300,
|
||||||
),
|
),
|
||||||
opacity:
|
opacity: _currentShading == color
|
||||||
_currentShading == color ? 1 : 0,
|
? 1
|
||||||
|
: 0,
|
||||||
child: Container(
|
child: Container(
|
||||||
padding: const EdgeInsets.only(
|
padding: const EdgeInsets.only(
|
||||||
top: 16,
|
top: 16,
|
||||||
@@ -301,8 +286,7 @@ class _MaterialPickerState extends State<MaterialPicker> {
|
|||||||
child: Text(
|
child: Text(
|
||||||
colors.values.first,
|
colors.values.first,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color:
|
color: useWhiteForeground(color)
|
||||||
useWhiteForeground(color)
|
|
||||||
? Colors.white
|
? Colors.white
|
||||||
: Colors.black,
|
: Colors.black,
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
|
|||||||
@@ -17,8 +17,7 @@ bool useWhiteForeground(Color backgroundColor, {double bias = 0.0}) {
|
|||||||
// return 1.05 / (color.computeLuminance() + 0.05) > 4.5;
|
// return 1.05 / (color.computeLuminance() + 0.05) > 4.5;
|
||||||
|
|
||||||
// New:
|
// New:
|
||||||
final v =
|
final v = sqrt(
|
||||||
sqrt(
|
|
||||||
pow(backgroundColor.r, 2) * 0.299 +
|
pow(backgroundColor.r, 2) * 0.299 +
|
||||||
pow(backgroundColor.g, 2) * 0.587 +
|
pow(backgroundColor.g, 2) * 0.587 +
|
||||||
pow(backgroundColor.b, 2) * 0.114,
|
pow(backgroundColor.b, 2) * 0.114,
|
||||||
|
|||||||
@@ -15,8 +15,7 @@ final kagiAutosuggestServiceProvider =
|
|||||||
NotifierProvider<KagiAutosuggestService, void>.internal(
|
NotifierProvider<KagiAutosuggestService, void>.internal(
|
||||||
KagiAutosuggestService.new,
|
KagiAutosuggestService.new,
|
||||||
name: r'kagiAutosuggestServiceProvider',
|
name: r'kagiAutosuggestServiceProvider',
|
||||||
debugGetCreateSourceHash:
|
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||||
const bool.fromEnvironment('dart.vm.product')
|
|
||||||
? null
|
? null
|
||||||
: _$kagiAutosuggestServiceHash,
|
: _$kagiAutosuggestServiceHash,
|
||||||
dependencies: null,
|
dependencies: null,
|
||||||
|
|||||||
@@ -37,8 +37,7 @@ sealed class FtsQueryBuilder {
|
|||||||
}) {
|
}) {
|
||||||
final matches = _tokenizePattern.allMatches(input);
|
final matches = _tokenizePattern.allMatches(input);
|
||||||
|
|
||||||
final barewords =
|
final barewords = matches
|
||||||
matches
|
|
||||||
.map((match) {
|
.map((match) {
|
||||||
if (match.group(1) != null) {
|
if (match.group(1) != null) {
|
||||||
return EnclosedBareword(match.group(1)!);
|
return EnclosedBareword(match.group(1)!);
|
||||||
@@ -55,8 +54,7 @@ sealed class FtsQueryBuilder {
|
|||||||
//Merge short tokens
|
//Merge short tokens
|
||||||
_mergeShortBarewords(barewords, minTokenLength);
|
_mergeShortBarewords(barewords, minTokenLength);
|
||||||
|
|
||||||
_tokens =
|
_tokens = barewords
|
||||||
barewords
|
|
||||||
.where((bareword) => bareword.word.length >= minTokenLength)
|
.where((bareword) => bareword.word.length >= minTokenLength)
|
||||||
.take(tokenLimit)
|
.take(tokenLimit)
|
||||||
.toList();
|
.toList();
|
||||||
|
|||||||
@@ -33,8 +33,7 @@ sealed class UnixTokenizer {
|
|||||||
}) {
|
}) {
|
||||||
final matches = _tokenizePattern.allMatches(input);
|
final matches = _tokenizePattern.allMatches(input);
|
||||||
|
|
||||||
final barewords =
|
final barewords = matches
|
||||||
matches
|
|
||||||
.map((match) {
|
.map((match) {
|
||||||
if (match.group(1) != null) {
|
if (match.group(1) != null) {
|
||||||
return EnclosedBareword(match.group(1)!);
|
return EnclosedBareword(match.group(1)!);
|
||||||
|
|||||||
@@ -80,8 +80,7 @@ class TokenizedFilter<T> {
|
|||||||
}) {
|
}) {
|
||||||
final queryTokens = _tokenize(query);
|
final queryTokens = _tokenize(query);
|
||||||
|
|
||||||
final scoredItems =
|
final scoredItems = items.map((item) {
|
||||||
items.map((item) {
|
|
||||||
final itemString = toString(item);
|
final itemString = toString(item);
|
||||||
if (itemString == null || itemString.isEmpty) {
|
if (itemString == null || itemString.isEmpty) {
|
||||||
return (item, 0.0);
|
return (item, 0.0);
|
||||||
@@ -108,8 +107,7 @@ class TokenizedFilter<T> {
|
|||||||
}) {
|
}) {
|
||||||
final queryTokens = _tokenize(query);
|
final queryTokens = _tokenize(query);
|
||||||
|
|
||||||
final filtered =
|
final filtered = items.where((item) {
|
||||||
items.where((item) {
|
|
||||||
final itemString = toString(item);
|
final itemString = toString(item);
|
||||||
if (itemString == null || itemString.isEmpty) {
|
if (itemString == null || itemString.isEmpty) {
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user