internal void changeFilterText(string filter)
 {
     var challengeFilter = new RegexFilter(filter);
     this.filterText = filter;
     applyNewChallengeFiltering(challengeFilter, completedBehaviour);
 }
 private void ChallengeViewItemChanged(object sender, PropertyChangedEventArgs e)
 {
     if (e.PropertyName == "IsDone")
     {
         PropertyChanged?.Invoke(this, new PropertyChangedEventArgs("CountCompleted"));
         if (completedBehaviour == CompletedBehaviour.HIDE)
         {
             var challengeFilter = new RegexFilter(filterText);
             applyNewChallengeFiltering(challengeFilter, completedBehaviour);
         }
         if (completedBehaviour == CompletedBehaviour.SORT_TO_END)
         {
             doAutoSort();
         }
     }
     PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(e.PropertyName));
 }
  public void changeCompletedBehaviour(CompletedBehaviour newBehaviour)
  {
      completedBehaviour = newBehaviour;
 
      var challengeFilter = new RegexFilter(filterText);
      applyNewChallengeFiltering(challengeFilter, newBehaviour);
      if (newBehaviour == CompletedBehaviour.SORT_TO_END)
      {
          doAutoSort();
      }
  }