mirror of
https://gitlab.com/nkming2/nc-photos.git
synced 2025-01-22 16:56:19 +01:00
Generate correct tags for logger
This commit is contained in:
parent
5e06136b8a
commit
a2fc045834
347 changed files with 3714 additions and 454 deletions
|
@ -7,11 +7,13 @@ import 'package:nc_photos/ci_string.dart';
|
||||||
import 'package:nc_photos/iterable_extension.dart';
|
import 'package:nc_photos/iterable_extension.dart';
|
||||||
import 'package:nc_photos/string_extension.dart';
|
import 'package:nc_photos/string_extension.dart';
|
||||||
import 'package:nc_photos/type.dart';
|
import 'package:nc_photos/type.dart';
|
||||||
|
import 'package:np_codegen/np_codegen.dart';
|
||||||
import 'package:to_string/to_string.dart';
|
import 'package:to_string/to_string.dart';
|
||||||
|
|
||||||
part 'account.g.dart';
|
part 'account.g.dart';
|
||||||
|
|
||||||
/// Details of a remote Nextcloud server account
|
/// Details of a remote Nextcloud server account
|
||||||
|
@npLog
|
||||||
@toString
|
@toString
|
||||||
class Account with EquatableMixin {
|
class Account with EquatableMixin {
|
||||||
Account(
|
Account(
|
||||||
|
@ -117,7 +119,7 @@ class Account with EquatableMixin {
|
||||||
/// versioning of this class, use to upgrade old persisted accounts
|
/// versioning of this class, use to upgrade old persisted accounts
|
||||||
static const version = 2;
|
static const version = 2;
|
||||||
|
|
||||||
static final _log = Logger("account.Account");
|
static final _log = _$logAccount;
|
||||||
}
|
}
|
||||||
|
|
||||||
extension AccountExtension on Account {
|
extension AccountExtension on Account {
|
||||||
|
@ -139,6 +141,7 @@ abstract class AccountUpgrader {
|
||||||
JsonObj? call(JsonObj json);
|
JsonObj? call(JsonObj json);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@npLog
|
||||||
class AccountUpgraderV1 implements AccountUpgrader {
|
class AccountUpgraderV1 implements AccountUpgrader {
|
||||||
const AccountUpgraderV1({
|
const AccountUpgraderV1({
|
||||||
this.logAccountId,
|
this.logAccountId,
|
||||||
|
@ -159,6 +162,4 @@ class AccountUpgraderV1 implements AccountUpgrader {
|
||||||
|
|
||||||
/// Account ID for logging only
|
/// Account ID for logging only
|
||||||
final String? logAccountId;
|
final String? logAccountId;
|
||||||
|
|
||||||
static final _log = Logger("account.AccountUpgraderV1");
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,6 +2,26 @@
|
||||||
|
|
||||||
part of 'account.dart';
|
part of 'account.dart';
|
||||||
|
|
||||||
|
// **************************************************************************
|
||||||
|
// NpLogGenerator
|
||||||
|
// **************************************************************************
|
||||||
|
|
||||||
|
// ignore: non_constant_identifier_names
|
||||||
|
final _$logAccount = Logger("account.Account");
|
||||||
|
|
||||||
|
extension _$AccountNpLog on Account {
|
||||||
|
// ignore: unused_element
|
||||||
|
Logger get _log => _$logAccount;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ignore: non_constant_identifier_names
|
||||||
|
final _$logAccountUpgraderV1 = Logger("account.AccountUpgraderV1");
|
||||||
|
|
||||||
|
extension _$AccountUpgraderV1NpLog on AccountUpgraderV1 {
|
||||||
|
// ignore: unused_element
|
||||||
|
Logger get _log => _$logAccountUpgraderV1;
|
||||||
|
}
|
||||||
|
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
// ToStringGenerator
|
// ToStringGenerator
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
|
|
|
@ -5,6 +5,7 @@ import 'package:http/http.dart' as http;
|
||||||
import 'package:logging/logging.dart';
|
import 'package:logging/logging.dart';
|
||||||
import 'package:nc_photos/account.dart';
|
import 'package:nc_photos/account.dart';
|
||||||
import 'package:nc_photos/string_extension.dart';
|
import 'package:nc_photos/string_extension.dart';
|
||||||
|
import 'package:np_codegen/np_codegen.dart';
|
||||||
import 'package:to_string/to_string.dart';
|
import 'package:to_string/to_string.dart';
|
||||||
import 'package:xml/xml.dart';
|
import 'package:xml/xml.dart';
|
||||||
|
|
||||||
|
@ -49,6 +50,7 @@ class BasicAuth {
|
||||||
final String password;
|
final String password;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@npLog
|
||||||
class Api {
|
class Api {
|
||||||
Api(Account account)
|
Api(Account account)
|
||||||
: _baseUrl = Uri.parse(account.url),
|
: _baseUrl = Uri.parse(account.url),
|
||||||
|
@ -127,12 +129,11 @@ class Api {
|
||||||
|
|
||||||
final Uri _baseUrl;
|
final Uri _baseUrl;
|
||||||
BasicAuth? _auth;
|
BasicAuth? _auth;
|
||||||
|
|
||||||
static final _log = Logger("api.api.Api");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool _isHttpStatusGood(int status) => status ~/ 100 == 2;
|
bool _isHttpStatusGood(int status) => status ~/ 100 == 2;
|
||||||
|
|
||||||
|
@npLog
|
||||||
class ApiFiles {
|
class ApiFiles {
|
||||||
ApiFiles(this._api);
|
ApiFiles(this._api);
|
||||||
|
|
||||||
|
@ -468,8 +469,6 @@ class ApiFiles {
|
||||||
rethrow;
|
rethrow;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static final _log = Logger("api.api._Files");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class ApiOcs {
|
class ApiOcs {
|
||||||
|
@ -492,6 +491,7 @@ class ApiOcsDav {
|
||||||
final ApiOcs _ocs;
|
final ApiOcs _ocs;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@npLog
|
||||||
class ApiOcsDavDirect {
|
class ApiOcsDavDirect {
|
||||||
ApiOcsDavDirect(this._dav);
|
ApiOcsDavDirect(this._dav);
|
||||||
|
|
||||||
|
@ -518,8 +518,6 @@ class ApiOcsDavDirect {
|
||||||
}
|
}
|
||||||
|
|
||||||
final ApiOcsDav _dav;
|
final ApiOcsDav _dav;
|
||||||
|
|
||||||
static final _log = Logger("api.api._OcsDavDirect");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class ApiOcsFacerecognition {
|
class ApiOcsFacerecognition {
|
||||||
|
@ -533,6 +531,7 @@ class ApiOcsFacerecognition {
|
||||||
final ApiOcs _ocs;
|
final ApiOcs _ocs;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@npLog
|
||||||
class ApiOcsFacerecognitionPersons {
|
class ApiOcsFacerecognitionPersons {
|
||||||
ApiOcsFacerecognitionPersons(this._facerecognition);
|
ApiOcsFacerecognitionPersons(this._facerecognition);
|
||||||
|
|
||||||
|
@ -555,8 +554,6 @@ class ApiOcsFacerecognitionPersons {
|
||||||
}
|
}
|
||||||
|
|
||||||
final ApiOcsFacerecognition _facerecognition;
|
final ApiOcsFacerecognition _facerecognition;
|
||||||
|
|
||||||
static final _log = Logger("api.api._OcsFacerecognitionPersons");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class ApiOcsFacerecognitionPerson {
|
class ApiOcsFacerecognitionPerson {
|
||||||
|
@ -569,6 +566,7 @@ class ApiOcsFacerecognitionPerson {
|
||||||
final String _name;
|
final String _name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@npLog
|
||||||
class ApiOcsFacerecognitionPersonFaces {
|
class ApiOcsFacerecognitionPersonFaces {
|
||||||
ApiOcsFacerecognitionPersonFaces(this._person);
|
ApiOcsFacerecognitionPersonFaces(this._person);
|
||||||
|
|
||||||
|
@ -591,8 +589,6 @@ class ApiOcsFacerecognitionPersonFaces {
|
||||||
}
|
}
|
||||||
|
|
||||||
final ApiOcsFacerecognitionPerson _person;
|
final ApiOcsFacerecognitionPerson _person;
|
||||||
|
|
||||||
static final _log = Logger("api.api._OcsFacerecognitionPersonFaces");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class ApiOcsFilesSharing {
|
class ApiOcsFilesSharing {
|
||||||
|
@ -608,6 +604,7 @@ class ApiOcsFilesSharing {
|
||||||
final ApiOcs _ocs;
|
final ApiOcs _ocs;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@npLog
|
||||||
class ApiOcsFilesSharingShares {
|
class ApiOcsFilesSharingShares {
|
||||||
ApiOcsFilesSharingShares(this._filesSharing);
|
ApiOcsFilesSharingShares(this._filesSharing);
|
||||||
|
|
||||||
|
@ -683,10 +680,9 @@ class ApiOcsFilesSharingShares {
|
||||||
}
|
}
|
||||||
|
|
||||||
final ApiOcsFilesSharing _filesSharing;
|
final ApiOcsFilesSharing _filesSharing;
|
||||||
|
|
||||||
static final _log = Logger("api.api._OcsFilesSharingShares");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@npLog
|
||||||
class ApiOcsFilesSharingShare {
|
class ApiOcsFilesSharingShare {
|
||||||
ApiOcsFilesSharingShare(this._filesSharing, this._shareId);
|
ApiOcsFilesSharingShare(this._filesSharing, this._shareId);
|
||||||
|
|
||||||
|
@ -713,10 +709,9 @@ class ApiOcsFilesSharingShare {
|
||||||
|
|
||||||
final ApiOcsFilesSharing _filesSharing;
|
final ApiOcsFilesSharing _filesSharing;
|
||||||
final String _shareId;
|
final String _shareId;
|
||||||
|
|
||||||
static final _log = Logger("api.api._OcsFilesSharingShare");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@npLog
|
||||||
class ApiOcsFilesSharingSharees {
|
class ApiOcsFilesSharingSharees {
|
||||||
ApiOcsFilesSharingSharees(this._filesSharing);
|
ApiOcsFilesSharingSharees(this._filesSharing);
|
||||||
|
|
||||||
|
@ -751,10 +746,9 @@ class ApiOcsFilesSharingSharees {
|
||||||
}
|
}
|
||||||
|
|
||||||
final ApiOcsFilesSharing _filesSharing;
|
final ApiOcsFilesSharing _filesSharing;
|
||||||
|
|
||||||
static final _log = Logger("api.api._OcsFilesSharingSharees");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@npLog
|
||||||
class ApiSystemtags {
|
class ApiSystemtags {
|
||||||
const ApiSystemtags(this.api);
|
const ApiSystemtags(this.api);
|
||||||
|
|
||||||
|
@ -815,8 +809,6 @@ class ApiSystemtags {
|
||||||
}
|
}
|
||||||
|
|
||||||
final Api api;
|
final Api api;
|
||||||
|
|
||||||
static final _log = Logger("api.api._Systemtags");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class ApiSystemtagsRelations {
|
class ApiSystemtagsRelations {
|
||||||
|
@ -828,6 +820,7 @@ class ApiSystemtagsRelations {
|
||||||
final Api api;
|
final Api api;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@npLog
|
||||||
class ApiSystemtagsRelationsFiles {
|
class ApiSystemtagsRelationsFiles {
|
||||||
const ApiSystemtagsRelationsFiles(this.systemtagsRelations, this.fileId);
|
const ApiSystemtagsRelationsFiles(this.systemtagsRelations, this.fileId);
|
||||||
|
|
||||||
|
@ -894,6 +887,4 @@ class ApiSystemtagsRelationsFiles {
|
||||||
|
|
||||||
final ApiSystemtagsRelations systemtagsRelations;
|
final ApiSystemtagsRelations systemtagsRelations;
|
||||||
final int fileId;
|
final int fileId;
|
||||||
|
|
||||||
static final _log = Logger("api.api._SystemtagsRelationsFiles");
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,6 +2,96 @@
|
||||||
|
|
||||||
part of 'api.dart';
|
part of 'api.dart';
|
||||||
|
|
||||||
|
// **************************************************************************
|
||||||
|
// NpLogGenerator
|
||||||
|
// **************************************************************************
|
||||||
|
|
||||||
|
// ignore: non_constant_identifier_names
|
||||||
|
final _$logApi = Logger("api.api.Api");
|
||||||
|
|
||||||
|
extension _$ApiNpLog on Api {
|
||||||
|
// ignore: unused_element
|
||||||
|
Logger get _log => _$logApi;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ignore: non_constant_identifier_names
|
||||||
|
final _$logApiFiles = Logger("api.api.ApiFiles");
|
||||||
|
|
||||||
|
extension _$ApiFilesNpLog on ApiFiles {
|
||||||
|
// ignore: unused_element
|
||||||
|
Logger get _log => _$logApiFiles;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ignore: non_constant_identifier_names
|
||||||
|
final _$logApiOcsDavDirect = Logger("api.api.ApiOcsDavDirect");
|
||||||
|
|
||||||
|
extension _$ApiOcsDavDirectNpLog on ApiOcsDavDirect {
|
||||||
|
// ignore: unused_element
|
||||||
|
Logger get _log => _$logApiOcsDavDirect;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ignore: non_constant_identifier_names
|
||||||
|
final _$logApiOcsFacerecognitionPersons =
|
||||||
|
Logger("api.api.ApiOcsFacerecognitionPersons");
|
||||||
|
|
||||||
|
extension _$ApiOcsFacerecognitionPersonsNpLog on ApiOcsFacerecognitionPersons {
|
||||||
|
// ignore: unused_element
|
||||||
|
Logger get _log => _$logApiOcsFacerecognitionPersons;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ignore: non_constant_identifier_names
|
||||||
|
final _$logApiOcsFacerecognitionPersonFaces =
|
||||||
|
Logger("api.api.ApiOcsFacerecognitionPersonFaces");
|
||||||
|
|
||||||
|
extension _$ApiOcsFacerecognitionPersonFacesNpLog
|
||||||
|
on ApiOcsFacerecognitionPersonFaces {
|
||||||
|
// ignore: unused_element
|
||||||
|
Logger get _log => _$logApiOcsFacerecognitionPersonFaces;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ignore: non_constant_identifier_names
|
||||||
|
final _$logApiOcsFilesSharingShares =
|
||||||
|
Logger("api.api.ApiOcsFilesSharingShares");
|
||||||
|
|
||||||
|
extension _$ApiOcsFilesSharingSharesNpLog on ApiOcsFilesSharingShares {
|
||||||
|
// ignore: unused_element
|
||||||
|
Logger get _log => _$logApiOcsFilesSharingShares;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ignore: non_constant_identifier_names
|
||||||
|
final _$logApiOcsFilesSharingShare = Logger("api.api.ApiOcsFilesSharingShare");
|
||||||
|
|
||||||
|
extension _$ApiOcsFilesSharingShareNpLog on ApiOcsFilesSharingShare {
|
||||||
|
// ignore: unused_element
|
||||||
|
Logger get _log => _$logApiOcsFilesSharingShare;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ignore: non_constant_identifier_names
|
||||||
|
final _$logApiOcsFilesSharingSharees =
|
||||||
|
Logger("api.api.ApiOcsFilesSharingSharees");
|
||||||
|
|
||||||
|
extension _$ApiOcsFilesSharingShareesNpLog on ApiOcsFilesSharingSharees {
|
||||||
|
// ignore: unused_element
|
||||||
|
Logger get _log => _$logApiOcsFilesSharingSharees;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ignore: non_constant_identifier_names
|
||||||
|
final _$logApiSystemtags = Logger("api.api.ApiSystemtags");
|
||||||
|
|
||||||
|
extension _$ApiSystemtagsNpLog on ApiSystemtags {
|
||||||
|
// ignore: unused_element
|
||||||
|
Logger get _log => _$logApiSystemtags;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ignore: non_constant_identifier_names
|
||||||
|
final _$logApiSystemtagsRelationsFiles =
|
||||||
|
Logger("api.api.ApiSystemtagsRelationsFiles");
|
||||||
|
|
||||||
|
extension _$ApiSystemtagsRelationsFilesNpLog on ApiSystemtagsRelationsFiles {
|
||||||
|
// ignore: unused_element
|
||||||
|
Logger get _log => _$logApiSystemtagsRelationsFiles;
|
||||||
|
}
|
||||||
|
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
// ToStringGenerator
|
// ToStringGenerator
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
|
|
|
@ -3,8 +3,12 @@ import 'package:flutter_gen/gen_l10n/app_localizations.dart';
|
||||||
import 'package:flutter_gen/gen_l10n/app_localizations_en.dart';
|
import 'package:flutter_gen/gen_l10n/app_localizations_en.dart';
|
||||||
import 'package:logging/logging.dart';
|
import 'package:logging/logging.dart';
|
||||||
import 'package:nc_photos/widget/my_app.dart';
|
import 'package:nc_photos/widget/my_app.dart';
|
||||||
|
import 'package:np_codegen/np_codegen.dart';
|
||||||
|
|
||||||
|
part 'app_localizations.g.dart';
|
||||||
|
|
||||||
/// Simplify localized string access
|
/// Simplify localized string access
|
||||||
|
@npLog
|
||||||
class L10n {
|
class L10n {
|
||||||
static AppLocalizations global() => AppLocalizations.of(MyApp.globalContext)!;
|
static AppLocalizations global() => AppLocalizations.of(MyApp.globalContext)!;
|
||||||
|
|
||||||
|
@ -20,5 +24,5 @@ class L10n {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static final _log = Logger("app_localizations.L10n");
|
static final _log = _$logL10n;
|
||||||
}
|
}
|
||||||
|
|
15
app/lib/app_localizations.g.dart
Normal file
15
app/lib/app_localizations.g.dart
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
|
||||||
|
part of 'app_localizations.dart';
|
||||||
|
|
||||||
|
// **************************************************************************
|
||||||
|
// NpLogGenerator
|
||||||
|
// **************************************************************************
|
||||||
|
|
||||||
|
// ignore: non_constant_identifier_names
|
||||||
|
final _$logL10n = Logger("app_localizations.L10n");
|
||||||
|
|
||||||
|
extension _$L10nNpLog on L10n {
|
||||||
|
// ignore: unused_element
|
||||||
|
Logger get _log => _$logL10n;
|
||||||
|
}
|
|
@ -7,6 +7,7 @@ import 'package:nc_photos/account.dart';
|
||||||
import 'package:nc_photos/api/api_util.dart' as api_util;
|
import 'package:nc_photos/api/api_util.dart' as api_util;
|
||||||
import 'package:nc_photos/ci_string.dart';
|
import 'package:nc_photos/ci_string.dart';
|
||||||
import 'package:nc_photos/exception.dart';
|
import 'package:nc_photos/exception.dart';
|
||||||
|
import 'package:np_codegen/np_codegen.dart';
|
||||||
import 'package:to_string/to_string.dart';
|
import 'package:to_string/to_string.dart';
|
||||||
|
|
||||||
part 'app_password_exchange.g.dart';
|
part 'app_password_exchange.g.dart';
|
||||||
|
@ -135,6 +136,7 @@ class AppPasswordExchangeBlocResult extends AppPasswordExchangeBlocState {
|
||||||
/// -> State [AppPasswordExchangeBlocFailure]
|
/// -> State [AppPasswordExchangeBlocFailure]
|
||||||
/// Event [AppPasswordExchangeBlocAppPwFailed] -> State [AppPasswordExchangeBlocFailure]
|
/// Event [AppPasswordExchangeBlocAppPwFailed] -> State [AppPasswordExchangeBlocFailure]
|
||||||
/// ```
|
/// ```
|
||||||
|
@npLog
|
||||||
class AppPasswordExchangeBloc
|
class AppPasswordExchangeBloc
|
||||||
extends Bloc<AppPasswordExchangeBlocEvent, AppPasswordExchangeBlocState> {
|
extends Bloc<AppPasswordExchangeBlocEvent, AppPasswordExchangeBlocState> {
|
||||||
AppPasswordExchangeBloc() : super(const AppPasswordExchangeBlocInit()) {
|
AppPasswordExchangeBloc() : super(const AppPasswordExchangeBlocInit()) {
|
||||||
|
@ -256,9 +258,6 @@ class AppPasswordExchangeBloc
|
||||||
emit(const AppPasswordExchangeBlocResult(null));
|
emit(const AppPasswordExchangeBlocResult(null));
|
||||||
}
|
}
|
||||||
|
|
||||||
static final _log =
|
|
||||||
Logger("bloc.app_password_exchange.AppPasswordExchangeBloc");
|
|
||||||
|
|
||||||
StreamSubscription<Future<api_util.AppPasswordResponse>>?
|
StreamSubscription<Future<api_util.AppPasswordResponse>>?
|
||||||
_pollPasswordSubscription;
|
_pollPasswordSubscription;
|
||||||
bool _isCanceled = false;
|
bool _isCanceled = false;
|
||||||
|
|
|
@ -2,6 +2,19 @@
|
||||||
|
|
||||||
part of 'app_password_exchange.dart';
|
part of 'app_password_exchange.dart';
|
||||||
|
|
||||||
|
// **************************************************************************
|
||||||
|
// NpLogGenerator
|
||||||
|
// **************************************************************************
|
||||||
|
|
||||||
|
// ignore: non_constant_identifier_names
|
||||||
|
final _$logAppPasswordExchangeBloc =
|
||||||
|
Logger("bloc.app_password_exchange.AppPasswordExchangeBloc");
|
||||||
|
|
||||||
|
extension _$AppPasswordExchangeBlocNpLog on AppPasswordExchangeBloc {
|
||||||
|
// ignore: unused_element
|
||||||
|
Logger get _log => _$logAppPasswordExchangeBloc;
|
||||||
|
}
|
||||||
|
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
// ToStringGenerator
|
// ToStringGenerator
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
|
|
|
@ -14,6 +14,7 @@ import 'package:nc_photos/use_case/list_album.dart';
|
||||||
import 'package:nc_photos/use_case/list_location_group.dart';
|
import 'package:nc_photos/use_case/list_location_group.dart';
|
||||||
import 'package:nc_photos/use_case/list_person.dart';
|
import 'package:nc_photos/use_case/list_person.dart';
|
||||||
import 'package:nc_photos/use_case/list_tag.dart';
|
import 'package:nc_photos/use_case/list_tag.dart';
|
||||||
|
import 'package:np_codegen/np_codegen.dart';
|
||||||
import 'package:to_string/to_string.dart';
|
import 'package:to_string/to_string.dart';
|
||||||
import 'package:tuple/tuple.dart';
|
import 'package:tuple/tuple.dart';
|
||||||
import 'package:woozy_search/woozy_search.dart';
|
import 'package:woozy_search/woozy_search.dart';
|
||||||
|
@ -121,6 +122,7 @@ class HomeSearchSuggestionBlocFailure extends HomeSearchSuggestionBlocState {
|
||||||
final Object exception;
|
final Object exception;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@npLog
|
||||||
class HomeSearchSuggestionBloc
|
class HomeSearchSuggestionBloc
|
||||||
extends Bloc<HomeSearchSuggestionBlocEvent, HomeSearchSuggestionBlocState> {
|
extends Bloc<HomeSearchSuggestionBlocEvent, HomeSearchSuggestionBlocState> {
|
||||||
HomeSearchSuggestionBloc(this.account)
|
HomeSearchSuggestionBloc(this.account)
|
||||||
|
@ -240,9 +242,6 @@ class HomeSearchSuggestionBloc
|
||||||
late final DiContainer _c;
|
late final DiContainer _c;
|
||||||
|
|
||||||
final _search = Woozy<_Searcheable>(limit: 10);
|
final _search = Woozy<_Searcheable>(limit: 10);
|
||||||
|
|
||||||
static final _log =
|
|
||||||
Logger("bloc.album_search_suggestion.HomeSearchSuggestionBloc");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
abstract class _Searcheable {
|
abstract class _Searcheable {
|
||||||
|
|
|
@ -2,6 +2,19 @@
|
||||||
|
|
||||||
part of 'home_search_suggestion.dart';
|
part of 'home_search_suggestion.dart';
|
||||||
|
|
||||||
|
// **************************************************************************
|
||||||
|
// NpLogGenerator
|
||||||
|
// **************************************************************************
|
||||||
|
|
||||||
|
// ignore: non_constant_identifier_names
|
||||||
|
final _$logHomeSearchSuggestionBloc =
|
||||||
|
Logger("bloc.home_search_suggestion.HomeSearchSuggestionBloc");
|
||||||
|
|
||||||
|
extension _$HomeSearchSuggestionBlocNpLog on HomeSearchSuggestionBloc {
|
||||||
|
// ignore: unused_element
|
||||||
|
Logger get _log => _$logHomeSearchSuggestionBloc;
|
||||||
|
}
|
||||||
|
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
// ToStringGenerator
|
// ToStringGenerator
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
|
|
|
@ -15,6 +15,7 @@ import 'package:nc_photos/or_null.dart';
|
||||||
import 'package:nc_photos/remote_storage_util.dart' as remote_storage_util;
|
import 'package:nc_photos/remote_storage_util.dart' as remote_storage_util;
|
||||||
import 'package:nc_photos/throttler.dart';
|
import 'package:nc_photos/throttler.dart';
|
||||||
import 'package:nc_photos/use_case/list_album.dart';
|
import 'package:nc_photos/use_case/list_album.dart';
|
||||||
|
import 'package:np_codegen/np_codegen.dart';
|
||||||
import 'package:to_string/to_string.dart';
|
import 'package:to_string/to_string.dart';
|
||||||
|
|
||||||
part 'list_album.g.dart';
|
part 'list_album.g.dart';
|
||||||
|
@ -93,6 +94,7 @@ class ListAlbumBlocInconsistent extends ListAlbumBlocState {
|
||||||
: super(account, items);
|
: super(account, items);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@npLog
|
||||||
class ListAlbumBloc extends Bloc<ListAlbumBlocEvent, ListAlbumBlocState> {
|
class ListAlbumBloc extends Bloc<ListAlbumBlocEvent, ListAlbumBlocState> {
|
||||||
/// Constructor
|
/// Constructor
|
||||||
///
|
///
|
||||||
|
@ -332,5 +334,5 @@ class ListAlbumBloc extends Bloc<ListAlbumBlocEvent, ListAlbumBlocState> {
|
||||||
|
|
||||||
late Throttler _refreshThrottler;
|
late Throttler _refreshThrottler;
|
||||||
|
|
||||||
static final _log = Logger("bloc.list_album.ListAlbumBloc");
|
static final _log = _$logListAlbumBloc;
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,6 +2,18 @@
|
||||||
|
|
||||||
part of 'list_album.dart';
|
part of 'list_album.dart';
|
||||||
|
|
||||||
|
// **************************************************************************
|
||||||
|
// NpLogGenerator
|
||||||
|
// **************************************************************************
|
||||||
|
|
||||||
|
// ignore: non_constant_identifier_names
|
||||||
|
final _$logListAlbumBloc = Logger("bloc.list_album.ListAlbumBloc");
|
||||||
|
|
||||||
|
extension _$ListAlbumBlocNpLog on ListAlbumBloc {
|
||||||
|
// ignore: unused_element
|
||||||
|
Logger get _log => _$logListAlbumBloc;
|
||||||
|
}
|
||||||
|
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
// ToStringGenerator
|
// ToStringGenerator
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
|
|
|
@ -15,6 +15,7 @@ import 'package:nc_photos/iterable_extension.dart';
|
||||||
import 'package:nc_photos/object_extension.dart';
|
import 'package:nc_photos/object_extension.dart';
|
||||||
import 'package:nc_photos/use_case/list_share.dart';
|
import 'package:nc_photos/use_case/list_share.dart';
|
||||||
import 'package:nc_photos/use_case/list_sharee.dart';
|
import 'package:nc_photos/use_case/list_sharee.dart';
|
||||||
|
import 'package:np_codegen/np_codegen.dart';
|
||||||
import 'package:to_string/to_string.dart';
|
import 'package:to_string/to_string.dart';
|
||||||
|
|
||||||
part 'list_album_share_outlier.g.dart';
|
part 'list_album_share_outlier.g.dart';
|
||||||
|
@ -158,6 +159,7 @@ class ListAlbumShareOutlierBlocFailure extends ListAlbumShareOutlierBlocState {
|
||||||
/// 1. shares between you and the owner for all files added by you
|
/// 1. shares between you and the owner for all files added by you
|
||||||
/// 2. files added by you: for each participants, any files that are
|
/// 2. files added by you: for each participants, any files that are
|
||||||
/// added on or after the album share for him/her was created
|
/// added on or after the album share for him/her was created
|
||||||
|
@npLog
|
||||||
class ListAlbumShareOutlierBloc extends Bloc<ListAlbumShareOutlierBlocEvent,
|
class ListAlbumShareOutlierBloc extends Bloc<ListAlbumShareOutlierBlocEvent,
|
||||||
ListAlbumShareOutlierBlocState> {
|
ListAlbumShareOutlierBlocState> {
|
||||||
ListAlbumShareOutlierBloc(this._c)
|
ListAlbumShareOutlierBloc(this._c)
|
||||||
|
@ -374,7 +376,4 @@ class ListAlbumShareOutlierBloc extends Bloc<ListAlbumShareOutlierBlocEvent,
|
||||||
}
|
}
|
||||||
|
|
||||||
final DiContainer _c;
|
final DiContainer _c;
|
||||||
|
|
||||||
static final _log =
|
|
||||||
Logger("bloc.list_album_share_outlier.ListAlbumShareOutlierBloc");
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,6 +2,19 @@
|
||||||
|
|
||||||
part of 'list_album_share_outlier.dart';
|
part of 'list_album_share_outlier.dart';
|
||||||
|
|
||||||
|
// **************************************************************************
|
||||||
|
// NpLogGenerator
|
||||||
|
// **************************************************************************
|
||||||
|
|
||||||
|
// ignore: non_constant_identifier_names
|
||||||
|
final _$logListAlbumShareOutlierBloc =
|
||||||
|
Logger("bloc.list_album_share_outlier.ListAlbumShareOutlierBloc");
|
||||||
|
|
||||||
|
extension _$ListAlbumShareOutlierBlocNpLog on ListAlbumShareOutlierBloc {
|
||||||
|
// ignore: unused_element
|
||||||
|
Logger get _log => _$logListAlbumShareOutlierBloc;
|
||||||
|
}
|
||||||
|
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
// ToStringGenerator
|
// ToStringGenerator
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
|
|
|
@ -9,6 +9,7 @@ import 'package:nc_photos/entity/person.dart';
|
||||||
import 'package:nc_photos/event/event.dart';
|
import 'package:nc_photos/event/event.dart';
|
||||||
import 'package:nc_photos/throttler.dart';
|
import 'package:nc_photos/throttler.dart';
|
||||||
import 'package:nc_photos/use_case/populate_person.dart';
|
import 'package:nc_photos/use_case/populate_person.dart';
|
||||||
|
import 'package:np_codegen/np_codegen.dart';
|
||||||
import 'package:to_string/to_string.dart';
|
import 'package:to_string/to_string.dart';
|
||||||
|
|
||||||
part 'list_face_file.g.dart';
|
part 'list_face_file.g.dart';
|
||||||
|
@ -82,6 +83,7 @@ class ListFaceFileBlocInconsistent extends ListFaceFileBlocState {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// List all people recognized in an account
|
/// List all people recognized in an account
|
||||||
|
@npLog
|
||||||
class ListFaceFileBloc
|
class ListFaceFileBloc
|
||||||
extends Bloc<ListFaceFileBlocEvent, ListFaceFileBlocState> {
|
extends Bloc<ListFaceFileBlocEvent, ListFaceFileBlocState> {
|
||||||
ListFaceFileBloc(this._c)
|
ListFaceFileBloc(this._c)
|
||||||
|
@ -217,6 +219,4 @@ class ListFaceFileBloc
|
||||||
},
|
},
|
||||||
logTag: "ListFaceFileBloc.refresh",
|
logTag: "ListFaceFileBloc.refresh",
|
||||||
);
|
);
|
||||||
|
|
||||||
static final _log = Logger("bloc.list_face_file.ListFaceFileBloc");
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,6 +2,18 @@
|
||||||
|
|
||||||
part of 'list_face_file.dart';
|
part of 'list_face_file.dart';
|
||||||
|
|
||||||
|
// **************************************************************************
|
||||||
|
// NpLogGenerator
|
||||||
|
// **************************************************************************
|
||||||
|
|
||||||
|
// ignore: non_constant_identifier_names
|
||||||
|
final _$logListFaceFileBloc = Logger("bloc.list_face_file.ListFaceFileBloc");
|
||||||
|
|
||||||
|
extension _$ListFaceFileBlocNpLog on ListFaceFileBloc {
|
||||||
|
// ignore: unused_element
|
||||||
|
Logger get _log => _$logListFaceFileBloc;
|
||||||
|
}
|
||||||
|
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
// ToStringGenerator
|
// ToStringGenerator
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
|
|
|
@ -12,6 +12,7 @@ import 'package:nc_photos/iterable_extension.dart';
|
||||||
import 'package:nc_photos/remote_storage_util.dart' as remote_storage_util;
|
import 'package:nc_photos/remote_storage_util.dart' as remote_storage_util;
|
||||||
import 'package:nc_photos/use_case/list_album.dart';
|
import 'package:nc_photos/use_case/list_album.dart';
|
||||||
import 'package:nc_photos/use_case/ls.dart';
|
import 'package:nc_photos/use_case/ls.dart';
|
||||||
|
import 'package:np_codegen/np_codegen.dart';
|
||||||
import 'package:to_string/to_string.dart';
|
import 'package:to_string/to_string.dart';
|
||||||
|
|
||||||
part 'list_importable_album.g.dart';
|
part 'list_importable_album.g.dart';
|
||||||
|
@ -79,6 +80,7 @@ class ListImportableAlbumBlocFailure extends ListImportableAlbumBlocState {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Return all directories that potentially could be a new album
|
/// Return all directories that potentially could be a new album
|
||||||
|
@npLog
|
||||||
class ListImportableAlbumBloc
|
class ListImportableAlbumBloc
|
||||||
extends Bloc<ListImportableAlbumBlocEvent, ListImportableAlbumBlocState> {
|
extends Bloc<ListImportableAlbumBlocEvent, ListImportableAlbumBlocState> {
|
||||||
ListImportableAlbumBloc(this._c)
|
ListImportableAlbumBloc(this._c)
|
||||||
|
@ -168,7 +170,4 @@ class ListImportableAlbumBloc
|
||||||
}
|
}
|
||||||
|
|
||||||
final DiContainer _c;
|
final DiContainer _c;
|
||||||
|
|
||||||
static final _log =
|
|
||||||
Logger("bloc.list_importable_album.ListImportableAlbumBloc");
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,6 +2,19 @@
|
||||||
|
|
||||||
part of 'list_importable_album.dart';
|
part of 'list_importable_album.dart';
|
||||||
|
|
||||||
|
// **************************************************************************
|
||||||
|
// NpLogGenerator
|
||||||
|
// **************************************************************************
|
||||||
|
|
||||||
|
// ignore: non_constant_identifier_names
|
||||||
|
final _$logListImportableAlbumBloc =
|
||||||
|
Logger("bloc.list_importable_album.ListImportableAlbumBloc");
|
||||||
|
|
||||||
|
extension _$ListImportableAlbumBlocNpLog on ListImportableAlbumBloc {
|
||||||
|
// ignore: unused_element
|
||||||
|
Logger get _log => _$logListImportableAlbumBloc;
|
||||||
|
}
|
||||||
|
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
// ToStringGenerator
|
// ToStringGenerator
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
|
|
|
@ -9,6 +9,7 @@ import 'package:nc_photos/event/event.dart';
|
||||||
import 'package:nc_photos/throttler.dart';
|
import 'package:nc_photos/throttler.dart';
|
||||||
import 'package:nc_photos/use_case/list_location_file.dart';
|
import 'package:nc_photos/use_case/list_location_file.dart';
|
||||||
import 'package:nc_photos/use_case/list_location_group.dart';
|
import 'package:nc_photos/use_case/list_location_group.dart';
|
||||||
|
import 'package:np_codegen/np_codegen.dart';
|
||||||
import 'package:to_string/to_string.dart';
|
import 'package:to_string/to_string.dart';
|
||||||
|
|
||||||
part 'list_location.g.dart';
|
part 'list_location.g.dart';
|
||||||
|
@ -83,6 +84,7 @@ class ListLocationBlocInconsistent extends ListLocationBlocState {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// List all files associated with a specific tag
|
/// List all files associated with a specific tag
|
||||||
|
@npLog
|
||||||
class ListLocationBloc
|
class ListLocationBloc
|
||||||
extends Bloc<ListLocationBlocEvent, ListLocationBlocState> {
|
extends Bloc<ListLocationBlocEvent, ListLocationBlocState> {
|
||||||
ListLocationBloc(this._c)
|
ListLocationBloc(this._c)
|
||||||
|
@ -170,6 +172,4 @@ class ListLocationBloc
|
||||||
},
|
},
|
||||||
logTag: "ListLocationBloc.refresh",
|
logTag: "ListLocationBloc.refresh",
|
||||||
);
|
);
|
||||||
|
|
||||||
static final _log = Logger("bloc.list_location.ListLocationBloc");
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,6 +2,18 @@
|
||||||
|
|
||||||
part of 'list_location.dart';
|
part of 'list_location.dart';
|
||||||
|
|
||||||
|
// **************************************************************************
|
||||||
|
// NpLogGenerator
|
||||||
|
// **************************************************************************
|
||||||
|
|
||||||
|
// ignore: non_constant_identifier_names
|
||||||
|
final _$logListLocationBloc = Logger("bloc.list_location.ListLocationBloc");
|
||||||
|
|
||||||
|
extension _$ListLocationBlocNpLog on ListLocationBloc {
|
||||||
|
// ignore: unused_element
|
||||||
|
Logger get _log => _$logListLocationBloc;
|
||||||
|
}
|
||||||
|
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
// ToStringGenerator
|
// ToStringGenerator
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
|
|
|
@ -8,6 +8,7 @@ import 'package:nc_photos/entity/file_util.dart' as file_util;
|
||||||
import 'package:nc_photos/event/event.dart';
|
import 'package:nc_photos/event/event.dart';
|
||||||
import 'package:nc_photos/throttler.dart';
|
import 'package:nc_photos/throttler.dart';
|
||||||
import 'package:nc_photos/use_case/list_location_file.dart';
|
import 'package:nc_photos/use_case/list_location_file.dart';
|
||||||
|
import 'package:np_codegen/np_codegen.dart';
|
||||||
import 'package:to_string/to_string.dart';
|
import 'package:to_string/to_string.dart';
|
||||||
|
|
||||||
part 'list_location_file.g.dart';
|
part 'list_location_file.g.dart';
|
||||||
|
@ -82,6 +83,7 @@ class ListLocationFileBlocInconsistent extends ListLocationFileBlocState {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// List all files associated with a specific tag
|
/// List all files associated with a specific tag
|
||||||
|
@npLog
|
||||||
class ListLocationFileBloc
|
class ListLocationFileBloc
|
||||||
extends Bloc<ListLocationFileBlocEvent, ListLocationFileBlocState> {
|
extends Bloc<ListLocationFileBlocEvent, ListLocationFileBlocState> {
|
||||||
ListLocationFileBloc(this._c)
|
ListLocationFileBloc(this._c)
|
||||||
|
@ -176,6 +178,4 @@ class ListLocationFileBloc
|
||||||
},
|
},
|
||||||
logTag: "ListLocationFileBloc.refresh",
|
logTag: "ListLocationFileBloc.refresh",
|
||||||
);
|
);
|
||||||
|
|
||||||
static final _log = Logger("bloc.list_location_file.ListLocationFileBloc");
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,6 +2,19 @@
|
||||||
|
|
||||||
part of 'list_location_file.dart';
|
part of 'list_location_file.dart';
|
||||||
|
|
||||||
|
// **************************************************************************
|
||||||
|
// NpLogGenerator
|
||||||
|
// **************************************************************************
|
||||||
|
|
||||||
|
// ignore: non_constant_identifier_names
|
||||||
|
final _$logListLocationFileBloc =
|
||||||
|
Logger("bloc.list_location_file.ListLocationFileBloc");
|
||||||
|
|
||||||
|
extension _$ListLocationFileBlocNpLog on ListLocationFileBloc {
|
||||||
|
// ignore: unused_element
|
||||||
|
Logger get _log => _$logListLocationFileBloc;
|
||||||
|
}
|
||||||
|
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
// ToStringGenerator
|
// ToStringGenerator
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
|
|
|
@ -5,6 +5,7 @@ import 'package:nc_photos/account.dart';
|
||||||
import 'package:nc_photos/di_container.dart';
|
import 'package:nc_photos/di_container.dart';
|
||||||
import 'package:nc_photos/entity/person.dart';
|
import 'package:nc_photos/entity/person.dart';
|
||||||
import 'package:nc_photos/use_case/list_person.dart';
|
import 'package:nc_photos/use_case/list_person.dart';
|
||||||
|
import 'package:np_codegen/np_codegen.dart';
|
||||||
import 'package:to_string/to_string.dart';
|
import 'package:to_string/to_string.dart';
|
||||||
|
|
||||||
part 'list_person.g.dart';
|
part 'list_person.g.dart';
|
||||||
|
@ -61,6 +62,7 @@ class ListPersonBlocFailure extends ListPersonBlocState {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// List all people recognized in an account
|
/// List all people recognized in an account
|
||||||
|
@npLog
|
||||||
class ListPersonBloc extends Bloc<ListPersonBlocEvent, ListPersonBlocState> {
|
class ListPersonBloc extends Bloc<ListPersonBlocEvent, ListPersonBlocState> {
|
||||||
ListPersonBloc(this._c)
|
ListPersonBloc(this._c)
|
||||||
: assert(require(_c)),
|
: assert(require(_c)),
|
||||||
|
@ -94,6 +96,4 @@ class ListPersonBloc extends Bloc<ListPersonBlocEvent, ListPersonBlocState> {
|
||||||
ListPerson(_c.withLocalRepo())(ev.account);
|
ListPerson(_c.withLocalRepo())(ev.account);
|
||||||
|
|
||||||
final DiContainer _c;
|
final DiContainer _c;
|
||||||
|
|
||||||
static final _log = Logger("bloc.list_person.ListPersonBloc");
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,6 +2,18 @@
|
||||||
|
|
||||||
part of 'list_person.dart';
|
part of 'list_person.dart';
|
||||||
|
|
||||||
|
// **************************************************************************
|
||||||
|
// NpLogGenerator
|
||||||
|
// **************************************************************************
|
||||||
|
|
||||||
|
// ignore: non_constant_identifier_names
|
||||||
|
final _$logListPersonBloc = Logger("bloc.list_person.ListPersonBloc");
|
||||||
|
|
||||||
|
extension _$ListPersonBlocNpLog on ListPersonBloc {
|
||||||
|
// ignore: unused_element
|
||||||
|
Logger get _log => _$logListPersonBloc;
|
||||||
|
}
|
||||||
|
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
// ToStringGenerator
|
// ToStringGenerator
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
|
|
|
@ -5,6 +5,7 @@ import 'package:nc_photos/account.dart';
|
||||||
import 'package:nc_photos/entity/file.dart';
|
import 'package:nc_photos/entity/file.dart';
|
||||||
import 'package:nc_photos/entity/share.dart';
|
import 'package:nc_photos/entity/share.dart';
|
||||||
import 'package:nc_photos/entity/share/data_source.dart';
|
import 'package:nc_photos/entity/share/data_source.dart';
|
||||||
|
import 'package:np_codegen/np_codegen.dart';
|
||||||
import 'package:to_string/to_string.dart';
|
import 'package:to_string/to_string.dart';
|
||||||
|
|
||||||
part 'list_share.g.dart';
|
part 'list_share.g.dart';
|
||||||
|
@ -63,6 +64,7 @@ class ListShareBlocFailure extends ListShareBlocState {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// List all shares from a given file
|
/// List all shares from a given file
|
||||||
|
@npLog
|
||||||
class ListShareBloc extends Bloc<ListShareBlocEvent, ListShareBlocState> {
|
class ListShareBloc extends Bloc<ListShareBlocEvent, ListShareBlocState> {
|
||||||
ListShareBloc() : super(ListShareBlocInit()) {
|
ListShareBloc() : super(ListShareBlocInit()) {
|
||||||
on<ListShareBlocEvent>(_onEvent);
|
on<ListShareBlocEvent>(_onEvent);
|
||||||
|
@ -91,6 +93,4 @@ class ListShareBloc extends Bloc<ListShareBlocEvent, ListShareBlocState> {
|
||||||
final shareRepo = ShareRepo(ShareRemoteDataSource());
|
final shareRepo = ShareRepo(ShareRemoteDataSource());
|
||||||
return shareRepo.list(ev.account, ev.file);
|
return shareRepo.list(ev.account, ev.file);
|
||||||
}
|
}
|
||||||
|
|
||||||
static final _log = Logger("bloc.list_share.ListShareBloc");
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,6 +2,18 @@
|
||||||
|
|
||||||
part of 'list_share.dart';
|
part of 'list_share.dart';
|
||||||
|
|
||||||
|
// **************************************************************************
|
||||||
|
// NpLogGenerator
|
||||||
|
// **************************************************************************
|
||||||
|
|
||||||
|
// ignore: non_constant_identifier_names
|
||||||
|
final _$logListShareBloc = Logger("bloc.list_share.ListShareBloc");
|
||||||
|
|
||||||
|
extension _$ListShareBlocNpLog on ListShareBloc {
|
||||||
|
// ignore: unused_element
|
||||||
|
Logger get _log => _$logListShareBloc;
|
||||||
|
}
|
||||||
|
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
// ToStringGenerator
|
// ToStringGenerator
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
|
|
|
@ -6,6 +6,7 @@ import 'package:nc_photos/account.dart';
|
||||||
import 'package:nc_photos/bloc/bloc_util.dart' as bloc_util;
|
import 'package:nc_photos/bloc/bloc_util.dart' as bloc_util;
|
||||||
import 'package:nc_photos/entity/sharee.dart';
|
import 'package:nc_photos/entity/sharee.dart';
|
||||||
import 'package:nc_photos/entity/sharee/data_source.dart';
|
import 'package:nc_photos/entity/sharee/data_source.dart';
|
||||||
|
import 'package:np_codegen/np_codegen.dart';
|
||||||
import 'package:to_string/to_string.dart';
|
import 'package:to_string/to_string.dart';
|
||||||
|
|
||||||
part 'list_sharee.g.dart';
|
part 'list_sharee.g.dart';
|
||||||
|
@ -62,6 +63,7 @@ class ListShareeBlocFailure extends ListShareeBlocState {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// List all sharees of this account
|
/// List all sharees of this account
|
||||||
|
@npLog
|
||||||
class ListShareeBloc extends Bloc<ListShareeBlocEvent, ListShareeBlocState> {
|
class ListShareeBloc extends Bloc<ListShareeBlocEvent, ListShareeBlocState> {
|
||||||
ListShareeBloc() : super(ListShareeBlocInit()) {
|
ListShareeBloc() : super(ListShareeBlocInit()) {
|
||||||
on<ListShareeBlocEvent>(_onEvent);
|
on<ListShareeBlocEvent>(_onEvent);
|
||||||
|
@ -105,5 +107,5 @@ class ListShareeBloc extends Bloc<ListShareeBlocEvent, ListShareeBlocState> {
|
||||||
return shareeRepo.list(ev.account);
|
return shareeRepo.list(ev.account);
|
||||||
}
|
}
|
||||||
|
|
||||||
static final _log = Logger("bloc.list_sharee.ListShareeBloc");
|
static final _log = _$logListShareeBloc;
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,6 +2,18 @@
|
||||||
|
|
||||||
part of 'list_sharee.dart';
|
part of 'list_sharee.dart';
|
||||||
|
|
||||||
|
// **************************************************************************
|
||||||
|
// NpLogGenerator
|
||||||
|
// **************************************************************************
|
||||||
|
|
||||||
|
// ignore: non_constant_identifier_names
|
||||||
|
final _$logListShareeBloc = Logger("bloc.list_sharee.ListShareeBloc");
|
||||||
|
|
||||||
|
extension _$ListShareeBlocNpLog on ListShareeBloc {
|
||||||
|
// ignore: unused_element
|
||||||
|
Logger get _log => _$logListShareeBloc;
|
||||||
|
}
|
||||||
|
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
// ToStringGenerator
|
// ToStringGenerator
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
|
|
|
@ -18,6 +18,7 @@ import 'package:nc_photos/use_case/find_file.dart';
|
||||||
import 'package:nc_photos/use_case/list_share_with_me.dart';
|
import 'package:nc_photos/use_case/list_share_with_me.dart';
|
||||||
import 'package:nc_photos/use_case/ls.dart';
|
import 'package:nc_photos/use_case/ls.dart';
|
||||||
import 'package:nc_photos/use_case/ls_single_file.dart';
|
import 'package:nc_photos/use_case/ls_single_file.dart';
|
||||||
|
import 'package:np_codegen/np_codegen.dart';
|
||||||
import 'package:path/path.dart' as path_lib;
|
import 'package:path/path.dart' as path_lib;
|
||||||
import 'package:to_string/to_string.dart';
|
import 'package:to_string/to_string.dart';
|
||||||
|
|
||||||
|
@ -137,6 +138,7 @@ class ListSharingBlocFailure extends ListSharingBlocState {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// List shares to be shown in [SharingBrowser]
|
/// List shares to be shown in [SharingBrowser]
|
||||||
|
@npLog
|
||||||
class ListSharingBloc extends Bloc<ListSharingBlocEvent, ListSharingBlocState> {
|
class ListSharingBloc extends Bloc<ListSharingBlocEvent, ListSharingBlocState> {
|
||||||
ListSharingBloc(this._c)
|
ListSharingBloc(this._c)
|
||||||
: assert(require(_c)),
|
: assert(require(_c)),
|
||||||
|
@ -417,5 +419,5 @@ class ListSharingBloc extends Bloc<ListSharingBlocEvent, ListSharingBlocState> {
|
||||||
|
|
||||||
late Throttler _refreshThrottler;
|
late Throttler _refreshThrottler;
|
||||||
|
|
||||||
static final _log = Logger("bloc.list_sharing.ListSharingBloc");
|
static final _log = _$logListSharingBloc;
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,6 +2,18 @@
|
||||||
|
|
||||||
part of 'list_sharing.dart';
|
part of 'list_sharing.dart';
|
||||||
|
|
||||||
|
// **************************************************************************
|
||||||
|
// NpLogGenerator
|
||||||
|
// **************************************************************************
|
||||||
|
|
||||||
|
// ignore: non_constant_identifier_names
|
||||||
|
final _$logListSharingBloc = Logger("bloc.list_sharing.ListSharingBloc");
|
||||||
|
|
||||||
|
extension _$ListSharingBlocNpLog on ListSharingBloc {
|
||||||
|
// ignore: unused_element
|
||||||
|
Logger get _log => _$logListSharingBloc;
|
||||||
|
}
|
||||||
|
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
// ToStringGenerator
|
// ToStringGenerator
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
|
|
|
@ -7,6 +7,7 @@ import 'package:nc_photos/bloc/bloc_util.dart' as bloc_util;
|
||||||
import 'package:nc_photos/di_container.dart';
|
import 'package:nc_photos/di_container.dart';
|
||||||
import 'package:nc_photos/entity/tag.dart';
|
import 'package:nc_photos/entity/tag.dart';
|
||||||
import 'package:nc_photos/use_case/list_tag.dart';
|
import 'package:nc_photos/use_case/list_tag.dart';
|
||||||
|
import 'package:np_codegen/np_codegen.dart';
|
||||||
import 'package:to_string/to_string.dart';
|
import 'package:to_string/to_string.dart';
|
||||||
|
|
||||||
part 'list_tag.g.dart';
|
part 'list_tag.g.dart';
|
||||||
|
@ -62,6 +63,7 @@ class ListTagBlocFailure extends ListTagBlocState {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// List all tags for this account
|
/// List all tags for this account
|
||||||
|
@npLog
|
||||||
class ListTagBloc extends Bloc<ListTagBlocEvent, ListTagBlocState> {
|
class ListTagBloc extends Bloc<ListTagBlocEvent, ListTagBlocState> {
|
||||||
ListTagBloc(this._c)
|
ListTagBloc(this._c)
|
||||||
: assert(require(_c)),
|
: assert(require(_c)),
|
||||||
|
@ -109,5 +111,5 @@ class ListTagBloc extends Bloc<ListTagBlocEvent, ListTagBlocState> {
|
||||||
|
|
||||||
final DiContainer _c;
|
final DiContainer _c;
|
||||||
|
|
||||||
static final _log = Logger("bloc.list_tag.ListTagBloc");
|
static final _log = _$logListTagBloc;
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,6 +2,18 @@
|
||||||
|
|
||||||
part of 'list_tag.dart';
|
part of 'list_tag.dart';
|
||||||
|
|
||||||
|
// **************************************************************************
|
||||||
|
// NpLogGenerator
|
||||||
|
// **************************************************************************
|
||||||
|
|
||||||
|
// ignore: non_constant_identifier_names
|
||||||
|
final _$logListTagBloc = Logger("bloc.list_tag.ListTagBloc");
|
||||||
|
|
||||||
|
extension _$ListTagBlocNpLog on ListTagBloc {
|
||||||
|
// ignore: unused_element
|
||||||
|
Logger get _log => _$logListTagBloc;
|
||||||
|
}
|
||||||
|
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
// ToStringGenerator
|
// ToStringGenerator
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
|
|
|
@ -9,6 +9,7 @@ import 'package:nc_photos/entity/tag.dart';
|
||||||
import 'package:nc_photos/event/event.dart';
|
import 'package:nc_photos/event/event.dart';
|
||||||
import 'package:nc_photos/throttler.dart';
|
import 'package:nc_photos/throttler.dart';
|
||||||
import 'package:nc_photos/use_case/find_file.dart';
|
import 'package:nc_photos/use_case/find_file.dart';
|
||||||
|
import 'package:np_codegen/np_codegen.dart';
|
||||||
import 'package:to_string/to_string.dart';
|
import 'package:to_string/to_string.dart';
|
||||||
|
|
||||||
part 'list_tag_file.g.dart';
|
part 'list_tag_file.g.dart';
|
||||||
|
@ -82,6 +83,7 @@ class ListTagFileBlocInconsistent extends ListTagFileBlocState {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// List all files associated with a specific tag
|
/// List all files associated with a specific tag
|
||||||
|
@npLog
|
||||||
class ListTagFileBloc extends Bloc<ListTagFileBlocEvent, ListTagFileBlocState> {
|
class ListTagFileBloc extends Bloc<ListTagFileBlocEvent, ListTagFileBlocState> {
|
||||||
ListTagFileBloc(this._c)
|
ListTagFileBloc(this._c)
|
||||||
: assert(require(_c)),
|
: assert(require(_c)),
|
||||||
|
@ -221,6 +223,4 @@ class ListTagFileBloc extends Bloc<ListTagFileBlocEvent, ListTagFileBlocState> {
|
||||||
},
|
},
|
||||||
logTag: "ListTagFileBloc.refresh",
|
logTag: "ListTagFileBloc.refresh",
|
||||||
);
|
);
|
||||||
|
|
||||||
static final _log = Logger("bloc.list_tag_file.ListTagFileBloc");
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,6 +2,18 @@
|
||||||
|
|
||||||
part of 'list_tag_file.dart';
|
part of 'list_tag_file.dart';
|
||||||
|
|
||||||
|
// **************************************************************************
|
||||||
|
// NpLogGenerator
|
||||||
|
// **************************************************************************
|
||||||
|
|
||||||
|
// ignore: non_constant_identifier_names
|
||||||
|
final _$logListTagFileBloc = Logger("bloc.list_tag_file.ListTagFileBloc");
|
||||||
|
|
||||||
|
extension _$ListTagFileBlocNpLog on ListTagFileBloc {
|
||||||
|
// ignore: unused_element
|
||||||
|
Logger get _log => _$logListTagFileBloc;
|
||||||
|
}
|
||||||
|
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
// ToStringGenerator
|
// ToStringGenerator
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
|
|
|
@ -7,6 +7,7 @@ import 'package:nc_photos/debug_util.dart';
|
||||||
import 'package:nc_photos/entity/file.dart';
|
import 'package:nc_photos/entity/file.dart';
|
||||||
import 'package:nc_photos/exception.dart';
|
import 'package:nc_photos/exception.dart';
|
||||||
import 'package:nc_photos/use_case/ls.dart';
|
import 'package:nc_photos/use_case/ls.dart';
|
||||||
|
import 'package:np_codegen/np_codegen.dart';
|
||||||
import 'package:to_string/to_string.dart';
|
import 'package:to_string/to_string.dart';
|
||||||
|
|
||||||
part 'ls_dir.g.dart';
|
part 'ls_dir.g.dart';
|
||||||
|
@ -133,6 +134,7 @@ class LsDirBlocFailure extends LsDirBlocState {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// A bloc that return all directories under a dir recursively
|
/// A bloc that return all directories under a dir recursively
|
||||||
|
@npLog
|
||||||
class LsDirBloc extends Bloc<LsDirBlocEvent, LsDirBlocState> {
|
class LsDirBloc extends Bloc<LsDirBlocEvent, LsDirBlocState> {
|
||||||
LsDirBloc(
|
LsDirBloc(
|
||||||
this.fileRepo, {
|
this.fileRepo, {
|
||||||
|
@ -203,6 +205,4 @@ class LsDirBloc extends Bloc<LsDirBlocEvent, LsDirBlocState> {
|
||||||
final bool isListMinimal;
|
final bool isListMinimal;
|
||||||
|
|
||||||
final _cache = <String, List<File>>{};
|
final _cache = <String, List<File>>{};
|
||||||
|
|
||||||
static final _log = Logger("bloc.ls_dir.LsDirBloc");
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,6 +2,18 @@
|
||||||
|
|
||||||
part of 'ls_dir.dart';
|
part of 'ls_dir.dart';
|
||||||
|
|
||||||
|
// **************************************************************************
|
||||||
|
// NpLogGenerator
|
||||||
|
// **************************************************************************
|
||||||
|
|
||||||
|
// ignore: non_constant_identifier_names
|
||||||
|
final _$logLsDirBloc = Logger("bloc.ls_dir.LsDirBloc");
|
||||||
|
|
||||||
|
extension _$LsDirBlocNpLog on LsDirBloc {
|
||||||
|
// ignore: unused_element
|
||||||
|
Logger get _log => _$logLsDirBloc;
|
||||||
|
}
|
||||||
|
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
// ToStringGenerator
|
// ToStringGenerator
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
|
|
|
@ -10,6 +10,7 @@ import 'package:nc_photos/entity/file_util.dart' as file_util;
|
||||||
import 'package:nc_photos/event/event.dart';
|
import 'package:nc_photos/event/event.dart';
|
||||||
import 'package:nc_photos/throttler.dart';
|
import 'package:nc_photos/throttler.dart';
|
||||||
import 'package:nc_photos/use_case/ls_trashbin.dart';
|
import 'package:nc_photos/use_case/ls_trashbin.dart';
|
||||||
|
import 'package:np_codegen/np_codegen.dart';
|
||||||
import 'package:to_string/to_string.dart';
|
import 'package:to_string/to_string.dart';
|
||||||
|
|
||||||
part 'ls_trashbin.g.dart';
|
part 'ls_trashbin.g.dart';
|
||||||
|
@ -81,6 +82,7 @@ class LsTrashbinBlocInconsistent extends LsTrashbinBlocState {
|
||||||
: super(account, items);
|
: super(account, items);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@npLog
|
||||||
class LsTrashbinBloc extends Bloc<LsTrashbinBlocEvent, LsTrashbinBlocState> {
|
class LsTrashbinBloc extends Bloc<LsTrashbinBlocEvent, LsTrashbinBlocState> {
|
||||||
LsTrashbinBloc() : super(LsTrashbinBlocInit()) {
|
LsTrashbinBloc() : super(LsTrashbinBlocInit()) {
|
||||||
_fileRemovedEventListener =
|
_fileRemovedEventListener =
|
||||||
|
@ -178,5 +180,5 @@ class LsTrashbinBloc extends Bloc<LsTrashbinBlocEvent, LsTrashbinBlocState> {
|
||||||
|
|
||||||
late Throttler _refreshThrottler;
|
late Throttler _refreshThrottler;
|
||||||
|
|
||||||
static final _log = Logger("bloc.ls_trashbin.LsTrashbinBloc");
|
static final _log = _$logLsTrashbinBloc;
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,6 +2,18 @@
|
||||||
|
|
||||||
part of 'ls_trashbin.dart';
|
part of 'ls_trashbin.dart';
|
||||||
|
|
||||||
|
// **************************************************************************
|
||||||
|
// NpLogGenerator
|
||||||
|
// **************************************************************************
|
||||||
|
|
||||||
|
// ignore: non_constant_identifier_names
|
||||||
|
final _$logLsTrashbinBloc = Logger("bloc.ls_trashbin.LsTrashbinBloc");
|
||||||
|
|
||||||
|
extension _$LsTrashbinBlocNpLog on LsTrashbinBloc {
|
||||||
|
// ignore: unused_element
|
||||||
|
Logger get _log => _$logLsTrashbinBloc;
|
||||||
|
}
|
||||||
|
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
// ToStringGenerator
|
// ToStringGenerator
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
import 'package:bloc/bloc.dart';
|
import 'package:bloc/bloc.dart';
|
||||||
import 'package:equatable/equatable.dart';
|
import 'package:equatable/equatable.dart';
|
||||||
import 'package:logging/logging.dart';
|
import 'package:logging/logging.dart';
|
||||||
|
import 'package:np_codegen/np_codegen.dart';
|
||||||
import 'package:to_string/to_string.dart';
|
import 'package:to_string/to_string.dart';
|
||||||
|
|
||||||
part 'progress.g.dart';
|
part 'progress.g.dart';
|
||||||
|
@ -35,6 +36,7 @@ class ProgressBlocState with EquatableMixin {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// A generic bloc to bubble progress update for some events
|
/// A generic bloc to bubble progress update for some events
|
||||||
|
@npLog
|
||||||
class ProgressBloc extends Bloc<ProgressBlocEvent, ProgressBlocState> {
|
class ProgressBloc extends Bloc<ProgressBlocEvent, ProgressBlocState> {
|
||||||
ProgressBloc() : super(const ProgressBlocState(0, null)) {
|
ProgressBloc() : super(const ProgressBlocState(0, null)) {
|
||||||
on<ProgressBlocEvent>(_onEvent);
|
on<ProgressBlocEvent>(_onEvent);
|
||||||
|
@ -52,6 +54,4 @@ class ProgressBloc extends Bloc<ProgressBlocEvent, ProgressBlocState> {
|
||||||
ProgressBlocUpdate ev, Emitter<ProgressBlocState> emit) async {
|
ProgressBlocUpdate ev, Emitter<ProgressBlocState> emit) async {
|
||||||
emit(ProgressBlocState(ev.progress, ev.text));
|
emit(ProgressBlocState(ev.progress, ev.text));
|
||||||
}
|
}
|
||||||
|
|
||||||
static final _log = Logger("bloc.progress.ProgressBloc");
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,6 +2,18 @@
|
||||||
|
|
||||||
part of 'progress.dart';
|
part of 'progress.dart';
|
||||||
|
|
||||||
|
// **************************************************************************
|
||||||
|
// NpLogGenerator
|
||||||
|
// **************************************************************************
|
||||||
|
|
||||||
|
// ignore: non_constant_identifier_names
|
||||||
|
final _$logProgressBloc = Logger("bloc.progress.ProgressBloc");
|
||||||
|
|
||||||
|
extension _$ProgressBlocNpLog on ProgressBloc {
|
||||||
|
// ignore: unused_element
|
||||||
|
Logger get _log => _$logProgressBloc;
|
||||||
|
}
|
||||||
|
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
// ToStringGenerator
|
// ToStringGenerator
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
|
|
|
@ -23,6 +23,7 @@ import 'package:nc_photos/use_case/ls.dart';
|
||||||
import 'package:nc_photos/use_case/scan_dir.dart';
|
import 'package:nc_photos/use_case/scan_dir.dart';
|
||||||
import 'package:nc_photos/use_case/scan_dir_offline.dart';
|
import 'package:nc_photos/use_case/scan_dir_offline.dart';
|
||||||
import 'package:nc_photos/use_case/sync_dir.dart';
|
import 'package:nc_photos/use_case/sync_dir.dart';
|
||||||
|
import 'package:np_codegen/np_codegen.dart';
|
||||||
import 'package:to_string/to_string.dart';
|
import 'package:to_string/to_string.dart';
|
||||||
|
|
||||||
part 'scan_account_dir.g.dart';
|
part 'scan_account_dir.g.dart';
|
||||||
|
@ -113,6 +114,7 @@ class ScanAccountDirBlocInconsistent extends ScanAccountDirBlocState {
|
||||||
/// A bloc that return all files under a dir recursively
|
/// A bloc that return all files under a dir recursively
|
||||||
///
|
///
|
||||||
/// See [ScanDir]
|
/// See [ScanDir]
|
||||||
|
@npLog
|
||||||
class ScanAccountDirBloc
|
class ScanAccountDirBloc
|
||||||
extends Bloc<ScanAccountDirBlocEvent, ScanAccountDirBlocState> {
|
extends Bloc<ScanAccountDirBlocEvent, ScanAccountDirBlocState> {
|
||||||
ScanAccountDirBloc._(this.account) : super(const ScanAccountDirBlocInit()) {
|
ScanAccountDirBloc._(this.account) : super(const ScanAccountDirBlocInit()) {
|
||||||
|
@ -534,5 +536,5 @@ class ScanAccountDirBloc
|
||||||
logTag: "ScanAccountDirBloc.refresh",
|
logTag: "ScanAccountDirBloc.refresh",
|
||||||
);
|
);
|
||||||
|
|
||||||
static final _log = Logger("bloc.scan_dir.ScanAccountDirBloc");
|
static final _log = _$logScanAccountDirBloc;
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,6 +2,19 @@
|
||||||
|
|
||||||
part of 'scan_account_dir.dart';
|
part of 'scan_account_dir.dart';
|
||||||
|
|
||||||
|
// **************************************************************************
|
||||||
|
// NpLogGenerator
|
||||||
|
// **************************************************************************
|
||||||
|
|
||||||
|
// ignore: non_constant_identifier_names
|
||||||
|
final _$logScanAccountDirBloc =
|
||||||
|
Logger("bloc.scan_account_dir.ScanAccountDirBloc");
|
||||||
|
|
||||||
|
extension _$ScanAccountDirBlocNpLog on ScanAccountDirBloc {
|
||||||
|
// ignore: unused_element
|
||||||
|
Logger get _log => _$logScanAccountDirBloc;
|
||||||
|
}
|
||||||
|
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
// ToStringGenerator
|
// ToStringGenerator
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
|
|
|
@ -7,6 +7,7 @@ import 'package:nc_photos/entity/local_file.dart';
|
||||||
import 'package:nc_photos/event/event.dart';
|
import 'package:nc_photos/event/event.dart';
|
||||||
import 'package:nc_photos/iterable_extension.dart';
|
import 'package:nc_photos/iterable_extension.dart';
|
||||||
import 'package:nc_photos/use_case/scan_local_dir.dart';
|
import 'package:nc_photos/use_case/scan_local_dir.dart';
|
||||||
|
import 'package:np_codegen/np_codegen.dart';
|
||||||
import 'package:to_string/to_string.dart';
|
import 'package:to_string/to_string.dart';
|
||||||
|
|
||||||
part 'scan_local_dir.g.dart';
|
part 'scan_local_dir.g.dart';
|
||||||
|
@ -70,6 +71,7 @@ class ScanLocalDirBlocFailure extends ScanLocalDirBlocState {
|
||||||
final dynamic exception;
|
final dynamic exception;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@npLog
|
||||||
class ScanLocalDirBloc
|
class ScanLocalDirBloc
|
||||||
extends Bloc<ScanLocalDirBlocEvent, ScanLocalDirBlocState> {
|
extends Bloc<ScanLocalDirBlocEvent, ScanLocalDirBlocState> {
|
||||||
ScanLocalDirBloc() : super(const ScanLocalDirBlocInit()) {
|
ScanLocalDirBloc() : super(const ScanLocalDirBlocInit()) {
|
||||||
|
@ -127,6 +129,4 @@ class ScanLocalDirBloc
|
||||||
|
|
||||||
late final _fileDeletedEventListener =
|
late final _fileDeletedEventListener =
|
||||||
AppEventListener<LocalFileDeletedEvent>(_onFileDeletedEvent);
|
AppEventListener<LocalFileDeletedEvent>(_onFileDeletedEvent);
|
||||||
|
|
||||||
static final _log = Logger("bloc.scan_local_dir.ScanLocalDirBloc");
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,6 +2,18 @@
|
||||||
|
|
||||||
part of 'scan_local_dir.dart';
|
part of 'scan_local_dir.dart';
|
||||||
|
|
||||||
|
// **************************************************************************
|
||||||
|
// NpLogGenerator
|
||||||
|
// **************************************************************************
|
||||||
|
|
||||||
|
// ignore: non_constant_identifier_names
|
||||||
|
final _$logScanLocalDirBloc = Logger("bloc.scan_local_dir.ScanLocalDirBloc");
|
||||||
|
|
||||||
|
extension _$ScanLocalDirBlocNpLog on ScanLocalDirBloc {
|
||||||
|
// ignore: unused_element
|
||||||
|
Logger get _log => _$logScanLocalDirBloc;
|
||||||
|
}
|
||||||
|
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
// ToStringGenerator
|
// ToStringGenerator
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
|
|
|
@ -9,6 +9,7 @@ import 'package:nc_photos/entity/search.dart';
|
||||||
import 'package:nc_photos/event/event.dart';
|
import 'package:nc_photos/event/event.dart';
|
||||||
import 'package:nc_photos/throttler.dart';
|
import 'package:nc_photos/throttler.dart';
|
||||||
import 'package:nc_photos/use_case/search.dart';
|
import 'package:nc_photos/use_case/search.dart';
|
||||||
|
import 'package:np_codegen/np_codegen.dart';
|
||||||
import 'package:to_string/to_string.dart';
|
import 'package:to_string/to_string.dart';
|
||||||
|
|
||||||
part 'search.g.dart';
|
part 'search.g.dart';
|
||||||
|
@ -95,6 +96,7 @@ class SearchBlocInconsistent extends SearchBlocState {
|
||||||
: super(account, criteria, items);
|
: super(account, criteria, items);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@npLog
|
||||||
class SearchBloc extends Bloc<SearchBlocEvent, SearchBlocState> {
|
class SearchBloc extends Bloc<SearchBlocEvent, SearchBlocState> {
|
||||||
SearchBloc(this._c)
|
SearchBloc(this._c)
|
||||||
: assert(require(_c)),
|
: assert(require(_c)),
|
||||||
|
@ -223,6 +225,4 @@ class SearchBloc extends Bloc<SearchBlocEvent, SearchBlocState> {
|
||||||
},
|
},
|
||||||
logTag: "SearchBloc.refresh",
|
logTag: "SearchBloc.refresh",
|
||||||
);
|
);
|
||||||
|
|
||||||
static final _log = Logger("bloc.search.SearchBloc");
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,6 +2,18 @@
|
||||||
|
|
||||||
part of 'search.dart';
|
part of 'search.dart';
|
||||||
|
|
||||||
|
// **************************************************************************
|
||||||
|
// NpLogGenerator
|
||||||
|
// **************************************************************************
|
||||||
|
|
||||||
|
// ignore: non_constant_identifier_names
|
||||||
|
final _$logSearchBloc = Logger("bloc.search.SearchBloc");
|
||||||
|
|
||||||
|
extension _$SearchBlocNpLog on SearchBloc {
|
||||||
|
// ignore: unused_element
|
||||||
|
Logger get _log => _$logSearchBloc;
|
||||||
|
}
|
||||||
|
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
// ToStringGenerator
|
// ToStringGenerator
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
|
|
|
@ -6,6 +6,7 @@ import 'package:nc_photos/di_container.dart';
|
||||||
import 'package:nc_photos/entity/person.dart';
|
import 'package:nc_photos/entity/person.dart';
|
||||||
import 'package:nc_photos/use_case/list_location_group.dart';
|
import 'package:nc_photos/use_case/list_location_group.dart';
|
||||||
import 'package:nc_photos/use_case/list_person.dart';
|
import 'package:nc_photos/use_case/list_person.dart';
|
||||||
|
import 'package:np_codegen/np_codegen.dart';
|
||||||
import 'package:to_string/to_string.dart';
|
import 'package:to_string/to_string.dart';
|
||||||
|
|
||||||
part 'search_landing.g.dart';
|
part 'search_landing.g.dart';
|
||||||
|
@ -65,6 +66,7 @@ class SearchLandingBlocFailure extends SearchLandingBlocState {
|
||||||
final Object exception;
|
final Object exception;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@npLog
|
||||||
class SearchLandingBloc
|
class SearchLandingBloc
|
||||||
extends Bloc<SearchLandingBlocEvent, SearchLandingBlocState> {
|
extends Bloc<SearchLandingBlocEvent, SearchLandingBlocState> {
|
||||||
SearchLandingBloc(this._c)
|
SearchLandingBloc(this._c)
|
||||||
|
@ -121,6 +123,4 @@ class SearchLandingBloc
|
||||||
ListLocationGroup(_c.withLocalRepo())(ev.account);
|
ListLocationGroup(_c.withLocalRepo())(ev.account);
|
||||||
|
|
||||||
final DiContainer _c;
|
final DiContainer _c;
|
||||||
|
|
||||||
static final _log = Logger("bloc.search_landing.SearchLandingBloc");
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,6 +2,18 @@
|
||||||
|
|
||||||
part of 'search_landing.dart';
|
part of 'search_landing.dart';
|
||||||
|
|
||||||
|
// **************************************************************************
|
||||||
|
// NpLogGenerator
|
||||||
|
// **************************************************************************
|
||||||
|
|
||||||
|
// ignore: non_constant_identifier_names
|
||||||
|
final _$logSearchLandingBloc = Logger("bloc.search_landing.SearchLandingBloc");
|
||||||
|
|
||||||
|
extension _$SearchLandingBlocNpLog on SearchLandingBloc {
|
||||||
|
// ignore: unused_element
|
||||||
|
Logger get _log => _$logSearchLandingBloc;
|
||||||
|
}
|
||||||
|
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
// ToStringGenerator
|
// ToStringGenerator
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
|
|
|
@ -4,6 +4,7 @@ import 'package:flutter/foundation.dart';
|
||||||
import 'package:logging/logging.dart';
|
import 'package:logging/logging.dart';
|
||||||
import 'package:nc_photos/ci_string.dart';
|
import 'package:nc_photos/ci_string.dart';
|
||||||
import 'package:nc_photos/iterable_extension.dart';
|
import 'package:nc_photos/iterable_extension.dart';
|
||||||
|
import 'package:np_codegen/np_codegen.dart';
|
||||||
import 'package:to_string/to_string.dart';
|
import 'package:to_string/to_string.dart';
|
||||||
import 'package:tuple/tuple.dart';
|
import 'package:tuple/tuple.dart';
|
||||||
import 'package:woozy_search/woozy_search.dart';
|
import 'package:woozy_search/woozy_search.dart';
|
||||||
|
@ -57,6 +58,7 @@ class SearchSuggestionBlocSuccess<T> extends SearchSuggestionBlocState<T> {
|
||||||
const SearchSuggestionBlocSuccess(List<T> results) : super(results);
|
const SearchSuggestionBlocSuccess(List<T> results) : super(results);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@npLog
|
||||||
class SearchSuggestionBloc<T>
|
class SearchSuggestionBloc<T>
|
||||||
extends Bloc<SearchSuggestionBlocEvent, SearchSuggestionBlocState<T>> {
|
extends Bloc<SearchSuggestionBlocEvent, SearchSuggestionBlocState<T>> {
|
||||||
SearchSuggestionBloc({
|
SearchSuggestionBloc({
|
||||||
|
@ -125,7 +127,4 @@ class SearchSuggestionBloc<T>
|
||||||
|
|
||||||
final _search = Woozy(limit: 5);
|
final _search = Woozy(limit: 5);
|
||||||
SearchSuggestionBlocSearchEvent? _lastSearch;
|
SearchSuggestionBlocSearchEvent? _lastSearch;
|
||||||
|
|
||||||
static final _log =
|
|
||||||
Logger("bloc.album_search_suggestion.SearchSuggestionBloc");
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,6 +2,19 @@
|
||||||
|
|
||||||
part of 'search_suggestion.dart';
|
part of 'search_suggestion.dart';
|
||||||
|
|
||||||
|
// **************************************************************************
|
||||||
|
// NpLogGenerator
|
||||||
|
// **************************************************************************
|
||||||
|
|
||||||
|
// ignore: non_constant_identifier_names
|
||||||
|
final _$logSearchSuggestionBloc =
|
||||||
|
Logger("bloc.search_suggestion.SearchSuggestionBloc");
|
||||||
|
|
||||||
|
extension _$SearchSuggestionBlocNpLog on SearchSuggestionBloc {
|
||||||
|
// ignore: unused_element
|
||||||
|
Logger get _log => _$logSearchSuggestionBloc;
|
||||||
|
}
|
||||||
|
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
// ToStringGenerator
|
// ToStringGenerator
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
|
|
|
@ -20,8 +20,11 @@ import 'package:nc_photos/snack_bar_manager.dart';
|
||||||
import 'package:nc_photos/use_case/download_file.dart';
|
import 'package:nc_photos/use_case/download_file.dart';
|
||||||
import 'package:nc_photos/use_case/inflate_file_descriptor.dart';
|
import 'package:nc_photos/use_case/inflate_file_descriptor.dart';
|
||||||
import 'package:nc_photos_plugin/nc_photos_plugin.dart';
|
import 'package:nc_photos_plugin/nc_photos_plugin.dart';
|
||||||
|
import 'package:np_codegen/np_codegen.dart';
|
||||||
import 'package:tuple/tuple.dart';
|
import 'package:tuple/tuple.dart';
|
||||||
|
|
||||||
|
part 'download_handler.g.dart';
|
||||||
|
|
||||||
class DownloadHandler {
|
class DownloadHandler {
|
||||||
DownloadHandler(this._c)
|
DownloadHandler(this._c)
|
||||||
: assert(require(_c)),
|
: assert(require(_c)),
|
||||||
|
@ -59,6 +62,7 @@ abstract class _DownloadHandlerBase {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@npLog
|
||||||
class _DownlaodHandlerAndroid extends _DownloadHandlerBase {
|
class _DownlaodHandlerAndroid extends _DownloadHandlerBase {
|
||||||
@override
|
@override
|
||||||
downloadFiles(
|
downloadFiles(
|
||||||
|
@ -157,10 +161,9 @@ class _DownlaodHandlerAndroid extends _DownloadHandlerBase {
|
||||||
notificationId: notificationId,
|
notificationId: notificationId,
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
static final _log = Logger("download_handler._DownloadHandlerAndroid");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@npLog
|
||||||
class _DownloadHandlerWeb extends _DownloadHandlerBase {
|
class _DownloadHandlerWeb extends _DownloadHandlerBase {
|
||||||
@override
|
@override
|
||||||
downloadFiles(
|
downloadFiles(
|
||||||
|
@ -211,6 +214,4 @@ class _DownloadHandlerWeb extends _DownloadHandlerBase {
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static final _log = Logger("download_handler._DownloadHandlerWeb");
|
|
||||||
}
|
}
|
||||||
|
|
24
app/lib/download_handler.g.dart
Normal file
24
app/lib/download_handler.g.dart
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
|
||||||
|
part of 'download_handler.dart';
|
||||||
|
|
||||||
|
// **************************************************************************
|
||||||
|
// NpLogGenerator
|
||||||
|
// **************************************************************************
|
||||||
|
|
||||||
|
// ignore: non_constant_identifier_names
|
||||||
|
final _$log_DownlaodHandlerAndroid =
|
||||||
|
Logger("download_handler._DownlaodHandlerAndroid");
|
||||||
|
|
||||||
|
extension _$_DownlaodHandlerAndroidNpLog on _DownlaodHandlerAndroid {
|
||||||
|
// ignore: unused_element
|
||||||
|
Logger get _log => _$log_DownlaodHandlerAndroid;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ignore: non_constant_identifier_names
|
||||||
|
final _$log_DownloadHandlerWeb = Logger("download_handler._DownloadHandlerWeb");
|
||||||
|
|
||||||
|
extension _$_DownloadHandlerWebNpLog on _DownloadHandlerWeb {
|
||||||
|
// ignore: unused_element
|
||||||
|
Logger get _log => _$log_DownloadHandlerWeb;
|
||||||
|
}
|
|
@ -11,11 +11,13 @@ import 'package:nc_photos/iterable_extension.dart';
|
||||||
import 'package:nc_photos/object_extension.dart';
|
import 'package:nc_photos/object_extension.dart';
|
||||||
import 'package:nc_photos/or_null.dart';
|
import 'package:nc_photos/or_null.dart';
|
||||||
import 'package:nc_photos/type.dart';
|
import 'package:nc_photos/type.dart';
|
||||||
|
import 'package:np_codegen/np_codegen.dart';
|
||||||
import 'package:to_string/to_string.dart';
|
import 'package:to_string/to_string.dart';
|
||||||
|
|
||||||
part 'album.g.dart';
|
part 'album.g.dart';
|
||||||
|
|
||||||
/// Immutable object that represents an album
|
/// Immutable object that represents an album
|
||||||
|
@npLog
|
||||||
class Album with EquatableMixin {
|
class Album with EquatableMixin {
|
||||||
/// Create a new album
|
/// Create a new album
|
||||||
///
|
///
|
||||||
|
@ -216,7 +218,7 @@ class Album with EquatableMixin {
|
||||||
/// versioning of this class, use to upgrade old persisted album
|
/// versioning of this class, use to upgrade old persisted album
|
||||||
static const version = 8;
|
static const version = 8;
|
||||||
|
|
||||||
static final _log = Logger("entity.album.Album");
|
static final _log = _$logAlbum;
|
||||||
}
|
}
|
||||||
|
|
||||||
@toString
|
@toString
|
||||||
|
|
|
@ -2,6 +2,18 @@
|
||||||
|
|
||||||
part of 'album.dart';
|
part of 'album.dart';
|
||||||
|
|
||||||
|
// **************************************************************************
|
||||||
|
// NpLogGenerator
|
||||||
|
// **************************************************************************
|
||||||
|
|
||||||
|
// ignore: non_constant_identifier_names
|
||||||
|
final _$logAlbum = Logger("entity.album.Album");
|
||||||
|
|
||||||
|
extension _$AlbumNpLog on Album {
|
||||||
|
// ignore: unused_element
|
||||||
|
Logger get _log => _$logAlbum;
|
||||||
|
}
|
||||||
|
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
// ToStringGenerator
|
// ToStringGenerator
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
|
|
|
@ -8,10 +8,12 @@ import 'package:nc_photos/entity/file.dart';
|
||||||
import 'package:nc_photos/entity/file_descriptor.dart';
|
import 'package:nc_photos/entity/file_descriptor.dart';
|
||||||
import 'package:nc_photos/entity/file_util.dart' as file_util;
|
import 'package:nc_photos/entity/file_util.dart' as file_util;
|
||||||
import 'package:nc_photos/type.dart';
|
import 'package:nc_photos/type.dart';
|
||||||
|
import 'package:np_codegen/np_codegen.dart';
|
||||||
import 'package:to_string/to_string.dart';
|
import 'package:to_string/to_string.dart';
|
||||||
|
|
||||||
part 'cover_provider.g.dart';
|
part 'cover_provider.g.dart';
|
||||||
|
|
||||||
|
@npLog
|
||||||
abstract class AlbumCoverProvider with EquatableMixin {
|
abstract class AlbumCoverProvider with EquatableMixin {
|
||||||
const AlbumCoverProvider();
|
const AlbumCoverProvider();
|
||||||
|
|
||||||
|
@ -57,7 +59,7 @@ abstract class AlbumCoverProvider with EquatableMixin {
|
||||||
|
|
||||||
JsonObj _toContentJson();
|
JsonObj _toContentJson();
|
||||||
|
|
||||||
static final _log = Logger("entity.album.cover_provider.AlbumCoverProvider");
|
static final _log = _$logAlbumCoverProvider;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Cover selected automatically by us
|
/// Cover selected automatically by us
|
||||||
|
|
|
@ -2,6 +2,19 @@
|
||||||
|
|
||||||
part of 'cover_provider.dart';
|
part of 'cover_provider.dart';
|
||||||
|
|
||||||
|
// **************************************************************************
|
||||||
|
// NpLogGenerator
|
||||||
|
// **************************************************************************
|
||||||
|
|
||||||
|
// ignore: non_constant_identifier_names
|
||||||
|
final _$logAlbumCoverProvider =
|
||||||
|
Logger("entity.album.cover_provider.AlbumCoverProvider");
|
||||||
|
|
||||||
|
extension _$AlbumCoverProviderNpLog on AlbumCoverProvider {
|
||||||
|
// ignore: unused_element
|
||||||
|
Logger get _log => _$logAlbumCoverProvider;
|
||||||
|
}
|
||||||
|
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
// ToStringGenerator
|
// ToStringGenerator
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
|
|
|
@ -23,7 +23,11 @@ import 'package:nc_photos/remote_storage_util.dart' as remote_storage_util;
|
||||||
import 'package:nc_photos/use_case/get_file_binary.dart';
|
import 'package:nc_photos/use_case/get_file_binary.dart';
|
||||||
import 'package:nc_photos/use_case/ls_single_file.dart';
|
import 'package:nc_photos/use_case/ls_single_file.dart';
|
||||||
import 'package:nc_photos/use_case/put_file_binary.dart';
|
import 'package:nc_photos/use_case/put_file_binary.dart';
|
||||||
|
import 'package:np_codegen/np_codegen.dart';
|
||||||
|
|
||||||
|
part 'data_source.g.dart';
|
||||||
|
|
||||||
|
@npLog
|
||||||
class AlbumRemoteDataSource implements AlbumDataSource {
|
class AlbumRemoteDataSource implements AlbumDataSource {
|
||||||
@override
|
@override
|
||||||
get(Account account, File albumFile) async {
|
get(Account account, File albumFile) async {
|
||||||
|
@ -95,10 +99,9 @@ class AlbumRemoteDataSource implements AlbumDataSource {
|
||||||
final random = Random().nextInt(0xFFFFFF);
|
final random = Random().nextInt(0xFFFFFF);
|
||||||
return "${timestamp.toRadixString(16)}-${random.toRadixString(16).padLeft(6, '0')}.nc_album.json";
|
return "${timestamp.toRadixString(16)}-${random.toRadixString(16).padLeft(6, '0')}.nc_album.json";
|
||||||
}
|
}
|
||||||
|
|
||||||
static final _log = Logger("entity.album.AlbumRemoteDataSource");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@npLog
|
||||||
class AlbumSqliteDbDataSource implements AlbumDataSource {
|
class AlbumSqliteDbDataSource implements AlbumDataSource {
|
||||||
AlbumSqliteDbDataSource(this._c);
|
AlbumSqliteDbDataSource(this._c);
|
||||||
|
|
||||||
|
@ -233,10 +236,9 @@ class AlbumSqliteDbDataSource implements AlbumDataSource {
|
||||||
}
|
}
|
||||||
|
|
||||||
final DiContainer _c;
|
final DiContainer _c;
|
||||||
|
|
||||||
static final _log = Logger("entity.album.AlbumSqliteDbDataSource");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@npLog
|
||||||
class AlbumCachedDataSource implements AlbumDataSource {
|
class AlbumCachedDataSource implements AlbumDataSource {
|
||||||
AlbumCachedDataSource(DiContainer c)
|
AlbumCachedDataSource(DiContainer c)
|
||||||
: _sqliteDbSrc = AlbumSqliteDbDataSource(c);
|
: _sqliteDbSrc = AlbumSqliteDbDataSource(c);
|
||||||
|
@ -303,6 +305,4 @@ class AlbumCachedDataSource implements AlbumDataSource {
|
||||||
|
|
||||||
final _remoteSrc = AlbumRemoteDataSource();
|
final _remoteSrc = AlbumRemoteDataSource();
|
||||||
final AlbumSqliteDbDataSource _sqliteDbSrc;
|
final AlbumSqliteDbDataSource _sqliteDbSrc;
|
||||||
|
|
||||||
static final _log = Logger("entity.album.AlbumCachedDataSource");
|
|
||||||
}
|
}
|
||||||
|
|
34
app/lib/entity/album/data_source.g.dart
Normal file
34
app/lib/entity/album/data_source.g.dart
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
|
||||||
|
part of 'data_source.dart';
|
||||||
|
|
||||||
|
// **************************************************************************
|
||||||
|
// NpLogGenerator
|
||||||
|
// **************************************************************************
|
||||||
|
|
||||||
|
// ignore: non_constant_identifier_names
|
||||||
|
final _$logAlbumRemoteDataSource =
|
||||||
|
Logger("entity.album.data_source.AlbumRemoteDataSource");
|
||||||
|
|
||||||
|
extension _$AlbumRemoteDataSourceNpLog on AlbumRemoteDataSource {
|
||||||
|
// ignore: unused_element
|
||||||
|
Logger get _log => _$logAlbumRemoteDataSource;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ignore: non_constant_identifier_names
|
||||||
|
final _$logAlbumSqliteDbDataSource =
|
||||||
|
Logger("entity.album.data_source.AlbumSqliteDbDataSource");
|
||||||
|
|
||||||
|
extension _$AlbumSqliteDbDataSourceNpLog on AlbumSqliteDbDataSource {
|
||||||
|
// ignore: unused_element
|
||||||
|
Logger get _log => _$logAlbumSqliteDbDataSource;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ignore: non_constant_identifier_names
|
||||||
|
final _$logAlbumCachedDataSource =
|
||||||
|
Logger("entity.album.data_source.AlbumCachedDataSource");
|
||||||
|
|
||||||
|
extension _$AlbumCachedDataSourceNpLog on AlbumCachedDataSource {
|
||||||
|
// ignore: unused_element
|
||||||
|
Logger get _log => _$logAlbumCachedDataSource;
|
||||||
|
}
|
|
@ -5,10 +5,12 @@ import 'package:nc_photos/ci_string.dart';
|
||||||
import 'package:nc_photos/entity/file.dart';
|
import 'package:nc_photos/entity/file.dart';
|
||||||
import 'package:nc_photos/or_null.dart';
|
import 'package:nc_photos/or_null.dart';
|
||||||
import 'package:nc_photos/type.dart';
|
import 'package:nc_photos/type.dart';
|
||||||
|
import 'package:np_codegen/np_codegen.dart';
|
||||||
import 'package:to_string/to_string.dart';
|
import 'package:to_string/to_string.dart';
|
||||||
|
|
||||||
part 'item.g.dart';
|
part 'item.g.dart';
|
||||||
|
|
||||||
|
@npLog
|
||||||
@toString
|
@toString
|
||||||
abstract class AlbumItem with EquatableMixin {
|
abstract class AlbumItem with EquatableMixin {
|
||||||
AlbumItem({
|
AlbumItem({
|
||||||
|
@ -67,7 +69,7 @@ abstract class AlbumItem with EquatableMixin {
|
||||||
final CiString addedBy;
|
final CiString addedBy;
|
||||||
final DateTime addedAt;
|
final DateTime addedAt;
|
||||||
|
|
||||||
static final _log = Logger("entity.album.AlbumItem");
|
static final _log = _$logAlbumItem;
|
||||||
}
|
}
|
||||||
|
|
||||||
@toString
|
@toString
|
||||||
|
|
|
@ -2,6 +2,18 @@
|
||||||
|
|
||||||
part of 'item.dart';
|
part of 'item.dart';
|
||||||
|
|
||||||
|
// **************************************************************************
|
||||||
|
// NpLogGenerator
|
||||||
|
// **************************************************************************
|
||||||
|
|
||||||
|
// ignore: non_constant_identifier_names
|
||||||
|
final _$logAlbumItem = Logger("entity.album.item.AlbumItem");
|
||||||
|
|
||||||
|
extension _$AlbumItemNpLog on AlbumItem {
|
||||||
|
// ignore: unused_element
|
||||||
|
Logger get _log => _$logAlbumItem;
|
||||||
|
}
|
||||||
|
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
// ToStringGenerator
|
// ToStringGenerator
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
|
|
|
@ -10,10 +10,12 @@ import 'package:nc_photos/entity/tag.dart';
|
||||||
import 'package:nc_photos/iterable_extension.dart';
|
import 'package:nc_photos/iterable_extension.dart';
|
||||||
import 'package:nc_photos/or_null.dart';
|
import 'package:nc_photos/or_null.dart';
|
||||||
import 'package:nc_photos/type.dart';
|
import 'package:nc_photos/type.dart';
|
||||||
|
import 'package:np_codegen/np_codegen.dart';
|
||||||
import 'package:to_string/to_string.dart';
|
import 'package:to_string/to_string.dart';
|
||||||
|
|
||||||
part 'provider.g.dart';
|
part 'provider.g.dart';
|
||||||
|
|
||||||
|
@npLog
|
||||||
abstract class AlbumProvider with EquatableMixin {
|
abstract class AlbumProvider with EquatableMixin {
|
||||||
const AlbumProvider();
|
const AlbumProvider();
|
||||||
|
|
||||||
|
@ -63,7 +65,7 @@ abstract class AlbumProvider with EquatableMixin {
|
||||||
|
|
||||||
AlbumProvider copyWith();
|
AlbumProvider copyWith();
|
||||||
|
|
||||||
static final _log = Logger("entity.album.provider.AlbumProvider");
|
static final _log = _$logAlbumProvider;
|
||||||
}
|
}
|
||||||
|
|
||||||
abstract class AlbumProviderBase extends AlbumProvider {
|
abstract class AlbumProviderBase extends AlbumProvider {
|
||||||
|
|
|
@ -2,6 +2,18 @@
|
||||||
|
|
||||||
part of 'provider.dart';
|
part of 'provider.dart';
|
||||||
|
|
||||||
|
// **************************************************************************
|
||||||
|
// NpLogGenerator
|
||||||
|
// **************************************************************************
|
||||||
|
|
||||||
|
// ignore: non_constant_identifier_names
|
||||||
|
final _$logAlbumProvider = Logger("entity.album.provider.AlbumProvider");
|
||||||
|
|
||||||
|
extension _$AlbumProviderNpLog on AlbumProvider {
|
||||||
|
// ignore: unused_element
|
||||||
|
Logger get _log => _$logAlbumProvider;
|
||||||
|
}
|
||||||
|
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
// ToStringGenerator
|
// ToStringGenerator
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
|
|
|
@ -6,11 +6,13 @@ import 'package:nc_photos/entity/file.dart';
|
||||||
import 'package:nc_photos/entity/file_descriptor.dart';
|
import 'package:nc_photos/entity/file_descriptor.dart';
|
||||||
import 'package:nc_photos/iterable_extension.dart';
|
import 'package:nc_photos/iterable_extension.dart';
|
||||||
import 'package:nc_photos/type.dart';
|
import 'package:nc_photos/type.dart';
|
||||||
|
import 'package:np_codegen/np_codegen.dart';
|
||||||
import 'package:to_string/to_string.dart';
|
import 'package:to_string/to_string.dart';
|
||||||
import 'package:tuple/tuple.dart';
|
import 'package:tuple/tuple.dart';
|
||||||
|
|
||||||
part 'sort_provider.g.dart';
|
part 'sort_provider.g.dart';
|
||||||
|
|
||||||
|
@npLog
|
||||||
abstract class AlbumSortProvider with EquatableMixin {
|
abstract class AlbumSortProvider with EquatableMixin {
|
||||||
const AlbumSortProvider();
|
const AlbumSortProvider();
|
||||||
|
|
||||||
|
@ -55,7 +57,7 @@ abstract class AlbumSortProvider with EquatableMixin {
|
||||||
|
|
||||||
JsonObj _toContentJson();
|
JsonObj _toContentJson();
|
||||||
|
|
||||||
static final _log = Logger("entity.album.sort_provider.AlbumSortProvider");
|
static final _log = _$logAlbumSortProvider;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Sort provider that does nothing
|
/// Sort provider that does nothing
|
||||||
|
|
|
@ -2,6 +2,19 @@
|
||||||
|
|
||||||
part of 'sort_provider.dart';
|
part of 'sort_provider.dart';
|
||||||
|
|
||||||
|
// **************************************************************************
|
||||||
|
// NpLogGenerator
|
||||||
|
// **************************************************************************
|
||||||
|
|
||||||
|
// ignore: non_constant_identifier_names
|
||||||
|
final _$logAlbumSortProvider =
|
||||||
|
Logger("entity.album.sort_provider.AlbumSortProvider");
|
||||||
|
|
||||||
|
extension _$AlbumSortProviderNpLog on AlbumSortProvider {
|
||||||
|
// ignore: unused_element
|
||||||
|
Logger get _log => _$logAlbumSortProvider;
|
||||||
|
}
|
||||||
|
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
// ToStringGenerator
|
// ToStringGenerator
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
|
|
|
@ -5,13 +5,17 @@ import 'package:nc_photos/ci_string.dart';
|
||||||
import 'package:nc_photos/entity/exif.dart';
|
import 'package:nc_photos/entity/exif.dart';
|
||||||
import 'package:nc_photos/entity/file.dart';
|
import 'package:nc_photos/entity/file.dart';
|
||||||
import 'package:nc_photos/type.dart';
|
import 'package:nc_photos/type.dart';
|
||||||
|
import 'package:np_codegen/np_codegen.dart';
|
||||||
import 'package:tuple/tuple.dart';
|
import 'package:tuple/tuple.dart';
|
||||||
|
|
||||||
|
part 'upgrader.g.dart';
|
||||||
|
|
||||||
abstract class AlbumUpgrader {
|
abstract class AlbumUpgrader {
|
||||||
JsonObj? call(JsonObj json);
|
JsonObj? call(JsonObj json);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Upgrade v1 Album to v2
|
/// Upgrade v1 Album to v2
|
||||||
|
@npLog
|
||||||
class AlbumUpgraderV1 implements AlbumUpgrader {
|
class AlbumUpgraderV1 implements AlbumUpgrader {
|
||||||
AlbumUpgraderV1({
|
AlbumUpgraderV1({
|
||||||
this.logFilePath,
|
this.logFilePath,
|
||||||
|
@ -28,11 +32,10 @@ class AlbumUpgraderV1 implements AlbumUpgrader {
|
||||||
|
|
||||||
/// File path for logging only
|
/// File path for logging only
|
||||||
final String? logFilePath;
|
final String? logFilePath;
|
||||||
|
|
||||||
static final _log = Logger("entity.album.upgrader.AlbumUpgraderV1");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Upgrade v2 Album to v3
|
/// Upgrade v2 Album to v3
|
||||||
|
@npLog
|
||||||
class AlbumUpgraderV2 implements AlbumUpgrader {
|
class AlbumUpgraderV2 implements AlbumUpgrader {
|
||||||
AlbumUpgraderV2({
|
AlbumUpgraderV2({
|
||||||
this.logFilePath,
|
this.logFilePath,
|
||||||
|
@ -61,11 +64,10 @@ class AlbumUpgraderV2 implements AlbumUpgrader {
|
||||||
|
|
||||||
/// File path for logging only
|
/// File path for logging only
|
||||||
final String? logFilePath;
|
final String? logFilePath;
|
||||||
|
|
||||||
static final _log = Logger("entity.album.upgrader.AlbumUpgraderV2");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Upgrade v3 Album to v4
|
/// Upgrade v3 Album to v4
|
||||||
|
@npLog
|
||||||
class AlbumUpgraderV3 implements AlbumUpgrader {
|
class AlbumUpgraderV3 implements AlbumUpgrader {
|
||||||
AlbumUpgraderV3({
|
AlbumUpgraderV3({
|
||||||
this.logFilePath,
|
this.logFilePath,
|
||||||
|
@ -88,11 +90,10 @@ class AlbumUpgraderV3 implements AlbumUpgrader {
|
||||||
|
|
||||||
/// File path for logging only
|
/// File path for logging only
|
||||||
final String? logFilePath;
|
final String? logFilePath;
|
||||||
|
|
||||||
static final _log = Logger("entity.album.upgrader.AlbumUpgraderV3");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Upgrade v4 Album to v5
|
/// Upgrade v4 Album to v5
|
||||||
|
@npLog
|
||||||
class AlbumUpgraderV4 implements AlbumUpgrader {
|
class AlbumUpgraderV4 implements AlbumUpgrader {
|
||||||
AlbumUpgraderV4({
|
AlbumUpgraderV4({
|
||||||
this.logFilePath,
|
this.logFilePath,
|
||||||
|
@ -157,11 +158,10 @@ class AlbumUpgraderV4 implements AlbumUpgrader {
|
||||||
|
|
||||||
/// File path for logging only
|
/// File path for logging only
|
||||||
final String? logFilePath;
|
final String? logFilePath;
|
||||||
|
|
||||||
static final _log = Logger("entity.album.upgrader.AlbumUpgraderV4");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Upgrade v5 Album to v6
|
/// Upgrade v5 Album to v6
|
||||||
|
@npLog
|
||||||
class AlbumUpgraderV5 implements AlbumUpgrader {
|
class AlbumUpgraderV5 implements AlbumUpgrader {
|
||||||
const AlbumUpgraderV5(
|
const AlbumUpgraderV5(
|
||||||
this.account, {
|
this.account, {
|
||||||
|
@ -202,11 +202,10 @@ class AlbumUpgraderV5 implements AlbumUpgrader {
|
||||||
|
|
||||||
/// File path for logging only
|
/// File path for logging only
|
||||||
final String? logFilePath;
|
final String? logFilePath;
|
||||||
|
|
||||||
static final _log = Logger("entity.album.upgrader.AlbumUpgraderV5");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Upgrade v6 Album to v7
|
/// Upgrade v6 Album to v7
|
||||||
|
@npLog
|
||||||
class AlbumUpgraderV6 implements AlbumUpgrader {
|
class AlbumUpgraderV6 implements AlbumUpgrader {
|
||||||
const AlbumUpgraderV6({
|
const AlbumUpgraderV6({
|
||||||
this.logFilePath,
|
this.logFilePath,
|
||||||
|
@ -218,13 +217,12 @@ class AlbumUpgraderV6 implements AlbumUpgrader {
|
||||||
return json;
|
return json;
|
||||||
}
|
}
|
||||||
|
|
||||||
static final _log = Logger("entity.album.upgrader.AlbumUpgraderV6");
|
|
||||||
|
|
||||||
/// File path for logging only
|
/// File path for logging only
|
||||||
final String? logFilePath;
|
final String? logFilePath;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Upgrade v7 Album to v8
|
/// Upgrade v7 Album to v8
|
||||||
|
@npLog
|
||||||
class AlbumUpgraderV7 implements AlbumUpgrader {
|
class AlbumUpgraderV7 implements AlbumUpgrader {
|
||||||
const AlbumUpgraderV7({
|
const AlbumUpgraderV7({
|
||||||
this.logFilePath,
|
this.logFilePath,
|
||||||
|
@ -236,8 +234,6 @@ class AlbumUpgraderV7 implements AlbumUpgrader {
|
||||||
return json;
|
return json;
|
||||||
}
|
}
|
||||||
|
|
||||||
static final _log = Logger("entity.album.upgrader.AlbumUpgraderV7");
|
|
||||||
|
|
||||||
/// File path for logging only
|
/// File path for logging only
|
||||||
final String? logFilePath;
|
final String? logFilePath;
|
||||||
}
|
}
|
||||||
|
|
63
app/lib/entity/album/upgrader.g.dart
Normal file
63
app/lib/entity/album/upgrader.g.dart
Normal file
|
@ -0,0 +1,63 @@
|
||||||
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
|
||||||
|
part of 'upgrader.dart';
|
||||||
|
|
||||||
|
// **************************************************************************
|
||||||
|
// NpLogGenerator
|
||||||
|
// **************************************************************************
|
||||||
|
|
||||||
|
// ignore: non_constant_identifier_names
|
||||||
|
final _$logAlbumUpgraderV1 = Logger("entity.album.upgrader.AlbumUpgraderV1");
|
||||||
|
|
||||||
|
extension _$AlbumUpgraderV1NpLog on AlbumUpgraderV1 {
|
||||||
|
// ignore: unused_element
|
||||||
|
Logger get _log => _$logAlbumUpgraderV1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ignore: non_constant_identifier_names
|
||||||
|
final _$logAlbumUpgraderV2 = Logger("entity.album.upgrader.AlbumUpgraderV2");
|
||||||
|
|
||||||
|
extension _$AlbumUpgraderV2NpLog on AlbumUpgraderV2 {
|
||||||
|
// ignore: unused_element
|
||||||
|
Logger get _log => _$logAlbumUpgraderV2;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ignore: non_constant_identifier_names
|
||||||
|
final _$logAlbumUpgraderV3 = Logger("entity.album.upgrader.AlbumUpgraderV3");
|
||||||
|
|
||||||
|
extension _$AlbumUpgraderV3NpLog on AlbumUpgraderV3 {
|
||||||
|
// ignore: unused_element
|
||||||
|
Logger get _log => _$logAlbumUpgraderV3;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ignore: non_constant_identifier_names
|
||||||
|
final _$logAlbumUpgraderV4 = Logger("entity.album.upgrader.AlbumUpgraderV4");
|
||||||
|
|
||||||
|
extension _$AlbumUpgraderV4NpLog on AlbumUpgraderV4 {
|
||||||
|
// ignore: unused_element
|
||||||
|
Logger get _log => _$logAlbumUpgraderV4;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ignore: non_constant_identifier_names
|
||||||
|
final _$logAlbumUpgraderV5 = Logger("entity.album.upgrader.AlbumUpgraderV5");
|
||||||
|
|
||||||
|
extension _$AlbumUpgraderV5NpLog on AlbumUpgraderV5 {
|
||||||
|
// ignore: unused_element
|
||||||
|
Logger get _log => _$logAlbumUpgraderV5;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ignore: non_constant_identifier_names
|
||||||
|
final _$logAlbumUpgraderV6 = Logger("entity.album.upgrader.AlbumUpgraderV6");
|
||||||
|
|
||||||
|
extension _$AlbumUpgraderV6NpLog on AlbumUpgraderV6 {
|
||||||
|
// ignore: unused_element
|
||||||
|
Logger get _log => _$logAlbumUpgraderV6;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ignore: non_constant_identifier_names
|
||||||
|
final _$logAlbumUpgraderV7 = Logger("entity.album.upgrader.AlbumUpgraderV7");
|
||||||
|
|
||||||
|
extension _$AlbumUpgraderV7NpLog on AlbumUpgraderV7 {
|
||||||
|
// ignore: unused_element
|
||||||
|
Logger get _log => _$logAlbumUpgraderV7;
|
||||||
|
}
|
|
@ -3,7 +3,11 @@ import 'package:exifdart/exifdart.dart';
|
||||||
import 'package:intl/intl.dart';
|
import 'package:intl/intl.dart';
|
||||||
import 'package:logging/logging.dart';
|
import 'package:logging/logging.dart';
|
||||||
import 'package:nc_photos/type.dart';
|
import 'package:nc_photos/type.dart';
|
||||||
|
import 'package:np_codegen/np_codegen.dart';
|
||||||
|
|
||||||
|
part 'exif.g.dart';
|
||||||
|
|
||||||
|
@npLog
|
||||||
class Exif with EquatableMixin {
|
class Exif with EquatableMixin {
|
||||||
Exif(this.data);
|
Exif(this.data);
|
||||||
|
|
||||||
|
@ -138,6 +142,4 @@ class Exif with EquatableMixin {
|
||||||
final Map<String, dynamic> data;
|
final Map<String, dynamic> data;
|
||||||
|
|
||||||
static final dateTimeFormat = DateFormat("yyyy:MM:dd HH:mm:ss");
|
static final dateTimeFormat = DateFormat("yyyy:MM:dd HH:mm:ss");
|
||||||
|
|
||||||
static final _log = Logger("entity.exif.Exif");
|
|
||||||
}
|
}
|
||||||
|
|
15
app/lib/entity/exif.g.dart
Normal file
15
app/lib/entity/exif.g.dart
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
|
||||||
|
part of 'exif.dart';
|
||||||
|
|
||||||
|
// **************************************************************************
|
||||||
|
// NpLogGenerator
|
||||||
|
// **************************************************************************
|
||||||
|
|
||||||
|
// ignore: non_constant_identifier_names
|
||||||
|
final _$logExif = Logger("entity.exif.Exif");
|
||||||
|
|
||||||
|
extension _$ExifNpLog on Exif {
|
||||||
|
// ignore: unused_element
|
||||||
|
Logger get _log => _$logExif;
|
||||||
|
}
|
|
@ -7,7 +7,11 @@ import 'package:nc_photos/entity/face.dart';
|
||||||
import 'package:nc_photos/entity/person.dart';
|
import 'package:nc_photos/entity/person.dart';
|
||||||
import 'package:nc_photos/exception.dart';
|
import 'package:nc_photos/exception.dart';
|
||||||
import 'package:nc_photos/type.dart';
|
import 'package:nc_photos/type.dart';
|
||||||
|
import 'package:np_codegen/np_codegen.dart';
|
||||||
|
|
||||||
|
part 'data_source.g.dart';
|
||||||
|
|
||||||
|
@npLog
|
||||||
class FaceRemoteDataSource implements FaceDataSource {
|
class FaceRemoteDataSource implements FaceDataSource {
|
||||||
const FaceRemoteDataSource();
|
const FaceRemoteDataSource();
|
||||||
|
|
||||||
|
@ -32,10 +36,9 @@ class FaceRemoteDataSource implements FaceDataSource {
|
||||||
final List<JsonObj> dataJson = json["ocs"]["data"].cast<JsonObj>();
|
final List<JsonObj> dataJson = json["ocs"]["data"].cast<JsonObj>();
|
||||||
return _FaceParser().parseList(dataJson);
|
return _FaceParser().parseList(dataJson);
|
||||||
}
|
}
|
||||||
|
|
||||||
static final _log = Logger("entity.face.data_source.FaceRemoteDataSource");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@npLog
|
||||||
class _FaceParser {
|
class _FaceParser {
|
||||||
List<Face> parseList(List<JsonObj> jsons) {
|
List<Face> parseList(List<JsonObj> jsons) {
|
||||||
final product = <Face>[];
|
final product = <Face>[];
|
||||||
|
@ -55,6 +58,4 @@ class _FaceParser {
|
||||||
fileId: json["fileId"],
|
fileId: json["fileId"],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
static final _log = Logger("entity.face.data_source._FaceParser");
|
|
||||||
}
|
}
|
||||||
|
|
24
app/lib/entity/face/data_source.g.dart
Normal file
24
app/lib/entity/face/data_source.g.dart
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
|
||||||
|
part of 'data_source.dart';
|
||||||
|
|
||||||
|
// **************************************************************************
|
||||||
|
// NpLogGenerator
|
||||||
|
// **************************************************************************
|
||||||
|
|
||||||
|
// ignore: non_constant_identifier_names
|
||||||
|
final _$logFaceRemoteDataSource =
|
||||||
|
Logger("entity.face.data_source.FaceRemoteDataSource");
|
||||||
|
|
||||||
|
extension _$FaceRemoteDataSourceNpLog on FaceRemoteDataSource {
|
||||||
|
// ignore: unused_element
|
||||||
|
Logger get _log => _$logFaceRemoteDataSource;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ignore: non_constant_identifier_names
|
||||||
|
final _$log_FaceParser = Logger("entity.face.data_source._FaceParser");
|
||||||
|
|
||||||
|
extension _$_FaceParserNpLog on _FaceParser {
|
||||||
|
// ignore: unused_element
|
||||||
|
Logger get _log => _$log_FaceParser;
|
||||||
|
}
|
|
@ -5,8 +5,12 @@ import 'package:nc_photos/entity/favorite.dart';
|
||||||
import 'package:nc_photos/entity/file.dart';
|
import 'package:nc_photos/entity/file.dart';
|
||||||
import 'package:nc_photos/entity/webdav_response_parser.dart';
|
import 'package:nc_photos/entity/webdav_response_parser.dart';
|
||||||
import 'package:nc_photos/exception.dart';
|
import 'package:nc_photos/exception.dart';
|
||||||
|
import 'package:np_codegen/np_codegen.dart';
|
||||||
import 'package:xml/xml.dart';
|
import 'package:xml/xml.dart';
|
||||||
|
|
||||||
|
part 'data_source.g.dart';
|
||||||
|
|
||||||
|
@npLog
|
||||||
class FavoriteRemoteDataSource implements FavoriteDataSource {
|
class FavoriteRemoteDataSource implements FavoriteDataSource {
|
||||||
const FavoriteRemoteDataSource();
|
const FavoriteRemoteDataSource();
|
||||||
|
|
||||||
|
@ -28,7 +32,4 @@ class FavoriteRemoteDataSource implements FavoriteDataSource {
|
||||||
final xml = XmlDocument.parse(response.body);
|
final xml = XmlDocument.parse(response.body);
|
||||||
return WebdavResponseParser().parseFavorites(xml);
|
return WebdavResponseParser().parseFavorites(xml);
|
||||||
}
|
}
|
||||||
|
|
||||||
static final _log =
|
|
||||||
Logger("entity.favorite.data_source.FavoriteRemoteDataSource");
|
|
||||||
}
|
}
|
||||||
|
|
16
app/lib/entity/favorite/data_source.g.dart
Normal file
16
app/lib/entity/favorite/data_source.g.dart
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
|
||||||
|
part of 'data_source.dart';
|
||||||
|
|
||||||
|
// **************************************************************************
|
||||||
|
// NpLogGenerator
|
||||||
|
// **************************************************************************
|
||||||
|
|
||||||
|
// ignore: non_constant_identifier_names
|
||||||
|
final _$logFavoriteRemoteDataSource =
|
||||||
|
Logger("entity.favorite.data_source.FavoriteRemoteDataSource");
|
||||||
|
|
||||||
|
extension _$FavoriteRemoteDataSourceNpLog on FavoriteRemoteDataSource {
|
||||||
|
// ignore: unused_element
|
||||||
|
Logger get _log => _$logFavoriteRemoteDataSource;
|
||||||
|
}
|
|
@ -11,6 +11,7 @@ import 'package:nc_photos/json_util.dart' as json_util;
|
||||||
import 'package:nc_photos/or_null.dart';
|
import 'package:nc_photos/or_null.dart';
|
||||||
import 'package:nc_photos/string_extension.dart';
|
import 'package:nc_photos/string_extension.dart';
|
||||||
import 'package:nc_photos/type.dart';
|
import 'package:nc_photos/type.dart';
|
||||||
|
import 'package:np_codegen/np_codegen.dart';
|
||||||
import 'package:to_string/to_string.dart';
|
import 'package:to_string/to_string.dart';
|
||||||
|
|
||||||
part 'file.g.dart';
|
part 'file.g.dart';
|
||||||
|
@ -83,6 +84,7 @@ class ImageLocation with EquatableMixin {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Immutable object that hold metadata of a [File]
|
/// Immutable object that hold metadata of a [File]
|
||||||
|
@npLog
|
||||||
@ToString(ignoreNull: true)
|
@ToString(ignoreNull: true)
|
||||||
class Metadata with EquatableMixin {
|
class Metadata with EquatableMixin {
|
||||||
Metadata({
|
Metadata({
|
||||||
|
@ -206,7 +208,7 @@ class Metadata with EquatableMixin {
|
||||||
/// versioning of this class, use to upgrade old persisted metadata
|
/// versioning of this class, use to upgrade old persisted metadata
|
||||||
static const version = 4;
|
static const version = 4;
|
||||||
|
|
||||||
static final _log = Logger("entity.file.Metadata");
|
static final _log = _$logMetadata;
|
||||||
}
|
}
|
||||||
|
|
||||||
abstract class MetadataUpgrader {
|
abstract class MetadataUpgrader {
|
||||||
|
@ -214,6 +216,7 @@ abstract class MetadataUpgrader {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Upgrade v1 Metadata to v2
|
/// Upgrade v1 Metadata to v2
|
||||||
|
@npLog
|
||||||
class MetadataUpgraderV1 implements MetadataUpgrader {
|
class MetadataUpgraderV1 implements MetadataUpgrader {
|
||||||
MetadataUpgraderV1({
|
MetadataUpgraderV1({
|
||||||
required this.fileContentType,
|
required this.fileContentType,
|
||||||
|
@ -235,11 +238,10 @@ class MetadataUpgraderV1 implements MetadataUpgrader {
|
||||||
|
|
||||||
/// File path for logging only
|
/// File path for logging only
|
||||||
final String? logFilePath;
|
final String? logFilePath;
|
||||||
|
|
||||||
static final _log = Logger("entity.file.MetadataUpgraderV1");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Upgrade v2 Metadata to v3
|
/// Upgrade v2 Metadata to v3
|
||||||
|
@npLog
|
||||||
class MetadataUpgraderV2 implements MetadataUpgrader {
|
class MetadataUpgraderV2 implements MetadataUpgrader {
|
||||||
MetadataUpgraderV2({
|
MetadataUpgraderV2({
|
||||||
required this.fileContentType,
|
required this.fileContentType,
|
||||||
|
@ -268,11 +270,10 @@ class MetadataUpgraderV2 implements MetadataUpgrader {
|
||||||
|
|
||||||
/// File path for logging only
|
/// File path for logging only
|
||||||
final String? logFilePath;
|
final String? logFilePath;
|
||||||
|
|
||||||
static final _log = Logger("entity.file.MetadataUpgraderV2");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Upgrade v3 Metadata to v4
|
/// Upgrade v3 Metadata to v4
|
||||||
|
@npLog
|
||||||
class MetadataUpgraderV3 implements MetadataUpgrader {
|
class MetadataUpgraderV3 implements MetadataUpgrader {
|
||||||
const MetadataUpgraderV3({
|
const MetadataUpgraderV3({
|
||||||
required this.fileContentType,
|
required this.fileContentType,
|
||||||
|
@ -297,8 +298,6 @@ class MetadataUpgraderV3 implements MetadataUpgrader {
|
||||||
|
|
||||||
/// File path for logging only
|
/// File path for logging only
|
||||||
final String? logFilePath;
|
final String? logFilePath;
|
||||||
|
|
||||||
static final _log = Logger("entity.file.MetadataUpgraderV3");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ToString(ignoreNull: true)
|
@ToString(ignoreNull: true)
|
||||||
|
|
|
@ -2,6 +2,42 @@
|
||||||
|
|
||||||
part of 'file.dart';
|
part of 'file.dart';
|
||||||
|
|
||||||
|
// **************************************************************************
|
||||||
|
// NpLogGenerator
|
||||||
|
// **************************************************************************
|
||||||
|
|
||||||
|
// ignore: non_constant_identifier_names
|
||||||
|
final _$logMetadata = Logger("entity.file.Metadata");
|
||||||
|
|
||||||
|
extension _$MetadataNpLog on Metadata {
|
||||||
|
// ignore: unused_element
|
||||||
|
Logger get _log => _$logMetadata;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ignore: non_constant_identifier_names
|
||||||
|
final _$logMetadataUpgraderV1 = Logger("entity.file.MetadataUpgraderV1");
|
||||||
|
|
||||||
|
extension _$MetadataUpgraderV1NpLog on MetadataUpgraderV1 {
|
||||||
|
// ignore: unused_element
|
||||||
|
Logger get _log => _$logMetadataUpgraderV1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ignore: non_constant_identifier_names
|
||||||
|
final _$logMetadataUpgraderV2 = Logger("entity.file.MetadataUpgraderV2");
|
||||||
|
|
||||||
|
extension _$MetadataUpgraderV2NpLog on MetadataUpgraderV2 {
|
||||||
|
// ignore: unused_element
|
||||||
|
Logger get _log => _$logMetadataUpgraderV2;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ignore: non_constant_identifier_names
|
||||||
|
final _$logMetadataUpgraderV3 = Logger("entity.file.MetadataUpgraderV3");
|
||||||
|
|
||||||
|
extension _$MetadataUpgraderV3NpLog on MetadataUpgraderV3 {
|
||||||
|
// ignore: unused_element
|
||||||
|
Logger get _log => _$logMetadataUpgraderV3;
|
||||||
|
}
|
||||||
|
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
// ToStringGenerator
|
// ToStringGenerator
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
|
|
|
@ -19,9 +19,13 @@ import 'package:nc_photos/iterable_extension.dart';
|
||||||
import 'package:nc_photos/object_extension.dart';
|
import 'package:nc_photos/object_extension.dart';
|
||||||
import 'package:nc_photos/or_null.dart';
|
import 'package:nc_photos/or_null.dart';
|
||||||
import 'package:nc_photos/use_case/compat/v32.dart';
|
import 'package:nc_photos/use_case/compat/v32.dart';
|
||||||
|
import 'package:np_codegen/np_codegen.dart';
|
||||||
import 'package:path/path.dart' as path_lib;
|
import 'package:path/path.dart' as path_lib;
|
||||||
import 'package:xml/xml.dart';
|
import 'package:xml/xml.dart';
|
||||||
|
|
||||||
|
part 'data_source.g.dart';
|
||||||
|
|
||||||
|
@npLog
|
||||||
class FileWebdavDataSource implements FileDataSource {
|
class FileWebdavDataSource implements FileDataSource {
|
||||||
const FileWebdavDataSource();
|
const FileWebdavDataSource();
|
||||||
|
|
||||||
|
@ -352,10 +356,9 @@ class FileWebdavDataSource implements FileDataSource {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static final _log = Logger("entity.file.data_source.FileWebdavDataSource");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@npLog
|
||||||
class FileSqliteDbDataSource implements FileDataSource {
|
class FileSqliteDbDataSource implements FileDataSource {
|
||||||
FileSqliteDbDataSource(this._c);
|
FileSqliteDbDataSource(this._c);
|
||||||
|
|
||||||
|
@ -564,8 +567,6 @@ class FileSqliteDbDataSource implements FileDataSource {
|
||||||
}
|
}
|
||||||
|
|
||||||
final DiContainer _c;
|
final DiContainer _c;
|
||||||
|
|
||||||
static final _log = Logger("entity.file.data_source.FileSqliteDbDataSource");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class IntermediateSyncState {
|
class IntermediateSyncState {
|
||||||
|
@ -584,6 +585,7 @@ class IntermediateSyncState {
|
||||||
final bool shouldCache;
|
final bool shouldCache;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@npLog
|
||||||
class FileCachedDataSource implements FileDataSource {
|
class FileCachedDataSource implements FileDataSource {
|
||||||
FileCachedDataSource(
|
FileCachedDataSource(
|
||||||
this._c, {
|
this._c, {
|
||||||
|
@ -799,8 +801,6 @@ class FileCachedDataSource implements FileDataSource {
|
||||||
|
|
||||||
final _remoteSrc = const FileWebdavDataSource();
|
final _remoteSrc = const FileWebdavDataSource();
|
||||||
final FileSqliteDbDataSource _sqliteDbSrc;
|
final FileSqliteDbDataSource _sqliteDbSrc;
|
||||||
|
|
||||||
static final _log = Logger("entity.file.data_source.FileCachedDataSource");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool _validateFile(File f) {
|
bool _validateFile(File f) {
|
||||||
|
|
34
app/lib/entity/file/data_source.g.dart
Normal file
34
app/lib/entity/file/data_source.g.dart
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
|
||||||
|
part of 'data_source.dart';
|
||||||
|
|
||||||
|
// **************************************************************************
|
||||||
|
// NpLogGenerator
|
||||||
|
// **************************************************************************
|
||||||
|
|
||||||
|
// ignore: non_constant_identifier_names
|
||||||
|
final _$logFileWebdavDataSource =
|
||||||
|
Logger("entity.file.data_source.FileWebdavDataSource");
|
||||||
|
|
||||||
|
extension _$FileWebdavDataSourceNpLog on FileWebdavDataSource {
|
||||||
|
// ignore: unused_element
|
||||||
|
Logger get _log => _$logFileWebdavDataSource;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ignore: non_constant_identifier_names
|
||||||
|
final _$logFileSqliteDbDataSource =
|
||||||
|
Logger("entity.file.data_source.FileSqliteDbDataSource");
|
||||||
|
|
||||||
|
extension _$FileSqliteDbDataSourceNpLog on FileSqliteDbDataSource {
|
||||||
|
// ignore: unused_element
|
||||||
|
Logger get _log => _$logFileSqliteDbDataSource;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ignore: non_constant_identifier_names
|
||||||
|
final _$logFileCachedDataSource =
|
||||||
|
Logger("entity.file.data_source.FileCachedDataSource");
|
||||||
|
|
||||||
|
extension _$FileCachedDataSourceNpLog on FileCachedDataSource {
|
||||||
|
// ignore: unused_element
|
||||||
|
Logger get _log => _$logFileCachedDataSource;
|
||||||
|
}
|
|
@ -15,7 +15,11 @@ import 'package:nc_photos/exception.dart';
|
||||||
import 'package:nc_photos/iterable_extension.dart';
|
import 'package:nc_photos/iterable_extension.dart';
|
||||||
import 'package:nc_photos/list_util.dart' as list_util;
|
import 'package:nc_photos/list_util.dart' as list_util;
|
||||||
import 'package:nc_photos/object_extension.dart';
|
import 'package:nc_photos/object_extension.dart';
|
||||||
|
import 'package:np_codegen/np_codegen.dart';
|
||||||
|
|
||||||
|
part 'file_cache_manager.g.dart';
|
||||||
|
|
||||||
|
@npLog
|
||||||
class FileCacheLoader {
|
class FileCacheLoader {
|
||||||
FileCacheLoader(
|
FileCacheLoader(
|
||||||
this._c, {
|
this._c, {
|
||||||
|
@ -81,10 +85,9 @@ class FileCacheLoader {
|
||||||
|
|
||||||
var _isGood = false;
|
var _isGood = false;
|
||||||
String? _remoteEtag;
|
String? _remoteEtag;
|
||||||
|
|
||||||
static final _log = Logger("entity.file.file_cache_manager.FileCacheLoader");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@npLog
|
||||||
class FileSqliteCacheUpdater {
|
class FileSqliteCacheUpdater {
|
||||||
FileSqliteCacheUpdater(this._c) : assert(require(_c));
|
FileSqliteCacheUpdater(this._c) : assert(require(_c));
|
||||||
|
|
||||||
|
@ -348,9 +351,6 @@ class FileSqliteCacheUpdater {
|
||||||
|
|
||||||
int? _dirRowId;
|
int? _dirRowId;
|
||||||
final _childRowIds = <int>[];
|
final _childRowIds = <int>[];
|
||||||
|
|
||||||
static final _log =
|
|
||||||
Logger("entity.file.file_cache_manager.FileSqliteCacheUpdater");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class FileSqliteCacheRemover {
|
class FileSqliteCacheRemover {
|
||||||
|
|
25
app/lib/entity/file/file_cache_manager.g.dart
Normal file
25
app/lib/entity/file/file_cache_manager.g.dart
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
|
||||||
|
part of 'file_cache_manager.dart';
|
||||||
|
|
||||||
|
// **************************************************************************
|
||||||
|
// NpLogGenerator
|
||||||
|
// **************************************************************************
|
||||||
|
|
||||||
|
// ignore: non_constant_identifier_names
|
||||||
|
final _$logFileCacheLoader =
|
||||||
|
Logger("entity.file.file_cache_manager.FileCacheLoader");
|
||||||
|
|
||||||
|
extension _$FileCacheLoaderNpLog on FileCacheLoader {
|
||||||
|
// ignore: unused_element
|
||||||
|
Logger get _log => _$logFileCacheLoader;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ignore: non_constant_identifier_names
|
||||||
|
final _$logFileSqliteCacheUpdater =
|
||||||
|
Logger("entity.file.file_cache_manager.FileSqliteCacheUpdater");
|
||||||
|
|
||||||
|
extension _$FileSqliteCacheUpdaterNpLog on FileSqliteCacheUpdater {
|
||||||
|
// ignore: unused_element
|
||||||
|
Logger get _log => _$logFileSqliteCacheUpdater;
|
||||||
|
}
|
|
@ -9,7 +9,11 @@ import 'package:nc_photos/mobile/share.dart';
|
||||||
import 'package:nc_photos/object_extension.dart';
|
import 'package:nc_photos/object_extension.dart';
|
||||||
import 'package:nc_photos/stream_extension.dart';
|
import 'package:nc_photos/stream_extension.dart';
|
||||||
import 'package:nc_photos_plugin/nc_photos_plugin.dart';
|
import 'package:nc_photos_plugin/nc_photos_plugin.dart';
|
||||||
|
import 'package:np_codegen/np_codegen.dart';
|
||||||
|
|
||||||
|
part 'data_source.g.dart';
|
||||||
|
|
||||||
|
@npLog
|
||||||
class LocalFileMediaStoreDataSource implements LocalFileDataSource {
|
class LocalFileMediaStoreDataSource implements LocalFileDataSource {
|
||||||
const LocalFileMediaStoreDataSource();
|
const LocalFileMediaStoreDataSource();
|
||||||
|
|
||||||
|
@ -118,7 +122,4 @@ class LocalFileMediaStoreDataSource implements LocalFileDataSource {
|
||||||
mime: r.mimeType,
|
mime: r.mimeType,
|
||||||
dateTaken: r.dateTaken?.run(DateTime.fromMillisecondsSinceEpoch),
|
dateTaken: r.dateTaken?.run(DateTime.fromMillisecondsSinceEpoch),
|
||||||
);
|
);
|
||||||
|
|
||||||
static final _log =
|
|
||||||
Logger("entity.local_file.data_source.LocalFileMediaStoreDataSource");
|
|
||||||
}
|
}
|
||||||
|
|
17
app/lib/entity/local_file/data_source.g.dart
Normal file
17
app/lib/entity/local_file/data_source.g.dart
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
|
||||||
|
part of 'data_source.dart';
|
||||||
|
|
||||||
|
// **************************************************************************
|
||||||
|
// NpLogGenerator
|
||||||
|
// **************************************************************************
|
||||||
|
|
||||||
|
// ignore: non_constant_identifier_names
|
||||||
|
final _$logLocalFileMediaStoreDataSource =
|
||||||
|
Logger("entity.local_file.data_source.LocalFileMediaStoreDataSource");
|
||||||
|
|
||||||
|
extension _$LocalFileMediaStoreDataSourceNpLog
|
||||||
|
on LocalFileMediaStoreDataSource {
|
||||||
|
// ignore: unused_element
|
||||||
|
Logger get _log => _$logLocalFileMediaStoreDataSource;
|
||||||
|
}
|
|
@ -4,12 +4,16 @@ import 'package:logging/logging.dart';
|
||||||
import 'package:nc_photos/account.dart';
|
import 'package:nc_photos/account.dart';
|
||||||
import 'package:nc_photos/api/api.dart';
|
import 'package:nc_photos/api/api.dart';
|
||||||
import 'package:nc_photos/entity/person.dart';
|
import 'package:nc_photos/entity/person.dart';
|
||||||
|
import 'package:nc_photos/entity/sqlite_table.dart' as sql;
|
||||||
import 'package:nc_photos/entity/sqlite_table_converter.dart';
|
import 'package:nc_photos/entity/sqlite_table_converter.dart';
|
||||||
|
import 'package:nc_photos/entity/sqlite_table_extension.dart' as sql;
|
||||||
import 'package:nc_photos/exception.dart';
|
import 'package:nc_photos/exception.dart';
|
||||||
import 'package:nc_photos/type.dart';
|
import 'package:nc_photos/type.dart';
|
||||||
import 'package:nc_photos/entity/sqlite_table.dart' as sql;
|
import 'package:np_codegen/np_codegen.dart';
|
||||||
import 'package:nc_photos/entity/sqlite_table_extension.dart' as sql;
|
|
||||||
|
|
||||||
|
part 'data_source.g.dart';
|
||||||
|
|
||||||
|
@npLog
|
||||||
class PersonRemoteDataSource implements PersonDataSource {
|
class PersonRemoteDataSource implements PersonDataSource {
|
||||||
const PersonRemoteDataSource();
|
const PersonRemoteDataSource();
|
||||||
|
|
||||||
|
@ -29,11 +33,9 @@ class PersonRemoteDataSource implements PersonDataSource {
|
||||||
final List<JsonObj> dataJson = json["ocs"]["data"].cast<JsonObj>();
|
final List<JsonObj> dataJson = json["ocs"]["data"].cast<JsonObj>();
|
||||||
return _PersonParser().parseList(dataJson);
|
return _PersonParser().parseList(dataJson);
|
||||||
}
|
}
|
||||||
|
|
||||||
static final _log =
|
|
||||||
Logger("entity.person.data_source.PersonRemoteDataSource");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@npLog
|
||||||
class PersonSqliteDbDataSource implements PersonDataSource {
|
class PersonSqliteDbDataSource implements PersonDataSource {
|
||||||
const PersonSqliteDbDataSource(this.sqliteDb);
|
const PersonSqliteDbDataSource(this.sqliteDb);
|
||||||
|
|
||||||
|
@ -47,11 +49,9 @@ class PersonSqliteDbDataSource implements PersonDataSource {
|
||||||
}
|
}
|
||||||
|
|
||||||
final sql.SqliteDb sqliteDb;
|
final sql.SqliteDb sqliteDb;
|
||||||
|
|
||||||
static final _log =
|
|
||||||
Logger("entity.person.data_source.PersonSqliteDbDataSource");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@npLog
|
||||||
class _PersonParser {
|
class _PersonParser {
|
||||||
List<Person> parseList(List<JsonObj> jsons) {
|
List<Person> parseList(List<JsonObj> jsons) {
|
||||||
final product = <Person>[];
|
final product = <Person>[];
|
||||||
|
@ -72,6 +72,4 @@ class _PersonParser {
|
||||||
count: json["count"],
|
count: json["count"],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
static final _log = Logger("entity.person.data_source._PersonParser");
|
|
||||||
}
|
}
|
||||||
|
|
33
app/lib/entity/person/data_source.g.dart
Normal file
33
app/lib/entity/person/data_source.g.dart
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
|
||||||
|
part of 'data_source.dart';
|
||||||
|
|
||||||
|
// **************************************************************************
|
||||||
|
// NpLogGenerator
|
||||||
|
// **************************************************************************
|
||||||
|
|
||||||
|
// ignore: non_constant_identifier_names
|
||||||
|
final _$logPersonRemoteDataSource =
|
||||||
|
Logger("entity.person.data_source.PersonRemoteDataSource");
|
||||||
|
|
||||||
|
extension _$PersonRemoteDataSourceNpLog on PersonRemoteDataSource {
|
||||||
|
// ignore: unused_element
|
||||||
|
Logger get _log => _$logPersonRemoteDataSource;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ignore: non_constant_identifier_names
|
||||||
|
final _$logPersonSqliteDbDataSource =
|
||||||
|
Logger("entity.person.data_source.PersonSqliteDbDataSource");
|
||||||
|
|
||||||
|
extension _$PersonSqliteDbDataSourceNpLog on PersonSqliteDbDataSource {
|
||||||
|
// ignore: unused_element
|
||||||
|
Logger get _log => _$logPersonSqliteDbDataSource;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ignore: non_constant_identifier_names
|
||||||
|
final _$log_PersonParser = Logger("entity.person.data_source._PersonParser");
|
||||||
|
|
||||||
|
extension _$_PersonParserNpLog on _PersonParser {
|
||||||
|
// ignore: unused_element
|
||||||
|
Logger get _log => _$log_PersonParser;
|
||||||
|
}
|
|
@ -13,7 +13,11 @@ import 'package:nc_photos/iterable_extension.dart';
|
||||||
import 'package:nc_photos/object_extension.dart';
|
import 'package:nc_photos/object_extension.dart';
|
||||||
import 'package:nc_photos/use_case/list_tagged_file.dart';
|
import 'package:nc_photos/use_case/list_tagged_file.dart';
|
||||||
import 'package:nc_photos/use_case/populate_person.dart';
|
import 'package:nc_photos/use_case/populate_person.dart';
|
||||||
|
import 'package:np_codegen/np_codegen.dart';
|
||||||
|
|
||||||
|
part 'data_source.g.dart';
|
||||||
|
|
||||||
|
@npLog
|
||||||
class SearchSqliteDbDataSource implements SearchDataSource {
|
class SearchSqliteDbDataSource implements SearchDataSource {
|
||||||
SearchSqliteDbDataSource(this._c);
|
SearchSqliteDbDataSource(this._c);
|
||||||
|
|
||||||
|
@ -182,7 +186,4 @@ class SearchSqliteDbDataSource implements SearchDataSource {
|
||||||
}
|
}
|
||||||
|
|
||||||
final DiContainer _c;
|
final DiContainer _c;
|
||||||
|
|
||||||
static final _log =
|
|
||||||
Logger("entity.search.data_source.SearchSqliteDbDataSource");
|
|
||||||
}
|
}
|
||||||
|
|
16
app/lib/entity/search/data_source.g.dart
Normal file
16
app/lib/entity/search/data_source.g.dart
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
|
||||||
|
part of 'data_source.dart';
|
||||||
|
|
||||||
|
// **************************************************************************
|
||||||
|
// NpLogGenerator
|
||||||
|
// **************************************************************************
|
||||||
|
|
||||||
|
// ignore: non_constant_identifier_names
|
||||||
|
final _$logSearchSqliteDbDataSource =
|
||||||
|
Logger("entity.search.data_source.SearchSqliteDbDataSource");
|
||||||
|
|
||||||
|
extension _$SearchSqliteDbDataSourceNpLog on SearchSqliteDbDataSource {
|
||||||
|
// ignore: unused_element
|
||||||
|
Logger get _log => _$logSearchSqliteDbDataSource;
|
||||||
|
}
|
|
@ -9,7 +9,11 @@ import 'package:nc_photos/entity/file_descriptor.dart';
|
||||||
import 'package:nc_photos/entity/share.dart';
|
import 'package:nc_photos/entity/share.dart';
|
||||||
import 'package:nc_photos/exception.dart';
|
import 'package:nc_photos/exception.dart';
|
||||||
import 'package:nc_photos/type.dart';
|
import 'package:nc_photos/type.dart';
|
||||||
|
import 'package:np_codegen/np_codegen.dart';
|
||||||
|
|
||||||
|
part 'data_source.g.dart';
|
||||||
|
|
||||||
|
@npLog
|
||||||
class ShareRemoteDataSource implements ShareDataSource {
|
class ShareRemoteDataSource implements ShareDataSource {
|
||||||
@override
|
@override
|
||||||
list(
|
list(
|
||||||
|
@ -134,10 +138,9 @@ class ShareRemoteDataSource implements ShareDataSource {
|
||||||
final List<JsonObj> dataJson = json["ocs"]["data"].cast<JsonObj>();
|
final List<JsonObj> dataJson = json["ocs"]["data"].cast<JsonObj>();
|
||||||
return _ShareParser().parseList(dataJson);
|
return _ShareParser().parseList(dataJson);
|
||||||
}
|
}
|
||||||
|
|
||||||
static final _log = Logger("entity.share.data_source.ShareRemoteDataSource");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@npLog
|
||||||
class _ShareParser {
|
class _ShareParser {
|
||||||
List<Share> parseList(List<JsonObj> jsons) {
|
List<Share> parseList(List<JsonObj> jsons) {
|
||||||
final product = <Share>[];
|
final product = <Share>[];
|
||||||
|
@ -174,6 +177,4 @@ class _ShareParser {
|
||||||
url: json["url"],
|
url: json["url"],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
static final _log = Logger("entity.share.data_source._ShareParser");
|
|
||||||
}
|
}
|
||||||
|
|
24
app/lib/entity/share/data_source.g.dart
Normal file
24
app/lib/entity/share/data_source.g.dart
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
|
||||||
|
part of 'data_source.dart';
|
||||||
|
|
||||||
|
// **************************************************************************
|
||||||
|
// NpLogGenerator
|
||||||
|
// **************************************************************************
|
||||||
|
|
||||||
|
// ignore: non_constant_identifier_names
|
||||||
|
final _$logShareRemoteDataSource =
|
||||||
|
Logger("entity.share.data_source.ShareRemoteDataSource");
|
||||||
|
|
||||||
|
extension _$ShareRemoteDataSourceNpLog on ShareRemoteDataSource {
|
||||||
|
// ignore: unused_element
|
||||||
|
Logger get _log => _$logShareRemoteDataSource;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ignore: non_constant_identifier_names
|
||||||
|
final _$log_ShareParser = Logger("entity.share.data_source._ShareParser");
|
||||||
|
|
||||||
|
extension _$_ShareParserNpLog on _ShareParser {
|
||||||
|
// ignore: unused_element
|
||||||
|
Logger get _log => _$log_ShareParser;
|
||||||
|
}
|
|
@ -7,7 +7,11 @@ import 'package:nc_photos/ci_string.dart';
|
||||||
import 'package:nc_photos/entity/sharee.dart';
|
import 'package:nc_photos/entity/sharee.dart';
|
||||||
import 'package:nc_photos/exception.dart';
|
import 'package:nc_photos/exception.dart';
|
||||||
import 'package:nc_photos/type.dart';
|
import 'package:nc_photos/type.dart';
|
||||||
|
import 'package:np_codegen/np_codegen.dart';
|
||||||
|
|
||||||
|
part 'data_source.g.dart';
|
||||||
|
|
||||||
|
@npLog
|
||||||
class ShareeRemoteDataSource implements ShareeDataSource {
|
class ShareeRemoteDataSource implements ShareeDataSource {
|
||||||
@override
|
@override
|
||||||
list(Account account) async {
|
list(Account account) async {
|
||||||
|
@ -28,11 +32,9 @@ class ShareeRemoteDataSource implements ShareeDataSource {
|
||||||
final sharees = _ShareeParser()(json);
|
final sharees = _ShareeParser()(json);
|
||||||
return sharees;
|
return sharees;
|
||||||
}
|
}
|
||||||
|
|
||||||
static final _log =
|
|
||||||
Logger("entity.sharee.data_source.ShareeRemoteDataSource");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@npLog
|
||||||
class _ShareeParser {
|
class _ShareeParser {
|
||||||
List<Sharee> call(JsonObj json) {
|
List<Sharee> call(JsonObj json) {
|
||||||
final JsonObj dataJson = json["ocs"]["data"];
|
final JsonObj dataJson = json["ocs"]["data"];
|
||||||
|
@ -55,8 +57,6 @@ class _ShareeParser {
|
||||||
return product;
|
return product;
|
||||||
}
|
}
|
||||||
|
|
||||||
static final _log = Logger("entity.sharee.data_source._ShareeParser");
|
|
||||||
|
|
||||||
static const _keyTypes = {
|
static const _keyTypes = {
|
||||||
"users": ShareeType.user,
|
"users": ShareeType.user,
|
||||||
"groups": ShareeType.group,
|
"groups": ShareeType.group,
|
||||||
|
|
24
app/lib/entity/sharee/data_source.g.dart
Normal file
24
app/lib/entity/sharee/data_source.g.dart
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
|
||||||
|
part of 'data_source.dart';
|
||||||
|
|
||||||
|
// **************************************************************************
|
||||||
|
// NpLogGenerator
|
||||||
|
// **************************************************************************
|
||||||
|
|
||||||
|
// ignore: non_constant_identifier_names
|
||||||
|
final _$logShareeRemoteDataSource =
|
||||||
|
Logger("entity.sharee.data_source.ShareeRemoteDataSource");
|
||||||
|
|
||||||
|
extension _$ShareeRemoteDataSourceNpLog on ShareeRemoteDataSource {
|
||||||
|
// ignore: unused_element
|
||||||
|
Logger get _log => _$logShareeRemoteDataSource;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ignore: non_constant_identifier_names
|
||||||
|
final _$log_ShareeParser = Logger("entity.sharee.data_source._ShareeParser");
|
||||||
|
|
||||||
|
extension _$_ShareeParserNpLog on _ShareeParser {
|
||||||
|
// ignore: unused_element
|
||||||
|
Logger get _log => _$log_ShareeParser;
|
||||||
|
}
|
|
@ -2,6 +2,7 @@ import 'package:drift/drift.dart';
|
||||||
import 'package:logging/logging.dart';
|
import 'package:logging/logging.dart';
|
||||||
import 'package:nc_photos/mobile/platform.dart'
|
import 'package:nc_photos/mobile/platform.dart'
|
||||||
if (dart.library.html) 'package:nc_photos/web/platform.dart' as platform;
|
if (dart.library.html) 'package:nc_photos/web/platform.dart' as platform;
|
||||||
|
import 'package:np_codegen/np_codegen.dart';
|
||||||
|
|
||||||
part 'sqlite_table.g.dart';
|
part 'sqlite_table.g.dart';
|
||||||
|
|
||||||
|
@ -196,6 +197,7 @@ class Persons extends Table {
|
||||||
}
|
}
|
||||||
|
|
||||||
// remember to also update the truncate method after adding a new table
|
// remember to also update the truncate method after adding a new table
|
||||||
|
@npLog
|
||||||
@DriftDatabase(
|
@DriftDatabase(
|
||||||
tables: [
|
tables: [
|
||||||
Servers,
|
Servers,
|
||||||
|
@ -302,8 +304,6 @@ class SqliteDb extends _$SqliteDb {
|
||||||
await m.createIndex(Index("image_locations_admin2_index",
|
await m.createIndex(Index("image_locations_admin2_index",
|
||||||
"CREATE INDEX image_locations_admin2_index ON image_locations(admin2);"));
|
"CREATE INDEX image_locations_admin2_index ON image_locations(admin2);"));
|
||||||
}
|
}
|
||||||
|
|
||||||
static final _log = Logger("entity.sqlite_table.SqliteDb");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class _DateTimeConverter extends TypeConverter<DateTime, DateTime> {
|
class _DateTimeConverter extends TypeConverter<DateTime, DateTime> {
|
||||||
|
|
|
@ -4190,3 +4190,15 @@ abstract class _$SqliteDb extends GeneratedDatabase {
|
||||||
persons
|
persons
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// **************************************************************************
|
||||||
|
// NpLogGenerator
|
||||||
|
// **************************************************************************
|
||||||
|
|
||||||
|
// ignore: non_constant_identifier_names
|
||||||
|
final _$logSqliteDb = Logger("entity.sqlite_table.SqliteDb");
|
||||||
|
|
||||||
|
extension _$SqliteDbNpLog on SqliteDb {
|
||||||
|
// ignore: unused_element
|
||||||
|
Logger get _log => _$logSqliteDb;
|
||||||
|
}
|
||||||
|
|
|
@ -16,6 +16,9 @@ import 'package:nc_photos/mobile/platform.dart'
|
||||||
if (dart.library.html) 'package:nc_photos/web/platform.dart' as platform;
|
if (dart.library.html) 'package:nc_photos/web/platform.dart' as platform;
|
||||||
import 'package:nc_photos/object_extension.dart';
|
import 'package:nc_photos/object_extension.dart';
|
||||||
import 'package:nc_photos/platform/k.dart' as platform_k;
|
import 'package:nc_photos/platform/k.dart' as platform_k;
|
||||||
|
import 'package:np_codegen/np_codegen.dart';
|
||||||
|
|
||||||
|
part 'sqlite_table_extension.g.dart';
|
||||||
|
|
||||||
const maxByFileIdsSize = 30000;
|
const maxByFileIdsSize = 30000;
|
||||||
|
|
||||||
|
@ -92,6 +95,7 @@ class AccountFileRowIdsWithFileId {
|
||||||
final int fileId;
|
final int fileId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@npLog
|
||||||
extension SqliteDbExtension on SqliteDb {
|
extension SqliteDbExtension on SqliteDb {
|
||||||
/// Start a transaction and run [block]
|
/// Start a transaction and run [block]
|
||||||
///
|
///
|
||||||
|
@ -586,8 +590,6 @@ extension SqliteDbExtension on SqliteDb {
|
||||||
.map<Expression<bool?>>((m) => files.contentType.equals(m))
|
.map<Expression<bool?>>((m) => files.contentType.equals(m))
|
||||||
.reduce((value, element) => value | element);
|
.reduce((value, element) => value | element);
|
||||||
}
|
}
|
||||||
|
|
||||||
static final _log = Logger("entity.sqlite_table_extension.SqliteDbExtension");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
enum FilesQueryMode {
|
enum FilesQueryMode {
|
||||||
|
|
16
app/lib/entity/sqlite_table_extension.g.dart
Normal file
16
app/lib/entity/sqlite_table_extension.g.dart
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
|
||||||
|
part of 'sqlite_table_extension.dart';
|
||||||
|
|
||||||
|
// **************************************************************************
|
||||||
|
// NpLogGenerator
|
||||||
|
// **************************************************************************
|
||||||
|
|
||||||
|
// ignore: non_constant_identifier_names
|
||||||
|
final _$logSqliteDbExtension =
|
||||||
|
Logger("entity.sqlite_table_extension.SqliteDbExtension");
|
||||||
|
|
||||||
|
extension _$SqliteDbExtensionNpLog on SqliteDb {
|
||||||
|
// ignore: unused_element
|
||||||
|
Logger get _log => _$logSqliteDbExtension;
|
||||||
|
}
|
|
@ -8,8 +8,12 @@ import 'package:nc_photos/entity/sqlite_table_extension.dart' as sql;
|
||||||
import 'package:nc_photos/entity/tag.dart';
|
import 'package:nc_photos/entity/tag.dart';
|
||||||
import 'package:nc_photos/entity/webdav_response_parser.dart';
|
import 'package:nc_photos/entity/webdav_response_parser.dart';
|
||||||
import 'package:nc_photos/exception.dart';
|
import 'package:nc_photos/exception.dart';
|
||||||
|
import 'package:np_codegen/np_codegen.dart';
|
||||||
import 'package:xml/xml.dart';
|
import 'package:xml/xml.dart';
|
||||||
|
|
||||||
|
part 'data_source.g.dart';
|
||||||
|
|
||||||
|
@npLog
|
||||||
class TagRemoteDataSource implements TagDataSource {
|
class TagRemoteDataSource implements TagDataSource {
|
||||||
const TagRemoteDataSource();
|
const TagRemoteDataSource();
|
||||||
|
|
||||||
|
@ -55,10 +59,9 @@ class TagRemoteDataSource implements TagDataSource {
|
||||||
final xml = XmlDocument.parse(response.body);
|
final xml = XmlDocument.parse(response.body);
|
||||||
return WebdavResponseParser().parseTags(xml);
|
return WebdavResponseParser().parseTags(xml);
|
||||||
}
|
}
|
||||||
|
|
||||||
static final _log = Logger("entity.tag.data_source.TagRemoteDataSource");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@npLog
|
||||||
class TagSqliteDbDataSource implements TagDataSource {
|
class TagSqliteDbDataSource implements TagDataSource {
|
||||||
const TagSqliteDbDataSource(this.sqliteDb);
|
const TagSqliteDbDataSource(this.sqliteDb);
|
||||||
|
|
||||||
|
@ -78,6 +81,4 @@ class TagSqliteDbDataSource implements TagDataSource {
|
||||||
}
|
}
|
||||||
|
|
||||||
final sql.SqliteDb sqliteDb;
|
final sql.SqliteDb sqliteDb;
|
||||||
|
|
||||||
static final _log = Logger("entity.tag.data_source.TagSqliteDbDataSource");
|
|
||||||
}
|
}
|
||||||
|
|
25
app/lib/entity/tag/data_source.g.dart
Normal file
25
app/lib/entity/tag/data_source.g.dart
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
|
||||||
|
part of 'data_source.dart';
|
||||||
|
|
||||||
|
// **************************************************************************
|
||||||
|
// NpLogGenerator
|
||||||
|
// **************************************************************************
|
||||||
|
|
||||||
|
// ignore: non_constant_identifier_names
|
||||||
|
final _$logTagRemoteDataSource =
|
||||||
|
Logger("entity.tag.data_source.TagRemoteDataSource");
|
||||||
|
|
||||||
|
extension _$TagRemoteDataSourceNpLog on TagRemoteDataSource {
|
||||||
|
// ignore: unused_element
|
||||||
|
Logger get _log => _$logTagRemoteDataSource;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ignore: non_constant_identifier_names
|
||||||
|
final _$logTagSqliteDbDataSource =
|
||||||
|
Logger("entity.tag.data_source.TagSqliteDbDataSource");
|
||||||
|
|
||||||
|
extension _$TagSqliteDbDataSourceNpLog on TagSqliteDbDataSource {
|
||||||
|
// ignore: unused_element
|
||||||
|
Logger get _log => _$logTagSqliteDbDataSource;
|
||||||
|
}
|
|
@ -7,8 +7,12 @@ import 'package:nc_photos/entity/tagged_file.dart';
|
||||||
import 'package:nc_photos/entity/webdav_response_parser.dart';
|
import 'package:nc_photos/entity/webdav_response_parser.dart';
|
||||||
import 'package:nc_photos/exception.dart';
|
import 'package:nc_photos/exception.dart';
|
||||||
import 'package:nc_photos/iterable_extension.dart';
|
import 'package:nc_photos/iterable_extension.dart';
|
||||||
|
import 'package:np_codegen/np_codegen.dart';
|
||||||
import 'package:xml/xml.dart';
|
import 'package:xml/xml.dart';
|
||||||
|
|
||||||
|
part 'data_source.g.dart';
|
||||||
|
|
||||||
|
@npLog
|
||||||
class TaggedFileRemoteDataSource implements TaggedFileDataSource {
|
class TaggedFileRemoteDataSource implements TaggedFileDataSource {
|
||||||
const TaggedFileRemoteDataSource();
|
const TaggedFileRemoteDataSource();
|
||||||
|
|
||||||
|
@ -31,7 +35,4 @@ class TaggedFileRemoteDataSource implements TaggedFileDataSource {
|
||||||
final xml = XmlDocument.parse(response.body);
|
final xml = XmlDocument.parse(response.body);
|
||||||
return WebdavResponseParser().parseTaggedFiles(xml);
|
return WebdavResponseParser().parseTaggedFiles(xml);
|
||||||
}
|
}
|
||||||
|
|
||||||
static final _log =
|
|
||||||
Logger("entity.tagged_file.data_source.TaggedFileRemoteDataSource");
|
|
||||||
}
|
}
|
||||||
|
|
16
app/lib/entity/tagged_file/data_source.g.dart
Normal file
16
app/lib/entity/tagged_file/data_source.g.dart
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
|
||||||
|
part of 'data_source.dart';
|
||||||
|
|
||||||
|
// **************************************************************************
|
||||||
|
// NpLogGenerator
|
||||||
|
// **************************************************************************
|
||||||
|
|
||||||
|
// ignore: non_constant_identifier_names
|
||||||
|
final _$logTaggedFileRemoteDataSource =
|
||||||
|
Logger("entity.tagged_file.data_source.TaggedFileRemoteDataSource");
|
||||||
|
|
||||||
|
extension _$TaggedFileRemoteDataSourceNpLog on TaggedFileRemoteDataSource {
|
||||||
|
// ignore: unused_element
|
||||||
|
Logger get _log => _$logTaggedFileRemoteDataSource;
|
||||||
|
}
|
|
@ -10,8 +10,12 @@ import 'package:nc_photos/entity/file.dart';
|
||||||
import 'package:nc_photos/entity/tag.dart';
|
import 'package:nc_photos/entity/tag.dart';
|
||||||
import 'package:nc_photos/entity/tagged_file.dart';
|
import 'package:nc_photos/entity/tagged_file.dart';
|
||||||
import 'package:nc_photos/string_extension.dart';
|
import 'package:nc_photos/string_extension.dart';
|
||||||
|
import 'package:np_codegen/np_codegen.dart';
|
||||||
import 'package:xml/xml.dart';
|
import 'package:xml/xml.dart';
|
||||||
|
|
||||||
|
part 'webdav_response_parser.g.dart';
|
||||||
|
|
||||||
|
@npLog
|
||||||
class WebdavResponseParser {
|
class WebdavResponseParser {
|
||||||
Future<List<File>> parseFiles(XmlDocument xml) =>
|
Future<List<File>> parseFiles(XmlDocument xml) =>
|
||||||
compute(_parseFilesIsolate, xml);
|
compute(_parseFilesIsolate, xml);
|
||||||
|
@ -295,9 +299,6 @@ class WebdavResponseParser {
|
||||||
}
|
}
|
||||||
|
|
||||||
var _namespaces = <String, String>{};
|
var _namespaces = <String, String>{};
|
||||||
|
|
||||||
static final _log =
|
|
||||||
Logger("entity.webdav_response_parser.WebdavResponseParser");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class _FilePropParser {
|
class _FilePropParser {
|
||||||
|
|
16
app/lib/entity/webdav_response_parser.g.dart
Normal file
16
app/lib/entity/webdav_response_parser.g.dart
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
|
||||||
|
part of 'webdav_response_parser.dart';
|
||||||
|
|
||||||
|
// **************************************************************************
|
||||||
|
// NpLogGenerator
|
||||||
|
// **************************************************************************
|
||||||
|
|
||||||
|
// ignore: non_constant_identifier_names
|
||||||
|
final _$logWebdavResponseParser =
|
||||||
|
Logger("entity.webdav_response_parser.WebdavResponseParser");
|
||||||
|
|
||||||
|
extension _$WebdavResponseParserNpLog on WebdavResponseParser {
|
||||||
|
// ignore: unused_element
|
||||||
|
Logger get _log => _$logWebdavResponseParser;
|
||||||
|
}
|
|
@ -42,7 +42,7 @@ class NativeEventListener<T> {
|
||||||
final void Function(T) listener;
|
final void Function(T) listener;
|
||||||
StreamSubscription<T>? _subscription;
|
StreamSubscription<T>? _subscription;
|
||||||
|
|
||||||
final _log = Logger("native_event.NativeEventListener<${T.runtimeType}>");
|
final _log = Logger("event.native_event.NativeEventListener<${T.runtimeType}>");
|
||||||
}
|
}
|
||||||
|
|
||||||
class FileExifUpdatedEvent {
|
class FileExifUpdatedEvent {
|
||||||
|
|
|
@ -6,6 +6,7 @@ import 'package:logging/logging.dart';
|
||||||
import 'package:nc_photos/account.dart';
|
import 'package:nc_photos/account.dart';
|
||||||
import 'package:nc_photos/api/api.dart';
|
import 'package:nc_photos/api/api.dart';
|
||||||
import 'package:nc_photos/exception.dart';
|
import 'package:nc_photos/exception.dart';
|
||||||
|
import 'package:np_codegen/np_codegen.dart';
|
||||||
import 'package:to_string/to_string.dart';
|
import 'package:to_string/to_string.dart';
|
||||||
|
|
||||||
part 'app_password_exchange_bloc.g.dart';
|
part 'app_password_exchange_bloc.g.dart';
|
||||||
|
@ -54,6 +55,7 @@ class AppPasswordExchangeBlocFailure extends AppPasswordExchangeBlocState {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Legacy sign in support, may be removed any time in the future
|
/// Legacy sign in support, may be removed any time in the future
|
||||||
|
@npLog
|
||||||
class AppPasswordExchangeBloc
|
class AppPasswordExchangeBloc
|
||||||
extends Bloc<AppPasswordExchangeBlocEvent, AppPasswordExchangeBlocState> {
|
extends Bloc<AppPasswordExchangeBlocEvent, AppPasswordExchangeBlocState> {
|
||||||
AppPasswordExchangeBloc() : super(const AppPasswordExchangeBlocInit()) {
|
AppPasswordExchangeBloc() : super(const AppPasswordExchangeBlocInit()) {
|
||||||
|
@ -126,6 +128,5 @@ class AppPasswordExchangeBloc
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static final _log =
|
static final _log = _$logAppPasswordExchangeBloc;
|
||||||
Logger("legacy.app_password_exchange_bloc.AppPasswordExchangeBloc");
|
|
||||||
}
|
}
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue