mirror of
https://github.com/bitwarden/android.git
synced 2024-12-25 02:18:27 +03:00
run on main thread fixes
This commit is contained in:
parent
f394eddc01
commit
44fe5af4fb
1 changed files with 18 additions and 14 deletions
|
@ -174,7 +174,9 @@ namespace Bit.iOS.Autofill
|
||||||
public override void TextChanged(UISearchBar searchBar, string searchText)
|
public override void TextChanged(UISearchBar searchBar, string searchText)
|
||||||
{
|
{
|
||||||
var cts = new CancellationTokenSource();
|
var cts = new CancellationTokenSource();
|
||||||
Task.Run(async () =>
|
Task.Run(() =>
|
||||||
|
{
|
||||||
|
NSRunLoop.Main.BeginInvokeOnMainThread(async () =>
|
||||||
{
|
{
|
||||||
if (!string.IsNullOrWhiteSpace(searchText))
|
if (!string.IsNullOrWhiteSpace(searchText))
|
||||||
{
|
{
|
||||||
|
@ -194,6 +196,8 @@ namespace Bit.iOS.Autofill
|
||||||
_controller.TableView.ReloadData();
|
_controller.TableView.ReloadData();
|
||||||
}
|
}
|
||||||
catch (OperationCanceledException) { }
|
catch (OperationCanceledException) { }
|
||||||
|
_filterResultsCancellationTokenSource = cts;
|
||||||
|
});
|
||||||
}, cts.Token);
|
}, cts.Token);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue