@@ -660,28 +660,13 @@ extension PreferencesViewController {
660
660
isActivityInProgress = true
661
661
662
662
if availableTimezoneTableView. selectedRow == - 1 {
663
- messageLabel. stringValue = PreferencesConstants . noTimezoneSelectedErrorMessage
664
-
665
- Timer . scheduledTimer ( withTimeInterval: 5 ,
666
- repeats: false ) { _ in
667
- OperationQueue . main. addOperation {
668
- self . messageLabel. stringValue = CLEmptyString
669
- }
670
- }
671
-
663
+ timezonePanel. contentView? . makeToast ( PreferencesConstants . noTimezoneSelectedErrorMessage)
672
664
isActivityInProgress = false
673
665
return
674
666
}
675
667
676
668
if selectedTimeZones. count >= 100 {
677
- messageLabel. stringValue = PreferencesConstants . maxTimezonesErrorMessage
678
- Timer . scheduledTimer ( withTimeInterval: 5 ,
679
- repeats: false ) { _ in
680
- OperationQueue . main. addOperation {
681
- self . messageLabel. stringValue = CLEmptyString
682
- }
683
- }
684
-
669
+ timezonePanel. contentView? . makeToast ( PreferencesConstants . maxTimezonesErrorMessage)
685
670
isActivityInProgress = false
686
671
return
687
672
}
@@ -855,20 +840,12 @@ extension PreferencesViewController {
855
840
}
856
841
857
842
@IBAction func filterArray( _: Any ? ) {
858
- messageLabel. stringValue = CLEmptyString
859
-
860
843
searchResultsDataSource. cleanupFilterArray ( )
861
844
862
845
if searchField. stringValue. count > 50 {
863
846
isActivityInProgress = false
864
- messageLabel. stringValue = PreferencesConstants . maxCharactersAllowed
865
847
reloadSearchResults ( )
866
- Timer . scheduledTimer ( withTimeInterval: 5 ,
867
- repeats: false ) { _ in
868
- OperationQueue . main. addOperation {
869
- self . messageLabel. stringValue = CLEmptyString
870
- }
871
- }
848
+ timezonePanel. contentView? . makeToast ( PreferencesConstants . maxCharactersAllowed)
872
849
return
873
850
}
874
851
0 commit comments