majro update
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:exceptions/exceptions.dart';
|
||||
import 'package:lensai/core/providers/format.dart';
|
||||
import 'package:lensai/features/about/data/repositories/package_info_repository.dart';
|
||||
import 'package:lensai/features/bangs/data/models/bang_group.dart';
|
||||
import 'package:lensai/features/bangs/domain/repositories/sync.dart';
|
||||
@@ -43,6 +44,8 @@ class AppInitializationService extends _$AppInitializationService {
|
||||
state = await Result.fromAsync(() async {
|
||||
final errors = <ErrorMessage>[];
|
||||
|
||||
await ref.read(formatProvider.future);
|
||||
|
||||
await _initPackageInfo();
|
||||
|
||||
final bangSyncResults = await _initBangs();
|
||||
|
||||
@@ -7,28 +7,27 @@ part of 'app_initialization.dart';
|
||||
// **************************************************************************
|
||||
|
||||
String _$appInitializationServiceHash() =>
|
||||
r'fa383398929c8f3c8b430986304775e044b9af7a';
|
||||
r'5e537f916825d6c5f660cf62ff133c2ef00ab091';
|
||||
|
||||
/// See also [AppInitializationService].
|
||||
@ProviderFor(AppInitializationService)
|
||||
final appInitializationServiceProvider = NotifierProvider<
|
||||
AppInitializationService,
|
||||
Result<
|
||||
({
|
||||
bool initialized,
|
||||
String? stage,
|
||||
List<ErrorMessage> errors
|
||||
})>>.internal(
|
||||
AppInitializationService,
|
||||
Result<({bool initialized, String? stage, List<ErrorMessage> errors})>
|
||||
>.internal(
|
||||
AppInitializationService.new,
|
||||
name: r'appInitializationServiceProvider',
|
||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$appInitializationServiceHash,
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$appInitializationServiceHash,
|
||||
dependencies: null,
|
||||
allTransitiveDependencies: null,
|
||||
);
|
||||
|
||||
typedef _$AppInitializationService = Notifier<
|
||||
Result<({bool initialized, String? stage, List<ErrorMessage> errors})>>;
|
||||
typedef _$AppInitializationService =
|
||||
Notifier<
|
||||
Result<({bool initialized, String? stage, List<ErrorMessage> errors})>
|
||||
>;
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package
|
||||
|
||||
@@ -13,8 +13,8 @@ import 'package:lensai/data/models/web_page_info.dart';
|
||||
import 'package:lensai/extensions/nullable.dart';
|
||||
import 'package:lensai/features/geckoview/domain/entities/browser_icon.dart';
|
||||
import 'package:lensai/features/user/domain/repositories/cache.dart';
|
||||
import 'package:lensai/features/web_feed/utils/feed_finder.dart';
|
||||
import 'package:lensai/presentation/controllers/website_title.dart';
|
||||
import 'package:lensai/utils/feed_finder.dart';
|
||||
import 'package:lensai/utils/lru_cache.dart';
|
||||
import 'package:riverpod_annotation/riverpod_annotation.dart';
|
||||
|
||||
@@ -119,7 +119,7 @@ class GenericWebsiteService extends _$GenericWebsiteService {
|
||||
url: _resolveRelativeUri(baseUrl, url).toString(),
|
||||
type: type,
|
||||
sizes: sizesToList(link.attributes['sizes']).toList(),
|
||||
mimeType: (mimeType?.isNotEmpty ?? true) ? null : mimeType,
|
||||
mimeType: mimeType.isNotEmpty ? mimeType : null,
|
||||
maskable: false,
|
||||
),
|
||||
);
|
||||
@@ -186,7 +186,7 @@ class GenericWebsiteService extends _$GenericWebsiteService {
|
||||
return icons;
|
||||
}
|
||||
|
||||
Future<Result<WebPageInfo>> fetchPageInfo(Uri url) async {
|
||||
Future<Result<WebPageInfo>> fetchPageInfo(Uri url) {
|
||||
return Result.fromAsync(() async {
|
||||
final result = await compute((String urlString) async {
|
||||
final client = http.Client();
|
||||
@@ -200,10 +200,8 @@ class GenericWebsiteService extends _$GenericWebsiteService {
|
||||
|
||||
final title = document.querySelector('title')?.text;
|
||||
final resources = _extractIcons(baseUri, document);
|
||||
final feeds = await FeedFinder(
|
||||
url: baseUri,
|
||||
document: document,
|
||||
).parse(verifyCandidates: false);
|
||||
final feeds =
|
||||
await FeedFinder(url: baseUri, document: document).parse();
|
||||
|
||||
return {
|
||||
'title': title,
|
||||
|
||||
@@ -7,20 +7,21 @@ part of 'generic_website.dart';
|
||||
// **************************************************************************
|
||||
|
||||
String _$genericWebsiteServiceHash() =>
|
||||
r'12396df7370ebc31b0a53b786e5a3e27c6d05177';
|
||||
r'9d17f41596579c289a6cd021ed8d8049e1fb7aff';
|
||||
|
||||
/// See also [GenericWebsiteService].
|
||||
@ProviderFor(GenericWebsiteService)
|
||||
final genericWebsiteServiceProvider =
|
||||
NotifierProvider<GenericWebsiteService, void>.internal(
|
||||
GenericWebsiteService.new,
|
||||
name: r'genericWebsiteServiceProvider',
|
||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$genericWebsiteServiceHash,
|
||||
dependencies: null,
|
||||
allTransitiveDependencies: null,
|
||||
);
|
||||
GenericWebsiteService.new,
|
||||
name: r'genericWebsiteServiceProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$genericWebsiteServiceHash,
|
||||
dependencies: null,
|
||||
allTransitiveDependencies: null,
|
||||
);
|
||||
|
||||
typedef _$GenericWebsiteService = Notifier<void>;
|
||||
// ignore_for_file: type=lint
|
||||
|
||||
Reference in New Issue
Block a user