Mailspring/app/internal_packages/activity/lib/test-data-source.es6

19 lines
318 B
Text
Raw Normal View History

export default class TestDataSource {
buildObservable() {
return this;
}
manuallyTrigger = (messages = []) => {
this.onNext(messages);
2017-09-27 02:33:08 +08:00
};
subscribe(onNext) {
this.onNext = onNext;
this.manuallyTrigger();
const dispose = () => {
this._unsub();
2017-09-27 02:33:08 +08:00
};
return { dispose };
}
}