mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-12 03:05:01 +00:00
Updates from testing UI reconnecting to room after room properties update from Fusion
This commit is contained in:
@@ -877,10 +877,9 @@ namespace PepperDash.Essentials
|
||||
/// <summary>
|
||||
/// Helper for property setter. Sets the panel to the given room, latching up all functionality
|
||||
/// </summary>
|
||||
void SetCurrentRoom(EssentialsHuddleVtc1Room room)
|
||||
void RefreshCurrentRoom(EssentialsHuddleVtc1Room room)
|
||||
{
|
||||
if (_CurrentRoom == room) return;
|
||||
// Disconnect current (probably never called)
|
||||
|
||||
if (_CurrentRoom != null)
|
||||
{
|
||||
// Disconnect current room
|
||||
@@ -950,6 +949,27 @@ namespace PepperDash.Essentials
|
||||
}
|
||||
}
|
||||
|
||||
void SetCurrentRoom(EssentialsHuddleVtc1Room room)
|
||||
{
|
||||
if (_CurrentRoom == room) return;
|
||||
// Disconnect current (probably never called)
|
||||
|
||||
room.ConfigChanged -= room_ConfigChanged;
|
||||
room.ConfigChanged += room_ConfigChanged;
|
||||
|
||||
RefreshCurrentRoom(room);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Fires when room config of current room has changed. Meant to refresh room values to propegate any updates to UI
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
void room_ConfigChanged(object sender, EventArgs e)
|
||||
{
|
||||
RefreshCurrentRoom(_CurrentRoom);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user