Skip to content

Commit d14fa39

Browse files
Fixed icon selection issue on samples
1 parent dea5fad commit d14fa39

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

10.0/Apps/DeveloperBalance/PageModels/ProjectDetailPageModel.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,14 @@ private async Task LoadData(int id)
142142
Tasks = _project.Tasks;
143143

144144
Icon.Icon = _project.Icon;
145+
foreach (var icon in Icons)
146+
{
147+
if (icon.Icon == _project.Icon)
148+
{
149+
Icon = icon;
150+
break;
151+
}
152+
}
145153

146154
Categories = await _categoryRepository.ListAsync();
147155
Category = Categories?.FirstOrDefault(c => c.ID == _project.CategoryID);

9.0/Apps/DeveloperBalance/PageModels/ProjectDetailPageModel.cs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,14 @@ private async Task LoadData(int id)
141141
Description = _project.Description;
142142
Tasks = _project.Tasks;
143143

144-
Icon.Icon = _project.Icon;
144+
foreach (var icon in Icons)
145+
{
146+
if (icon.Icon == _project.Icon)
147+
{
148+
Icon = icon;
149+
break;
150+
}
151+
}
145152

146153
Categories = await _categoryRepository.ListAsync();
147154
Category = Categories?.FirstOrDefault(c => c.ID == _project.CategoryID);

0 commit comments

Comments
 (0)