mirror of
https://github.com/aljazceru/notedeck.git
synced 2025-12-19 09:34:19 +01:00
increment sub count when necessary
Signed-off-by: kernelkind <kernelkind@gmail.com>
This commit is contained in:
@@ -121,8 +121,10 @@ impl Columns {
|
|||||||
let routes = intermediary_routes
|
let routes = intermediary_routes
|
||||||
.into_iter()
|
.into_iter()
|
||||||
.map(|r| match r {
|
.map(|r| match r {
|
||||||
IntermediaryRoute::Timeline(timeline) => {
|
IntermediaryRoute::Timeline(mut timeline) => {
|
||||||
let route = Route::timeline(timeline.kind.clone());
|
let route = Route::timeline(timeline.kind.clone());
|
||||||
|
|
||||||
|
timeline.subscription.increment();
|
||||||
timeline_cache
|
timeline_cache
|
||||||
.timelines
|
.timelines
|
||||||
.insert(timeline.kind.clone(), timeline);
|
.insert(timeline.kind.clone(), timeline);
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
use crate::{
|
use crate::{
|
||||||
actionbar::TimelineOpenResult,
|
actionbar::TimelineOpenResult,
|
||||||
error::Error,
|
error::Error,
|
||||||
//subscriptions::SubRefs,
|
|
||||||
timeline::{Timeline, TimelineKind},
|
timeline::{Timeline, TimelineKind},
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -105,7 +104,8 @@ impl TimelineCache {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub fn insert(&mut self, id: TimelineKind, timeline: Timeline) {
|
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;
|
return;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -205,6 +205,8 @@ impl TimelineCache {
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
timeline.subscription.increment();
|
||||||
|
|
||||||
open_result
|
open_result
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -486,6 +486,7 @@ pub fn setup_new_timeline(
|
|||||||
for relay in &mut pool.relays {
|
for relay in &mut pool.relays {
|
||||||
send_initial_timeline_filter(since_optimize, subs, relay, timeline, accounts);
|
send_initial_timeline_filter(since_optimize, subs, relay, timeline, accounts);
|
||||||
}
|
}
|
||||||
|
timeline.subscription.increment();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Send initial filters for a specific relay. This typically gets called
|
/// Send initial filters for a specific relay. This typically gets called
|
||||||
|
|||||||
Reference in New Issue
Block a user