Skip to content

Commit e6aa187

Browse files
committed
Reduce warnings
1 parent 18d2d04 commit e6aa187

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

Source/VisualPairCoding/VisualPairCoding.AvaloniaUI/EnterNamesWindow.axaml.cs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,6 @@ public EnterNamesForm(bool autostart, string configPath)
3939
return this.FindControl<MenuItem>("recentMenuItem");
4040
}
4141

42-
43-
4442
private TimeSpan GetSessionTotalDuration()
4543
{
4644
if (timePicker.SelectedTime.HasValue)
@@ -80,7 +78,7 @@ private void TotalDurationCheckBoxUnchecked(object sender, RoutedEventArgs e)
8078
private void OnClosed(object? sender, EventArgs e)
8179
{
8280
SessionConfigurationFolderHandler.SaveAsRecentSession(
83-
new SessionConfiguration(GetParticipants(), (int)minutesPerTurn.Value)
81+
new SessionConfiguration(GetParticipants(), (int)(minutesPerTurn.Value ?? 1))
8482
);
8583
}
8684

@@ -93,13 +91,14 @@ private void OpenAboutForm(object? sender, RoutedEventArgs args)
9391
private void OnMenuItemClicked(object? sender, RoutedEventArgs e)
9492
{
9593
MenuItem clickedMenuItem = (MenuItem)e.Source!;
96-
string subMenuHeader = clickedMenuItem.Header.ToString()!;
94+
string subMenuHeader = clickedMenuItem.Header!.ToString()!;
9795

9896
var sessionConfiguration = SessionConfigurationFolderHandler.LoadRecentSession(subMenuHeader);
9997

10098
LoadSessionIntoGui(sessionConfiguration);
10199
}
102-
private async void OnActivated(object? sender, EventArgs e)
100+
101+
private void OnActivated(object? sender, EventArgs e)
103102
{
104103
MenuItem recentSessionsMenuItem = GetRecentMenuItem();
105104

@@ -116,7 +115,6 @@ private async void OnActivated(object? sender, EventArgs e)
116115

117116
recentSessionsMenuItem.SelectedIndex = 0;
118117

119-
120118
if (_autostart)
121119
{
122120
RoutedEventArgs? args = e as RoutedEventArgs;

0 commit comments

Comments
 (0)