mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-10-22 21:41:37 +00:00
Flip project field of LiveSession private to prepare for multi-project future
This commit is contained in:
parent
5073fce2f7
commit
16f8975b18
2 changed files with 7 additions and 2 deletions
|
|
@ -1,4 +1,5 @@
|
||||||
use std::{
|
use std::{
|
||||||
|
collections::HashSet,
|
||||||
mem,
|
mem,
|
||||||
sync::{Arc, Mutex},
|
sync::{Arc, Mutex},
|
||||||
};
|
};
|
||||||
|
|
@ -32,7 +33,7 @@ impl_from!(LiveSessionError {
|
||||||
|
|
||||||
/// Contains all of the state for a Rojo live-sync session.
|
/// Contains all of the state for a Rojo live-sync session.
|
||||||
pub struct LiveSession {
|
pub struct LiveSession {
|
||||||
pub project: Arc<Project>,
|
project: Arc<Project>,
|
||||||
pub session_id: SessionId,
|
pub session_id: SessionId,
|
||||||
pub message_queue: Arc<MessageQueue<InstanceChanges>>,
|
pub message_queue: Arc<MessageQueue<InstanceChanges>>,
|
||||||
pub rbx_session: Arc<Mutex<RbxSession>>,
|
pub rbx_session: Arc<Mutex<RbxSession>>,
|
||||||
|
|
@ -83,4 +84,8 @@ impl LiveSession {
|
||||||
|
|
||||||
Ok(())
|
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,
|
server_version: self.server_version,
|
||||||
protocol_version: 2,
|
protocol_version: 2,
|
||||||
session_id: self.live_session.session_id,
|
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(),
|
root_instance_id: tree.get_root_id(),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue