1
0
mirror of https://github.com/bitwarden/mobile synced 2025-12-14 15:23:35 +00:00

do searching

This commit is contained in:
Kyle Spearrin
2018-09-24 15:08:16 -04:00
parent 2870b8331e
commit 340d4ce714
2 changed files with 40 additions and 15 deletions

View File

@@ -7,6 +7,7 @@ using Bit.iOS.Core.Utilities;
using Bit.iOS.Core.Controllers;
using Bit.App.Resources;
using Bit.iOS.Core.Views;
using System.Threading;
namespace Bit.iOS.Autofill
{
@@ -158,20 +159,21 @@ namespace Bit.iOS.Autofill
}
}
}
}
public class SearchDelegate : UISearchBarDelegate
{
private readonly LoginSearchViewController _controller;
public SearchDelegate(LoginSearchViewController controller)
public class SearchDelegate : UISearchBarDelegate
{
_controller = controller;
}
private readonly LoginSearchViewController _controller;
public override void TextChanged(UISearchBar searchBar, string searchText)
{
System.Diagnostics.Debug.WriteLine("search text: " + searchText);
public SearchDelegate(LoginSearchViewController controller)
{
_controller = controller;
}
public override void TextChanged(UISearchBar searchBar, string searchText)
{
System.Diagnostics.Debug.WriteLine("search text: " + searchText);
((TableSource)_controller.TableView.Source).FilterResults(searchText, new CancellationToken());
}
}
}
}