increment sub count when necessary

Signed-off-by: kernelkind <kernelkind@gmail.com>
This commit is contained in:
kernelkind
2025-07-16 13:36:33 -04:00
parent 95e9e4326a
commit dc4e3d7510
3 changed files with 8 additions and 3 deletions

View File

@@ -1,7 +1,6 @@
use crate::{
actionbar::TimelineOpenResult,
error::Error,
//subscriptions::SubRefs,
timeline::{Timeline, TimelineKind},
};
@@ -105,7 +104,8 @@ impl TimelineCache {
}
pub fn insert(&mut self, id: TimelineKind, timeline: Timeline) {
if let Some(_cur_timeline) = self.timelines.get_mut(&id) {
if let Some(cur_timeline) = self.timelines.get_mut(&id) {
cur_timeline.subscription.increment();
return;
};
@@ -205,6 +205,8 @@ impl TimelineCache {
);
};
timeline.subscription.increment();
open_result
}