File tree Expand file tree Collapse file tree 2 files changed +3
-5
lines changed
Flow.Launcher.Core/Resource
Plugins/Flow.Launcher.Plugin.Sys Expand file tree Collapse file tree 2 files changed +3
-5
lines changed Original file line number Diff line number Diff line change 12
12
using Flow . Launcher . Infrastructure ;
13
13
using Flow . Launcher . Infrastructure . Logger ;
14
14
using Flow . Launcher . Infrastructure . UserSettings ;
15
- using CommunityToolkit . Mvvm . DependencyInjection ;
16
15
using Flow . Launcher . Plugin ;
17
16
18
17
namespace Flow . Launcher . Core . Resource
@@ -35,6 +34,8 @@ public class Theme
35
34
private string DirectoryPath => Path . Combine ( Constant . ProgramDirectory , Folder ) ;
36
35
private string UserDirectoryPath => Path . Combine ( DataLocation . DataDirectory ( ) , Folder ) ;
37
36
37
+ public string CurrentTheme => _settings . Theme ;
38
+
38
39
public bool BlurEnabled { get ; set ; }
39
40
40
41
private double mainWindowWidth ;
Original file line number Diff line number Diff line change 3
3
using System . Linq ;
4
4
using CommunityToolkit . Mvvm . DependencyInjection ;
5
5
using Flow . Launcher . Core . Resource ;
6
- using Flow . Launcher . Infrastructure . UserSettings ;
7
6
8
7
namespace Flow . Launcher . Plugin . Sys
9
8
{
10
9
public class ThemeSelector : IDisposable
11
10
{
12
11
public const string Keyword = "fltheme" ;
13
12
14
- private readonly Settings _settings ;
15
13
private readonly Theme _theme ;
16
14
private readonly PluginInitContext _context ;
17
15
@@ -21,7 +19,6 @@ public ThemeSelector(PluginInitContext context)
21
19
{
22
20
_context = context ;
23
21
_theme = Ioc . Default . GetRequiredService < Theme > ( ) ;
24
- _settings = Ioc . Default . GetRequiredService < Settings > ( ) ;
25
22
context . API . VisibilityChanged += OnVisibilityChanged ;
26
23
}
27
24
@@ -69,7 +66,7 @@ private void LoadThemes()
69
66
private Result CreateThemeResult ( string theme , int score , IList < int > highlightData )
70
67
{
71
68
string title ;
72
- if ( theme == _settings . Theme )
69
+ if ( theme == _theme . CurrentTheme )
73
70
{
74
71
title = $ "{ theme } ★";
75
72
score = 2000 ;
You can’t perform that action at this time.
0 commit comments