Skip to content

Commit

Permalink
Fixes #61
Browse files Browse the repository at this point in the history
  • Loading branch information
jimmyeao committed Jun 4, 2024
1 parent 2428d98 commit 572c04f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
7 changes: 7 additions & 0 deletions MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -360,11 +360,13 @@ public bool IsTeamsConnected
if (isTeamsConnected)
{
TeamsConnectionStatusChanged(isTeamsConnected);
_ = _mqttService.PublishConfigurations(null!, _settings);
Console.WriteLine("Teams is now connected");
}
else
{
TeamsConnectionStatusChanged(isTeamsConnected);
_= _mqttService.PublishConfigurations(null!, _settings);
Console.WriteLine("Teams is now disconnected");
}
}
Expand Down Expand Up @@ -849,6 +851,11 @@ private void TeamsConnectionStatusChanged(bool isConnected)
{
TeamsConnectionStatus.Text = isConnected ? "Teams: Connected" : "Teams: Disconnected";
_teamsStatusMenuItem.Header = "Teams Status: " + (isConnected ? "Connected" : "Disconnected");
if (_latestMeetingUpdate != null && _latestMeetingUpdate.MeetingState != null)
{
_latestMeetingUpdate.MeetingState.teamsRunning = isConnected;
}
_ = _mqttService.PublishConfigurations(_latestMeetingUpdate, _settings);
});
}

Expand Down
4 changes: 2 additions & 2 deletions TEAMS2HA.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
<TargetFramework>net7.0-windows</TargetFramework>
<Nullable>enable</Nullable>
<UseWPF>true</UseWPF>
<AssemblyVersion>1.1.0.746</AssemblyVersion>
<FileVersion>1.1.0.746</FileVersion>
<AssemblyVersion>1.1.0.751</AssemblyVersion>
<FileVersion>1.1.0.751</FileVersion>
<ApplicationIcon>Assets\Square150x150Logo.scale-200.ico</ApplicationIcon>
<Title>Teams2HA</Title>
<PackageIcon>Square150x150Logo.scale-200.png</PackageIcon>
Expand Down

0 comments on commit 572c04f

Please sign in to comment.