we actually don't need any of the view model infrastructure

all the updates go over the observable list
This commit is contained in:
Bruno Windels 2021-06-03 21:00:25 +02:00
parent eab3c2d6dd
commit cc444fa207

View file

@ -16,9 +16,8 @@ limitations under the License.
import {ViewModel} from "../../../ViewModel.js";
import {ObservableMap} from "../../../../observable/map/ObservableMap.js";
export class ReactionsViewModel extends ViewModel {
export class ReactionsViewModel {
constructor(parentEntry) {
super();
this._parentEntry = parentEntry;
this._map = new ObservableMap();
this._reactions = this._map.sortValues((a, b) => a._compare(b));
@ -50,9 +49,8 @@ export class ReactionsViewModel extends ViewModel {
}
}
class ReactionViewModel extends ViewModel {
class ReactionViewModel {
constructor(key, annotation, parentEntry) {
super();
this._key = key;
this._annotation = annotation;
this._parentEntry = parentEntry;