mirror of
https://github.com/bitwarden/mobile
synced 2025-12-16 16:23:29 +00:00
run on main thread fixes
This commit is contained in:
@@ -174,7 +174,9 @@ namespace Bit.iOS.Autofill
|
||||
public override void TextChanged(UISearchBar searchBar, string searchText)
|
||||
{
|
||||
var cts = new CancellationTokenSource();
|
||||
Task.Run(async () =>
|
||||
Task.Run(() =>
|
||||
{
|
||||
NSRunLoop.Main.BeginInvokeOnMainThread(async () =>
|
||||
{
|
||||
if (!string.IsNullOrWhiteSpace(searchText))
|
||||
{
|
||||
@@ -194,6 +196,8 @@ namespace Bit.iOS.Autofill
|
||||
_controller.TableView.ReloadData();
|
||||
}
|
||||
catch (OperationCanceledException) { }
|
||||
_filterResultsCancellationTokenSource = cts;
|
||||
});
|
||||
}, cts.Token);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user