diff --git a/web/src/canvas/canvas.ts b/web/src/canvas/canvas.ts index e9092bc..bc3de9a 100644 --- a/web/src/canvas/canvas.ts +++ b/web/src/canvas/canvas.ts @@ -30,9 +30,9 @@ export class Canvas { public readonly settings: SettingsData; public readonly showNetworkInfoboxObservable: Subject public readonly updateDatabaseInfoSubject: Subject - public readonly onCarouselTransitionStart: BehaviorSubject<[HatnoteVisService, Visualisation]> - public readonly onThemeHasChanged: BehaviorSubject<[HatnoteVisService, Visualisation]> - public readonly onCarouselTransitionEnd: BehaviorSubject<[HatnoteVisService, Visualisation]> + public readonly onCarouselTransitionStart: Subject<[HatnoteVisService, Visualisation]> + public readonly onThemeHasChanged: Subject<[HatnoteVisService, Visualisation]> + public readonly onCarouselTransitionEnd: Subject<[HatnoteVisService, Visualisation]> public readonly updateVersionSubject: Subject<[string, number]> public readonly newCircleSubject: Subject public readonly newBannerSubject: Subject @@ -62,9 +62,9 @@ export class Canvas { constructor(theme: VisualisationDirector, settings: SettingsData, newCircleSubject: Subject, showNetworkInfoboxObservable: Subject, updateVersionSubject: Subject<[string, number]>, - onCarouselTransitionStart: BehaviorSubject<[HatnoteVisService, Visualisation]>, - onCarouselTransitionMid: BehaviorSubject<[HatnoteVisService, Visualisation]>, - onCarouselTransitionEnd: BehaviorSubject<[HatnoteVisService, Visualisation]>, + onCarouselTransitionStart: Subject<[HatnoteVisService, Visualisation]>, + onCarouselTransitionMid: Subject<[HatnoteVisService, Visualisation]>, + onCarouselTransitionEnd: Subject<[HatnoteVisService, Visualisation]>, updateDatabaseInfoSubject: Subject, newBannerSubject: Subject, appContainer: Selection) { diff --git a/web/src/main.ts b/web/src/main.ts index bc27376..df32b23 100644 --- a/web/src/main.ts +++ b/web/src/main.ts @@ -32,9 +32,9 @@ function main(){ // create observables let newCircleSubject: Subject = new Subject() let newBannerSubject: Subject = new Subject() - let onCarouselTransitionStart: BehaviorSubject<[HatnoteVisService, Visualisation]> = new BehaviorSubject([theme.current_service_theme.id_name, theme.current_visualisation]) - let onCarouselTransitionMid: BehaviorSubject<[HatnoteVisService, Visualisation]> = new BehaviorSubject([theme.current_service_theme.id_name, theme.current_visualisation]) - let onCarouselTransitionEnd: BehaviorSubject<[HatnoteVisService, Visualisation]> = new BehaviorSubject([theme.current_service_theme.id_name, theme.current_visualisation]) + let onCarouselTransitionStart: Subject<[HatnoteVisService, Visualisation]> = new Subject() + let onCarouselTransitionMid: Subject<[HatnoteVisService, Visualisation]> = new Subject() + let onCarouselTransitionEnd: Subject<[HatnoteVisService, Visualisation]> = new Subject() let showWebsocketInfoboxSubject: Subject = new Subject() let updateDatabaseInfoSubject: Subject = new Subject() let updateVersionSubject: Subject<[string,number]> = new Subject() diff --git a/web/src/service_event/event_bridge.ts b/web/src/service_event/event_bridge.ts index 12529f5..429fa59 100644 --- a/web/src/service_event/event_bridge.ts +++ b/web/src/service_event/event_bridge.ts @@ -1,6 +1,6 @@ import {BloxbergTransformer} from "./bloxberg_transformer"; import {HatnoteAudio} from "../audio/hatnote_audio"; -import {BehaviorSubject, Subject} from "rxjs"; +import {Subject} from "rxjs"; import {BannerData, CircleData} from "../observable/model"; import {BloxbergWebsocketData, KeeperWebsocketData, MinervaWebsocketData, WebsocketEventInfo} from "../websocket/model"; import { @@ -24,8 +24,8 @@ export class EventBridge{ private audio: HatnoteAudio | undefined; private newCircleSubject: Subject; private newBannerSubject: Subject; - private onCarouselTransitionStart: BehaviorSubject<[HatnoteVisService, Visualisation]> - private onThemeHasChanged: BehaviorSubject<[HatnoteVisService, Visualisation]> + private onCarouselTransitionStart: Subject<[HatnoteVisService, Visualisation]> + private onThemeHasChanged: Subject<[HatnoteVisService, Visualisation]> private eventBuffer: EventBuffer; private updateVersionSubject: Subject<[string,number]> private _currentService: HatnoteVisService @@ -41,9 +41,9 @@ export class EventBridge{ } constructor(audio: HatnoteAudio | undefined, newCircleSubject: Subject, newBanenrSubject: Subject, updateVersionSubject: Subject<[string,number]>, - onCarouselTransitionStart: BehaviorSubject<[HatnoteVisService, Visualisation]>, - onCarouselTransitionMid: BehaviorSubject<[HatnoteVisService, Visualisation]>, - onCarouselTransitionEnd: BehaviorSubject<[HatnoteVisService, Visualisation]>, + onCarouselTransitionStart: Subject<[HatnoteVisService, Visualisation]>, + onCarouselTransitionMid: Subject<[HatnoteVisService, Visualisation]>, + onCarouselTransitionEnd: Subject<[HatnoteVisService, Visualisation]>, settings_data: SettingsData) { this.settings_data = settings_data this.event_delay_protection = settings_data.event_delay_protection