Skip to content

Commit f761108

Browse files
committed
Use api function in main project
1 parent 5165ce8 commit f761108

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

Flow.Launcher/MessageBoxEx.xaml.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ private static async Task SetImageOfMessageBoxAsync(MessageBoxImage icon)
156156
private async Task SetImageAsync(string imageName)
157157
{
158158
var imagePath = Path.Combine(Constant.ProgramDirectory, "Images", imageName);
159-
var imageSource = await ImageLoader.LoadAsync(imagePath);
159+
var imageSource = await App.API.LoadImageAsync(imagePath);
160160
Img.Source = imageSource;
161161
}
162162

Flow.Launcher/Msg.xaml.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public Msg()
4343

4444
private async System.Threading.Tasks.Task LoadImageAsync()
4545
{
46-
imgClose.Source = await ImageLoader.LoadAsync(Path.Combine(Infrastructure.Constant.ProgramDirectory, "Images\\close.png"));
46+
imgClose.Source = await App.API.LoadImageAsync(Path.Combine(Constant.ProgramDirectory, "Images\\close.png"));
4747
}
4848

4949
void imgClose_MouseUp(object sender, MouseButtonEventArgs e)
@@ -71,11 +71,11 @@ public async void Show(string title, string subTitle, string iconPath)
7171

7272
if (!File.Exists(iconPath))
7373
{
74-
imgIco.Source = await ImageLoader.LoadAsync(Path.Combine(Constant.ProgramDirectory, "Images\\app.png"));
74+
imgIco.Source = await App.API.LoadImageAsync(Path.Combine(Constant.ProgramDirectory, "Images\\app.png"));
7575
}
7676
else
7777
{
78-
imgIco.Source = await ImageLoader.LoadAsync(iconPath);
78+
imgIco.Source = await App.API.LoadImageAsync(iconPath);
7979
}
8080

8181
Show();

Flow.Launcher/ViewModel/MainViewModel.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1168,7 +1168,7 @@ private async Task QueryResultsAsync(bool searchDelay, bool isReQuery = false, b
11681168
else if (plugins.Count == 1)
11691169
{
11701170
PluginIconPath = plugins.Single().Metadata.IcoPath;
1171-
PluginIconSource = await ImageLoader.LoadAsync(PluginIconPath);
1171+
PluginIconSource = await App.API.LoadImageAsync(PluginIconPath);
11721172
SearchIconVisibility = Visibility.Hidden;
11731173
}
11741174
else

Flow.Launcher/ViewModel/PluginViewModel.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ private static string PluginManagerActionKeyword
4545

4646
private async Task LoadIconAsync()
4747
{
48-
Image = await ImageLoader.LoadAsync(PluginPair.Metadata.IcoPath);
48+
Image = await App.API.LoadImageAsync(PluginPair.Metadata.IcoPath);
4949
OnPropertyChanged(nameof(Image));
5050
}
5151

Flow.Launcher/ViewModel/ResultViewModel.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ private async Task<ImageSource> LoadImageInternalAsync(string imagePath, Result.
199199
}
200200
}
201201

202-
return await ImageLoader.LoadAsync(imagePath, loadFullImage).ConfigureAwait(false);
202+
return await App.API.LoadImageAsync(imagePath, loadFullImage).ConfigureAwait(false);
203203
}
204204

205205
private async Task LoadImageAsync()

0 commit comments

Comments
 (0)