move typing feature up one level out of rooms.edus.
Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
@@ -73,11 +73,6 @@ impl Services<'_> {
|
||||
presence: rooms::edus::presence::Service {
|
||||
db,
|
||||
},
|
||||
typing: rooms::edus::typing::Service {
|
||||
typing: RwLock::new(BTreeMap::new()),
|
||||
last_typing_update: RwLock::new(BTreeMap::new()),
|
||||
typing_update_sender: broadcast::channel(100).0,
|
||||
},
|
||||
},
|
||||
event_handler: rooms::event_handler::Service,
|
||||
lazy_loading: rooms::lazy_loading::Service {
|
||||
@@ -130,6 +125,11 @@ impl Services<'_> {
|
||||
threads: rooms::threads::Service {
|
||||
db,
|
||||
},
|
||||
typing: rooms::typing::Service {
|
||||
typing: RwLock::new(BTreeMap::new()),
|
||||
last_typing_update: RwLock::new(BTreeMap::new()),
|
||||
typing_update_sender: broadcast::channel(100).0,
|
||||
},
|
||||
spaces: rooms::spaces::Service {
|
||||
roomid_spacehierarchy_cache: Mutex::new(LruCache::new(
|
||||
(100.0 * config.conduit_cache_capacity_modifier) as usize,
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
pub mod presence;
|
||||
pub mod typing;
|
||||
|
||||
pub trait Data: presence::Data + 'static {}
|
||||
|
||||
pub struct Service {
|
||||
pub presence: presence::Service,
|
||||
pub typing: typing::Service,
|
||||
}
|
||||
|
||||
@@ -17,6 +17,7 @@ pub mod state_cache;
|
||||
pub mod state_compressor;
|
||||
pub mod threads;
|
||||
pub mod timeline;
|
||||
pub mod typing;
|
||||
pub mod user;
|
||||
|
||||
pub trait Data:
|
||||
@@ -60,6 +61,7 @@ pub struct Service {
|
||||
pub state_compressor: state_compressor::Service,
|
||||
pub timeline: timeline::Service,
|
||||
pub threads: threads::Service,
|
||||
pub typing: typing::Service,
|
||||
pub spaces: spaces::Service,
|
||||
pub user: user::Service,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user