Added Support for Debug Logging

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
This commit is contained in:
Martin Barker
2023-02-21 21:25:38 +00:00
parent 03b620ecec
commit 49ea2ba2a6
25 changed files with 548 additions and 208 deletions

View File

@@ -7,7 +7,7 @@ using System.Threading.Tasks;
namespace TwitchDesktopNotifications.JsonStructure
{
internal class Authentication
public class Authentication
{
[JsonPropertyName("access_token")]
public string AccessToken { get; set; }

View File

@@ -7,7 +7,7 @@ using System.Threading.Tasks;
namespace TwitchDesktopNotifications.JsonStructure.Helix
{
internal class Pagination
public class Pagination
{
public Pagination() { }

View File

@@ -7,7 +7,7 @@ using System.Threading.Tasks;
namespace TwitchDesktopNotifications.JsonStructure.Helix
{
internal class Streams
public class Streams
{
public Streams() { }

View File

@@ -7,7 +7,7 @@ using System.Threading.Tasks;
namespace TwitchDesktopNotifications.JsonStructure.Helix
{
internal class StreamsData
public class StreamsData
{
public StreamsData() { }

View File

@@ -7,7 +7,7 @@ using System.Threading.Tasks;
namespace TwitchDesktopNotifications.JsonStructure.Helix
{
internal class User
public class User
{
public User() { }

View File

@@ -7,7 +7,7 @@ using System.Threading.Tasks;
namespace TwitchDesktopNotifications.JsonStructure.Helix
{
internal class UserData
public class UserData
{
public UserData() { }

View File

@@ -7,7 +7,7 @@ using System.Threading.Tasks;
namespace TwitchDesktopNotifications.JsonStructure.Helix
{
internal class UserFollows
public class UserFollows
{
public UserFollows() { }

View File

@@ -7,7 +7,7 @@ using System.Threading.Tasks;
namespace TwitchDesktopNotifications.JsonStructure.Helix
{
internal class UsersFollowsData
public class UsersFollowsData
{
public UsersFollowsData() { }

View File

@@ -0,0 +1,11 @@
using System.Text.Json.Serialization;
using TwitchDesktopNotifications.Core;
namespace TwitchDesktopNotifications.JsonStructure
{
public class SteamersToIgnore
{
[JsonPropertyName("IgnoredStreamers")]
public List<UIStreamer> Streamers { get; set; } = new List<UIStreamer>();
}
}

View File

@@ -1,13 +0,0 @@
using System.Text.Json.Serialization;
namespace TwitchDesktopNotifications.JsonStructure
{
internal class SteamersToNotify
{
[JsonPropertyName("notifyAll")]
public Boolean notifyAll = true;
[JsonPropertyName("notify")]
public List<String> Streamers { get; set; } = new List<String>();
}
}

View File

@@ -8,17 +8,28 @@ using TwitchDesktopNotifications.JsonStructure.Helix;
namespace TwitchDesktopNotifications.JsonStructure
{
internal class Store
public class Store
{
public Store() { }
[JsonPropertyName("ignore")]
public SteamersToIgnore ignore { get; set; }
[JsonPropertyName("authentication")]
public Authentication Authentication { get; set; }
[JsonPropertyName("user_data")]
public UserData UserData { get; set; }
[JsonPropertyName("notifications_for")]
public SteamersToNotify SteamersToNotify { get; set; };
[JsonIgnore]
public SteamersToIgnore SteamersToIgnore {
get {
if(ignore == null) { ignore = new SteamersToIgnore(); }
return ignore;
}
set {
ignore = value;
}
}
}
}