2021-04-23 21:37:04 +00:00
|
|
|
import 'package:photos/events/event.dart';
|
2023-08-25 04:39:30 +00:00
|
|
|
import 'package:photos/models/file/file.dart';
|
2021-04-23 21:37:04 +00:00
|
|
|
|
|
|
|
class FilesUpdatedEvent extends Event {
|
2023-08-24 16:56:24 +00:00
|
|
|
final List<EnteFile> updatedFiles;
|
2021-05-02 10:31:04 +00:00
|
|
|
final EventType type;
|
2022-11-11 11:30:37 +00:00
|
|
|
final String source;
|
2021-04-23 21:37:04 +00:00
|
|
|
|
2021-05-02 10:31:04 +00:00
|
|
|
FilesUpdatedEvent(
|
|
|
|
this.updatedFiles, {
|
2021-10-29 23:56:27 +00:00
|
|
|
this.type = EventType.addedOrUpdated,
|
2022-11-11 11:30:37 +00:00
|
|
|
this.source = "",
|
2021-05-02 10:31:04 +00:00
|
|
|
});
|
2022-11-11 11:30:37 +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,
|
2021-10-29 23:55:29 +00:00
|
|
|
archived,
|
|
|
|
unarchived,
|
2022-10-27 07:23:45 +00:00
|
|
|
hide,
|
|
|
|
unhide,
|
2023-06-22 10:51:56 +00:00
|
|
|
coverChanged,
|
2024-03-08 04:06:03 +00:00
|
|
|
peopleChanged,
|
2024-04-19 06:12:39 +00:00
|
|
|
peopleClusterChanged,
|
2021-05-02 10:31:04 +00:00
|
|
|
}
|