Added default background and optimized change methods
This commit is contained in:
@@ -17,6 +17,9 @@ public class DynamicBackgroundService
|
||||
|
||||
public Task Change(string url)
|
||||
{
|
||||
if(BackgroundImageUrl == url) // Prevent unnecessary updates
|
||||
return Task.CompletedTask;
|
||||
|
||||
BackgroundImageUrl = url;
|
||||
OnBackgroundImageChanged?.Invoke(this, null!);
|
||||
|
||||
@@ -25,6 +28,9 @@ public class DynamicBackgroundService
|
||||
|
||||
public Task Reset()
|
||||
{
|
||||
if(BackgroundImageUrl == DefaultBackgroundImageUrl) // Prevent unnecessary updates
|
||||
return Task.CompletedTask;
|
||||
|
||||
BackgroundImageUrl = DefaultBackgroundImageUrl;
|
||||
OnBackgroundImageChanged?.Invoke(this, null!);
|
||||
|
||||
|
||||
BIN
Moonlight/defaultstorage/resources/public/background/main.jpg
Normal file
BIN
Moonlight/defaultstorage/resources/public/background/main.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.2 MiB |
Reference in New Issue
Block a user