Skip to content
This repository was archived by the owner on Sep 11, 2023. It is now read-only.

Commit a479f08

Browse files
Fixed discord status to show 'idle' instead of the last open scipt
1 parent 400e0eb commit a479f08

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

UI/MainWindow.xaml.cs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -315,24 +315,24 @@ private void EditorObjectBrowserGridRow_WidthChanged(object sender, EventArgs e)
315315

316316
public void UpdateWindowTitle()
317317
{
318-
var ee = GetCurrentEditorElement();
319-
string outString;
320-
if (ee == null)
318+
var editor_elements = GetAllEditorElements();
319+
string outString = "SPCode";
320+
if (editor_elements == null)
321321
{
322-
outString = "SPCode";
323322
Program.discordClient.SetPresence(new RichPresence
323+
{
324+
State = "Idle",
325+
Timestamps = Program.discordTime,
326+
Assets = new Assets
324327
{
325-
State = "Idle",
326-
Timestamps = Program.discordTime,
327-
Assets = new Assets
328-
{
329-
LargeImageKey = "immagine"
330-
}
331-
});
328+
LargeImageKey = "immagine"
329+
}
330+
});
332331
}
333332
else
334333
{
335-
outString = ee.FullFilePath + " - SPCode";
334+
var currentEditorElement = GetCurrentEditorElement();
335+
outString = $"{currentEditorElement.FullFilePath} - {outString}";
336336
}
337337

338338
if (ServerIsRunning) outString = $"{outString} ({Program.Translations.GetLanguage("ServerRunning")})";

0 commit comments

Comments
 (0)