This repository has been archived on 2022-08-19. You can view files and clone it, but cannot push or open issues or pull requests.
hydrogen-web/src/domain/session/room/timeline/UpdateAction.js
Bruno Windels 001dbefbcf stop using default exports
because it becomes hard to remember where you used them and where not
2020-04-20 21:26:39 +02:00

32 lines
637 B
JavaScript

export class UpdateAction {
constructor(remove, update, updateParams) {
this._remove = remove;
this._update = update;
this._updateParams = updateParams;
}
get shouldRemove() {
return this._remove;
}
get shouldUpdate() {
return this._update;
}
get updateParams() {
return this._updateParams;
}
static Remove() {
return new UpdateAction(true, false, null);
}
static Update(newParams) {
return new UpdateAction(false, true, newParams);
}
static Nothing() {
return new UpdateAction(false, false, null);
}
}