Skip to content
Merged

Yfp #389

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion ModAssistant/Classes/Promotions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ namespace ModAssistant
{
class Promotions
{
public static Promotion[] ActivePromotions =
public static Promotion[] List =
{
new Promotion
{
Expand All @@ -14,6 +14,7 @@ class Promotions
new PromotionLink{Text = "iOS", Link = "https://bit.ly/yuriphone", TextAfterLink = " and " },
new PromotionLink{Text = "Android", Link = "https://play.google.com/store/apps/details?id=com.yur", TextAfterLink = "!" }
},
Active = false
}
};
}
Expand All @@ -22,6 +23,7 @@ class Promotion
{
public string ModName;
public List<PromotionLink> Links;
public bool Active;
}

class PromotionLink
Expand Down
4 changes: 2 additions & 2 deletions ModAssistant/Pages/Mods.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -298,9 +298,9 @@ public async Task PopulateModsList()
Category = mod.category
};

foreach (Promotion promo in Promotions.ActivePromotions)
foreach (Promotion promo in Promotions.List)
{
if (mod.name == promo.ModName)
if (promo.Active && mod.name == promo.ModName)
{
ListItem.PromotionTexts = new string[promo.Links.Count];
ListItem.PromotionLinks = new string[promo.Links.Count];
Expand Down