Skip to content

Commit 43cef5d

Browse files
sharpninjaCopilot
andcommitted
Fix port input crash: default port to 7147, use LostFocus binding
Changed default port from 5000 to 7147. Changed TextBox bindings to UpdateSourceTrigger=LostFocus to prevent per-keystroke binding updates that could crash on Android. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 0c51407 commit 43cef5d

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

src/RequestTracker.Android/Views/ConnectionDialogView.axaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
<!-- Host -->
2626
<StackPanel Spacing="4">
2727
<TextBlock Text="Host" FontSize="13" FontWeight="Medium"/>
28-
<TextBox Text="{Binding Host}"
28+
<TextBox Text="{Binding Host, Mode=TwoWay, UpdateSourceTrigger=LostFocus}"
2929
Watermark="e.g. 192.168.1.100"
3030
FontSize="16" Padding="10,8"
3131
IsEnabled="{Binding !IsConnecting}"/>
@@ -34,8 +34,8 @@
3434
<!-- Port -->
3535
<StackPanel Spacing="4">
3636
<TextBlock Text="Port" FontSize="13" FontWeight="Medium"/>
37-
<TextBox Text="{Binding Port}"
38-
Watermark="e.g. 5000"
37+
<TextBox Text="{Binding Port, Mode=TwoWay, UpdateSourceTrigger=LostFocus}"
38+
Watermark="e.g. 7147"
3939
FontSize="16" Padding="10,8"
4040
IsEnabled="{Binding !IsConnecting}"/>
4141
</StackPanel>

src/RequestTracker.Core/ViewModels/ConnectionViewModel.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ public partial class ConnectionViewModel : ViewModelBase
1010
private string _host = "192.168.1.100";
1111

1212
[ObservableProperty]
13-
private string _port = "5000";
13+
private string _port = "7147";
1414

1515
[ObservableProperty]
1616
private string _errorMessage = "";

0 commit comments

Comments
 (0)