Skip to content

Commit

Permalink
DetailPageArgumentModel immutability 다시 적용
Browse files Browse the repository at this point in the history
DetailPageArgumentModel.CurrentSearchString을 기존의 다른 프로퍼티와 동일하게 setter 변경
  • Loading branch information
rkttu committed Oct 15, 2023
1 parent 2122af3 commit 970849b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 4 additions & 2 deletions src/TableCloth/Models/DetailPageArgumentModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ public DetailPageArgumentModel(
bool? installHancomOfficeViewer = default,
bool? installRaiDrive = default,
bool? enableInternetExplorerMode = default,
bool showCommandLineHelp = default)
bool showCommandLineHelp = default,
string currentSearchString = default)
{
SelectedService = selectedService;
EnableMicrophone = enableMicrophone;
Expand All @@ -38,6 +39,7 @@ public DetailPageArgumentModel(
EnableInternetExplorerMode = enableInternetExplorerMode;
ShowCommandLineHelp = showCommandLineHelp;
BuiltFromCommandLine = builtFromCommandLine;
CurrentSearchString = currentSearchString;
}

public bool BuiltFromCommandLine { get; private set; } = false;
Expand Down Expand Up @@ -66,7 +68,7 @@ public DetailPageArgumentModel(

public bool ShowCommandLineHelp { get; private set; }

public string CurrentSearchString { get; set; }
public string CurrentSearchString { get; private set; }

public TableClothConfiguration GetTableClothConfiguration()
{
Expand Down
4 changes: 2 additions & 2 deletions src/TableCloth/Pages/CatalogPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ private void SiteCatalog_KeyDown(object sender, KeyEventArgs e)
{
NavigationService.Navigate(
new Uri("Pages/DetailPage.xaml", UriKind.Relative),
new DetailPageArgumentModel(data, builtFromCommandLine: false) { CurrentSearchString = SiteCatalogFilter.Text });
new DetailPageArgumentModel(data, builtFromCommandLine: false, currentSearchString: SiteCatalogFilter.Text));
}
}
}
Expand All @@ -199,7 +199,7 @@ private void SiteCatalog_MouseDoubleClick(object sender, MouseButtonEventArgs e)
{
NavigationService.Navigate(
new Uri("Pages/DetailPage.xaml", UriKind.Relative),
new DetailPageArgumentModel(data, builtFromCommandLine: false) { CurrentSearchString = SiteCatalogFilter.Text });
new DetailPageArgumentModel(data, builtFromCommandLine: false, currentSearchString: SiteCatalogFilter.Text));
}
}

Expand Down

0 comments on commit 970849b

Please sign in to comment.