feat: finished new logging feature

This commit is contained in:
Anton Stubenbord
2023-10-12 17:50:13 +02:00
parent f0c3ced804
commit 7d1c0dffe4
37 changed files with 1446 additions and 720 deletions

View File

@@ -32,7 +32,7 @@ class ConsumptionChangeNotifier extends ChangeNotifier {
return [];
}
final consumptionDirectory =
await FileService.getConsumptionDirectory(userId: userId);
await FileService.instance.getConsumptionDirectory(userId: userId);
final List<File> localFiles = [];
for (final file in files) {
if (!file.path.startsWith(consumptionDirectory.path)) {
@@ -53,7 +53,7 @@ class ConsumptionChangeNotifier extends ChangeNotifier {
required String userId,
}) async {
final consumptionDirectory =
await FileService.getConsumptionDirectory(userId: userId);
await FileService.instance.getConsumptionDirectory(userId: userId);
if (file.path.startsWith(consumptionDirectory.path)) {
await file.delete();
}
@@ -70,8 +70,8 @@ class ConsumptionChangeNotifier extends ChangeNotifier {
}
Future<List<File>> _getCurrentFiles(String userId) async {
final directory = await FileService.getConsumptionDirectory(userId: userId);
final files = await FileService.getAllFiles(directory);
return files;
final directory =
await FileService.instance.getConsumptionDirectory(userId: userId);
return await FileService.instance.getAllFiles(directory);
}
}

View File

@@ -85,7 +85,6 @@ class _EventListenerShellState extends State<EventListenerShell>
if (!currentUser.paperlessUser.canViewInbox || _inboxTimer != null) {
return;
}
cubit.refreshItemsInInboxCount(false);
_inboxTimer = Timer.periodic(30.seconds, (_) {
cubit.refreshItemsInInboxCount(false);
});