forked from rojo-rbx/rojo
Flip project field of LiveSession private to prepare for multi-project future
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
use std::{
|
||||
collections::HashSet,
|
||||
mem,
|
||||
sync::{Arc, Mutex},
|
||||
};
|
||||
@@ -32,7 +33,7 @@ impl_from!(LiveSessionError {
|
||||
|
||||
/// Contains all of the state for a Rojo live-sync session.
|
||||
pub struct LiveSession {
|
||||
pub project: Arc<Project>,
|
||||
project: Arc<Project>,
|
||||
pub session_id: SessionId,
|
||||
pub message_queue: Arc<MessageQueue<InstanceChanges>>,
|
||||
pub rbx_session: Arc<Mutex<RbxSession>>,
|
||||
@@ -83,4 +84,8 @@ impl LiveSession {
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn serve_place_ids(&self) -> &Option<HashSet<u64>> {
|
||||
&self.project.serve_place_ids
|
||||
}
|
||||
}
|
||||
@@ -145,7 +145,7 @@ impl ApiService {
|
||||
server_version: self.server_version,
|
||||
protocol_version: 2,
|
||||
session_id: self.live_session.session_id,
|
||||
expected_place_ids: self.live_session.project.serve_place_ids.clone(),
|
||||
expected_place_ids: self.live_session.serve_place_ids().clone(),
|
||||
root_instance_id: tree.get_root_id(),
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user