Updated a couple of variables for better memory use. Added Support for ignoring specific streamers Moved to using a SingletonFactory for Singlton Classes No Longer Using MessageBox for disconnected message Added better detection for disconnected to stop it poping with other problems Added Window and menu option to open window to manage ignored streamers
30 lines
885 B
C#
30 lines
885 B
C#
using Microsoft.Toolkit.Uwp.Notifications;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using System.Xml.Linq;
|
|
using TwitchDesktopNotifications.JsonStructure.Helix;
|
|
|
|
namespace TwitchDesktopNotifications.Core
|
|
{
|
|
internal class NotifyManager
|
|
{
|
|
|
|
public static Boolean ShouldNotify(String streamerName)
|
|
{
|
|
if(DataStore.GetInstance().Store.SteamersToIgnore == null || DataStore.GetInstance().Store.SteamersToIgnore.Streamers == null) {
|
|
return true;
|
|
}
|
|
return !UIStreamer.GetCreateStreamer(streamerName).IsIgnored;
|
|
}
|
|
|
|
public static void AddStreamerToIgnoreList(string streamerName)
|
|
{
|
|
UIStreamer.GetCreateStreamer(streamerName).IsIgnored = true;
|
|
DataStore.GetInstance().Save();
|
|
}
|
|
}
|
|
}
|