more refactors and logs page handling

This commit is contained in:
shenlong-tanwen
2024-10-23 02:30:46 +05:30
parent 8f47645cdb
commit a0afea04d8
90 changed files with 2386 additions and 584 deletions
@@ -4,17 +4,17 @@ import 'package:immich_mobile/domain/models/log.model.dart';
abstract interface class ILogRepository {
/// Inserts a new log into the DB
FutureOr<bool> create(LogMessage log);
Future<bool> create(LogMessage log);
/// Bulk insert logs into DB
FutureOr<bool> createAll(Iterable<LogMessage> log);
Future<bool> createAll(Iterable<LogMessage> log);
/// Fetches all logs
FutureOr<List<LogMessage>> getAll();
Future<List<LogMessage>> getAll();
/// Clears all logs
FutureOr<bool> deleteAll();
Future<bool> deleteAll();
/// Truncates the logs to the most recent [limit]. Defaults to recent 250 logs
FutureOr<void> truncate({int limit = 250});
Future<void> truncate({int limit = 250});
}