we actually don't need any of the view model infrastructure
all the updates go over the observable list
This commit is contained in:
parent
eab3c2d6dd
commit
cc444fa207
1 changed files with 2 additions and 4 deletions
|
@ -16,9 +16,8 @@ limitations under the License.
|
||||||
import {ViewModel} from "../../../ViewModel.js";
|
import {ViewModel} from "../../../ViewModel.js";
|
||||||
import {ObservableMap} from "../../../../observable/map/ObservableMap.js";
|
import {ObservableMap} from "../../../../observable/map/ObservableMap.js";
|
||||||
|
|
||||||
export class ReactionsViewModel extends ViewModel {
|
export class ReactionsViewModel {
|
||||||
constructor(parentEntry) {
|
constructor(parentEntry) {
|
||||||
super();
|
|
||||||
this._parentEntry = parentEntry;
|
this._parentEntry = parentEntry;
|
||||||
this._map = new ObservableMap();
|
this._map = new ObservableMap();
|
||||||
this._reactions = this._map.sortValues((a, b) => a._compare(b));
|
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) {
|
constructor(key, annotation, parentEntry) {
|
||||||
super();
|
|
||||||
this._key = key;
|
this._key = key;
|
||||||
this._annotation = annotation;
|
this._annotation = annotation;
|
||||||
this._parentEntry = parentEntry;
|
this._parentEntry = parentEntry;
|
||||||
|
|
Reference in a new issue