public NotificationsModel(IMastodonClient client) { this.client = client; streaming = this.client.GetUserStreaming(); StreamingStarted = streamingStarted.ToReadOnlyReactiveProperty(); StreamingStarting.DistinctUntilChanged().Subscribe(OnStreamingChanged); streaming.OnNotification += Streaming_OnNotification; }
protected TimelineModelBase(IMastodonClient client) { this.client = client; StreamingStarted = streamingStarted.ToReadOnlyReactiveProperty(); streaming = GetStreaming(); if (streaming != null) { streaming.OnUpdate += Streaming_OnUpdate; streaming.OnDelete += Streaming_OnDelete; } StreamingStarting.DistinctUntilChanged().Subscribe(OnStreamingChanged); }