ente/lib/events/sync_status_update_event.dart

34 lines
634 B
Dart

import 'package:photos/events/event.dart';
class SyncStatusUpdate extends Event {
final SyncStatus status;
final int? completed;
final int? total;
final bool wasStopped;
final String reason;
final Error? error;
late int timestamp;
SyncStatusUpdate(
this.status, {
this.completed,
this.total,
this.wasStopped = false,
this.reason = "",
this.error,
}) {
timestamp = DateTime.now().microsecondsSinceEpoch;
}
}
enum SyncStatus {
startedFirstGalleryImport,
completedFirstGalleryImport,
applyingRemoteDiff,
preparingForUpload,
inProgress,
paused,
completedBackup,
error,
}