1
0
mirror of https://github.com/bitwarden/mobile synced 2025-12-16 08:13:20 +00:00

Fixed perf issues with IEnumerable. Fixed rate link and row heights for settings.

This commit is contained in:
Kyle Spearrin
2016-07-26 19:21:57 -04:00
parent 39b7420c52
commit 6371343dc5
4 changed files with 9 additions and 11 deletions

View File

@@ -42,7 +42,9 @@ namespace Bit.iOS.Extension
var siteService = Resolver.Resolve<ISiteService>();
var sites = await siteService.GetAllAsync();
var siteModels = sites.Select(s => new SiteViewModel(s));
filteredSiteModels = siteModels.Where(s => s.Domain != null && s.Domain.BaseDomain == Context.DomainName.BaseDomain);
filteredSiteModels = siteModels
.Where(s => s.Domain != null && s.Domain.BaseDomain == Context.DomainName.BaseDomain)
.ToList();
}
Debug.WriteLine("BW LOG, Filtered sites at " + sw.ElapsedMilliseconds + "ms.");
@@ -126,6 +128,7 @@ namespace Bit.iOS.Extension
{
Debug.WriteLine("BW Log, Make new cell for list.");
cell = new UITableViewCell(UITableViewCellStyle.Subtitle, CellIdentifier);
cell.DetailTextLabel.TextColor = cell.DetailTextLabel.TintColor = new UIColor(red: 0.47f, green: 0.47f, blue: 0.47f, alpha: 1.0f);
}
return cell;
}
@@ -140,7 +143,6 @@ namespace Bit.iOS.Extension
var item = _tableItems.ElementAt(indexPath.Row);
cell.TextLabel.Text = item.Name;
cell.DetailTextLabel.Text = item.Username;
cell.DetailTextLabel.TextColor = cell.DetailTextLabel.TintColor = new UIColor(red: 0.47f, green: 0.47f, blue: 0.47f, alpha: 1.0f);
}
public override void RowSelected(UITableView tableView, NSIndexPath indexPath)