mirror of
https://github.com/bitwarden/mobile
synced 2025-12-26 05:03:39 +00:00
selected icon loading optimizations
This commit is contained in:
@@ -67,15 +67,18 @@ namespace Bit.Android.Controls
|
||||
return;
|
||||
}
|
||||
|
||||
var selectedResource = IdFromTitle(string.Format("{0}_selected", icon), ResourceManager.DrawableClass);
|
||||
if(selected && selectedResource != 0)
|
||||
if(selected)
|
||||
{
|
||||
tab.SetIcon(selectedResource);
|
||||
}
|
||||
else
|
||||
{
|
||||
tab.SetIcon(IdFromTitle(icon, ResourceManager.DrawableClass));
|
||||
var selectedResource = IdFromTitle(string.Format("{0}_selected", icon), ResourceManager.DrawableClass);
|
||||
if(selectedResource != 0)
|
||||
{
|
||||
tab.SetIcon(selectedResource);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
var resource = IdFromTitle(icon, ResourceManager.DrawableClass);
|
||||
tab.SetIcon(resource);
|
||||
}
|
||||
|
||||
private int IdFromTitle(string title, Type type)
|
||||
|
||||
Reference in New Issue
Block a user