Skip to content

Commit 4d687f2

Browse files
committed
Remove unnecessary comments in UpdateDistributor
1 parent 78946f8 commit 4d687f2

File tree

1 file changed

+0
-23
lines changed

1 file changed

+0
-23
lines changed

src/RxTelegram.Bot/Api/UpdateDistributor.cs

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@ private void AddListener(UpdateType? type)
9090

9191
if (info.Listeners != 1) return;
9292
UpdateTrackerTypes();
93-
//info.Subscription = _tracker.Subscribe(info.Observer);
9493
}
9594
}
9695
private UpdateTypeInfo GetInfo(UpdateType? type)
@@ -105,9 +104,6 @@ private void RemoveListener(UpdateType? type)
105104
--info.Listeners;
106105
if (info.Listeners != 0) return;
107106

108-
//info.Subscription.Dispose();
109-
//info.Subscription = null;
110-
111107
UpdateTrackerTypes();
112108
}
113109
}
@@ -125,26 +121,10 @@ public void Set(IObservable<Update> tracker)
125121
//Setup current tracker to listen all messages before change to a new one
126122
var current = _tracker.Current;
127123
(current as ITrackerSetup)?.Set(null);
128-
//DisposeTrackerSubcription();
129-
//_tracker = tracker;
130124
UpdateTrackerTypes();
131125

132126
_tracker.OnNext(tracker);
133-
//SubscribeToTracker();
134127
}
135-
// public void DisposeTrackerSubcription()
136-
// {
137-
// _updateInfo.Subscription?.Dispose();
138-
// foreach (var info in _updateInfos.Values)
139-
// info.Subscription?.Dispose();
140-
// }
141-
// public void SubscribeToTracker()
142-
// {
143-
// if (_updateInfo.Listeners != 0)
144-
// _updateInfo.Subscription = _tracker.Subscribe(_updateInfo.Observer);
145-
// foreach (var info in _updateInfos.Values.Where(x => x.Observer != null))
146-
// info.Subscription = _tracker.Subscribe(info.Observer);
147-
// }
148128
private void UpdateTrackerTypes()
149129
{
150130
if (_tracker.Current is not ITrackerSetup setup) return;
@@ -169,8 +149,5 @@ void Dispose(bool explicitDisposing)
169149
sealed private class UpdateTypeInfo
170150
{
171151
public int Listeners { get; set; } = 0;
172-
// public IObserver<Update> Observer { get; set; } = null;
173-
// public IObservable<Update> Observable { get; set; } = null;
174-
// public IDisposable Subscription { get; set; } = null;
175152
}
176153
}

0 commit comments

Comments
 (0)