Skip to content
Permalink
Browse files

Make discord presence optional

  • Loading branch information...
iCrawl committed Jul 15, 2018
1 parent 74cb661 commit 8a859a31f114d41a029e811a6b78f57141723b9e
Showing with 11 additions and 5 deletions.
  1. +7 −3 MainForm.cs
  2. +1 −1 Properties/AssemblyInfo.cs
  3. +3 −1 Settings.cs
@@ -208,7 +208,8 @@ public MainForm()
TaskbarManager.Instance.ThumbnailToolBars.AddButtons(this.Handle, button);
}

InitDiscordPresence();
if (Settings.Get<bool>(Setting.DiscordPresence))
InitDiscordPresence();

Connect();

@@ -687,8 +688,11 @@ void ProcessSongInfo(SongInfoResponseData songInfo)
else
picFavourite.Visible = false;

client.SetPresence(presence);
client.Invoke();
if (Settings.Get<bool>(Setting.DiscordPresence))
{
client.SetPresence(presence);
client.Invoke();
}
}

private async void Form1_FormClosing(object sender, FormClosingEventArgs e) => await Exit();
@@ -7,7 +7,7 @@
[assembly: AssemblyTitle("Listen.moe Client")]
[assembly: AssemblyProduct("Listen.moe Client")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyCopyright("Copyright 2017 Listen.moe. All rights reserved.")]
[assembly: AssemblyCopyright("Copyright 2017-2018 Listen.moe. All rights reserved.")]

// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
@@ -50,7 +50,8 @@ enum Setting
Volume,
OutputDeviceGuid,
Token,
Username
Username,
DiscordPresence
}

enum StreamType
@@ -202,6 +203,7 @@ private static void LoadDefaultSettings()
Set(Setting.CustomAccentColor, Color.FromArgb(255, 1, 91));

Set(Setting.StreamType, StreamType.Jpop);
Set(Setting.DiscordPresence, true);
}

public static void LoadSettings()

0 comments on commit 8a859a3

Please sign in to comment.
You can’t perform that action at this time.