Skip to content

Commit 4787f56

Browse files
authored
Merge pull request #389 from Assistant/yfp
Yfp
2 parents f7e4baa + 48d0b29 commit 4787f56

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

ModAssistant/Classes/Promotions.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ namespace ModAssistant
44
{
55
class Promotions
66
{
7-
public static Promotion[] ActivePromotions =
7+
public static Promotion[] List =
88
{
99
new Promotion
1010
{
@@ -14,6 +14,7 @@ class Promotions
1414
new PromotionLink{Text = "iOS", Link = "https://bit.ly/yuriphone", TextAfterLink = " and " },
1515
new PromotionLink{Text = "Android", Link = "https://play.google.com/store/apps/details?id=com.yur", TextAfterLink = "!" }
1616
},
17+
Active = false
1718
}
1819
};
1920
}
@@ -22,6 +23,7 @@ class Promotion
2223
{
2324
public string ModName;
2425
public List<PromotionLink> Links;
26+
public bool Active;
2527
}
2628

2729
class PromotionLink

ModAssistant/Pages/Mods.xaml.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -298,9 +298,9 @@ public async Task PopulateModsList()
298298
Category = mod.category
299299
};
300300

301-
foreach (Promotion promo in Promotions.ActivePromotions)
301+
foreach (Promotion promo in Promotions.List)
302302
{
303-
if (mod.name == promo.ModName)
303+
if (promo.Active && mod.name == promo.ModName)
304304
{
305305
ListItem.PromotionTexts = new string[promo.Links.Count];
306306
ListItem.PromotionLinks = new string[promo.Links.Count];

0 commit comments

Comments
 (0)