Skip to content

Commit dd4e7d5

Browse files
committed
Clear contact name and number boxes on navigate to
1 parent 6aa1cb2 commit dd4e7d5

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Signal-Windows/ViewModels/AddContactPageViewModel.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,14 @@ public class AddContactPageViewModel : ViewModelBase
3232
public MainPageViewModel MainPageVM;
3333
public AddContactPage View;
3434

35-
private string _ContactName = "";
35+
private string _ContactName = string.Empty;
3636
public string ContactName
3737
{
3838
get { return _ContactName; }
3939
set { _ContactName = value; RaisePropertyChanged(nameof(ContactName)); }
4040
}
4141

42-
private string _ContactNumber = "";
42+
private string _ContactNumber = string.Empty;
4343
public string ContactNumber
4444
{
4545
get { return _ContactNumber; }
@@ -104,6 +104,8 @@ private bool ValidNumber
104104

105105
public async Task OnNavigatedTo(CancellationToken? cancellationToken = null)
106106
{
107+
ContactName = string.Empty;
108+
ContactNumber = string.Empty;
107109
await RefreshContacts(cancellationToken);
108110
}
109111

0 commit comments

Comments
 (0)