mirror of
https://github.com/aljazceru/notedeck.git
synced 2025-12-19 01:24:21 +01:00
increment sub count when necessary
Signed-off-by: kernelkind <kernelkind@gmail.com>
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user