ente/lib/events/files_updated_event.dart

29 lines
562 B
Dart
Raw Normal View History

import 'package:photos/events/event.dart';
import 'package:photos/models/file.dart';
class FilesUpdatedEvent extends Event {
final List<File> updatedFiles;
2021-05-02 10:31:04 +00:00
final EventType type;
final String source;
2021-05-02 10:31:04 +00:00
FilesUpdatedEvent(
this.updatedFiles, {
2021-10-29 23:56:27 +00:00
this.type = EventType.addedOrUpdated,
this.source = "",
2021-05-02 10:31:04 +00:00
});
@override
2022-11-11 13:09:22 +00:00
String get reason => '$runtimeType{type: ${type.name}, "via": $source}';
2021-05-02 10:31:04 +00:00
}
enum EventType {
2021-10-29 23:56:27 +00:00
addedOrUpdated,
deletedFromDevice,
deletedFromRemote,
deletedFromEverywhere,
archived,
unarchived,
2022-10-27 07:23:45 +00:00
hide,
unhide,
2021-05-02 10:31:04 +00:00
}