Skip to content

Commit

Permalink
Language change fix
Browse files Browse the repository at this point in the history
  • Loading branch information
iboshkov committed May 1, 2017
1 parent dc5d7bd commit e9dee2c
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions OpenSubSearchWPF/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ public MainWindow()
private void OnPropertyChanged(object sender, PropertyChangedEventArgs e)
{
if (e.PropertyName == "isWorking")
if (vm.isWorking)
{
if (vm.isWorking)
{
transitioner.Content = new MetroProgressBar
{
Expand All @@ -69,13 +70,18 @@ private void OnPropertyChanged(object sender, PropertyChangedEventArgs e)
FontFamily = new FontFamily("Roboto Light")
};
}

} else if (e.PropertyName == "selectedLanguage")
{
searchTimer_Tick(null, null);
}
}

private async void searchTimer_Tick(object sender, EventArgs e)
{
searchTimer.Stop();
var query = vm.query;
if (query.Trim().Length == 0)
if (String.IsNullOrEmpty(query))
{
vm.subtitles = new List<Subtitle>();
vm.lastSearchType = SearchType.ST_NONE;
Expand Down

0 comments on commit e9dee2c

Please sign in to comment.