ente/lib/events/sync_status_update_event.dart

34 lines
634 B
Dart
Raw Normal View History

2020-11-12 16:32:10 +00:00
import 'package:photos/events/event.dart';
class SyncStatusUpdate extends Event {
2020-11-15 07:19:51 +00:00
final SyncStatus status;
final int? completed;
final int? total;
final bool wasStopped;
2020-11-16 16:35:16 +00:00
final String reason;
final Error? error;
late int timestamp;
2020-11-15 07:19:51 +00:00
SyncStatusUpdate(
this.status, {
this.completed,
this.total,
this.wasStopped = false,
2020-11-16 16:35:16 +00:00
this.reason = "",
this.error,
}) {
2021-07-22 18:41:58 +00:00
timestamp = DateTime.now().microsecondsSinceEpoch;
}
}
2020-11-15 07:19:51 +00:00
enum SyncStatus {
2022-07-03 07:47:15 +00:00
startedFirstGalleryImport,
completedFirstGalleryImport,
applyingRemoteDiff,
preparingForUpload,
inProgress,
2020-11-16 16:35:16 +00:00
paused,
2022-07-03 07:47:15 +00:00
completedBackup,
2020-11-15 07:19:51 +00:00
error,
}