Flip project field of LiveSession private to prepare for multi-project future

This commit is contained in:
Lucien Greathouse
2019-02-27 14:51:53 -08:00
parent 5073fce2f7
commit 16f8975b18
2 changed files with 7 additions and 2 deletions

View File

@@ -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
}
}

View File

@@ -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(),
})
}