mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
notify change of SearchSource's image after selection
This commit is contained in:
parent
e2dff94f7c
commit
8f8b2d7ff8
2 changed files with 6 additions and 2 deletions
|
|
@ -47,6 +47,8 @@ namespace Flow.Launcher.Plugin.WebSearch
|
|||
[JsonIgnore]
|
||||
public ImageSource Image => ImageLoader.Load(IconPath);
|
||||
|
||||
internal void NotifyImageChange() => OnPropertyChanged(nameof(Image));
|
||||
|
||||
public string Url { get; set; }
|
||||
public bool Enabled { get; set; }
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
using Flow.Launcher.Infrastructure;
|
||||
using Flow.Launcher.Infrastructure;
|
||||
using Flow.Launcher.Infrastructure.UserSettings;
|
||||
using System;
|
||||
using System.IO;
|
||||
|
|
@ -6,7 +6,7 @@ using System.Windows.Forms;
|
|||
|
||||
namespace Flow.Launcher.Plugin.WebSearch
|
||||
{
|
||||
public class SearchSourceViewModel
|
||||
public class SearchSourceViewModel : BaseModel
|
||||
{
|
||||
private readonly string destinationDirectory =
|
||||
Path.Combine(DataLocation.DataDirectory(), @"Settings\Plugins\Flow.Launcher.Plugin.WebSearch\IconImages");
|
||||
|
|
@ -30,6 +30,8 @@ namespace Flow.Launcher.Plugin.WebSearch
|
|||
Directory.CreateDirectory(destinationDirectory);
|
||||
|
||||
File.Copy(fullpathToSelectedImage, destinationFileNameFullPath);
|
||||
|
||||
selectedSearchSource.NotifyImageChange();
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue