Init MemoryService
This commit is contained in:
parent
e35309b02e
commit
e753832a63
2 changed files with 4 additions and 2 deletions
|
@ -6,6 +6,7 @@ import 'package:photos/core/constants.dart';
|
|||
import 'package:photos/core/configuration.dart';
|
||||
import 'package:photos/favorite_files_repository.dart';
|
||||
import 'package:photos/folder_service.dart';
|
||||
import 'package:photos/memory_service.dart';
|
||||
import 'package:photos/photo_sync_manager.dart';
|
||||
import 'package:photos/ui/home_widget.dart';
|
||||
import 'package:sentry/sentry.dart';
|
||||
|
@ -28,7 +29,8 @@ void _main() async {
|
|||
|
||||
await Configuration.instance.init();
|
||||
await PhotoSyncManager.instance.init();
|
||||
FavoriteFilesRepository.instance.init();
|
||||
await MemoryService.instance.init();
|
||||
await FavoriteFilesRepository.instance.init();
|
||||
_sync();
|
||||
|
||||
final SentryClient sentry = new SentryClient(dsn: SENTRY_DSN);
|
||||
|
|
|
@ -17,7 +17,7 @@ class MemoryService {
|
|||
|
||||
static final MemoryService instance = MemoryService._privateConstructor();
|
||||
|
||||
Future<void> sync() async {
|
||||
Future<void> init() async {
|
||||
await _memoriesDB.clearMemoriesSeenBeforeTime(
|
||||
DateTime.now().microsecondsSinceEpoch - (7 * microSecondsInADay));
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue