Skip to content

Commit 1bd2039

Browse files
Code cleanup, hoping tests work on CI after?
1 parent 0708af8 commit 1bd2039

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/Core/src/Handlers/SearchBar/SearchBarHandler.iOS.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ void OnSearchButtonClicked(object? sender, EventArgs e)
211211

212212
void OnTextPropertySet(object? sender, UISearchBarTextChangedEventArgs a)
213213
{
214-
if (VirtualView is ISearchBar virtualView && sender is MauiSearchBar platformView)
214+
if (VirtualView is ISearchBar virtualView)
215215
{
216216
virtualView.UpdateText(a.SearchText);
217217

@@ -230,8 +230,8 @@ bool ShouldChangeText(UISearchBar searchBar, NSRange range, string text)
230230

231231
void OnEditingStarted(object? sender, EventArgs e)
232232
{
233-
if (VirtualView is not null)
234-
VirtualView.IsFocused = true;
233+
if (VirtualView is ISearchBar virtualView)
234+
virtualView.IsFocused = true;
235235
}
236236

237237
void OnEditingChanged(object? sender, EventArgs e)
@@ -244,8 +244,8 @@ void OnEditingChanged(object? sender, EventArgs e)
244244

245245
void OnEditingStopped(object? sender, EventArgs e)
246246
{
247-
if (VirtualView is not null)
248-
VirtualView.IsFocused = false;
247+
if (VirtualView is ISearchBar virtualView)
248+
virtualView.IsFocused = false;
249249
}
250250
}
251251
}

0 commit comments

Comments
 (0)