bug fix: allow to switch from custom icon to biult-in icon for groups

This commit is contained in:
Philipp Crocoll 2016-01-13 20:37:55 +01:00
parent 1c7535c8ed
commit bf08f19378

View File

@ -148,6 +148,8 @@ namespace keepass2android
String customIconIdString = data.Extras.GetString(IconPickerActivity.KeyCustomIconId); String customIconIdString = data.Extras.GetString(IconPickerActivity.KeyCustomIconId);
if (!String.IsNullOrEmpty(customIconIdString)) if (!String.IsNullOrEmpty(customIconIdString))
_selectedCustomIconId = new PwUuid(MemUtil.HexStringToByteArray(customIconIdString)); _selectedCustomIconId = new PwUuid(MemUtil.HexStringToByteArray(customIconIdString));
else
_selectedCustomIconId = PwUuid.Zero;
ImageButton currIconButton = (ImageButton) FindViewById(Resource.Id.icon_button); ImageButton currIconButton = (ImageButton) FindViewById(Resource.Id.icon_button);
App.Kp2a.GetDb().DrawableFactory.AssignDrawableTo(currIconButton, this, App.Kp2a.GetDb().KpDatabase, (PwIcon) _selectedIconId, _selectedCustomIconId, false); App.Kp2a.GetDb().DrawableFactory.AssignDrawableTo(currIconButton, this, App.Kp2a.GetDb().KpDatabase, (PwIcon) _selectedIconId, _selectedCustomIconId, false);