Compare commits

...

8 commits

Author SHA1 Message Date
Jack Ye
8125bb3086
Merge 95fc3eb489 into e8353f7648 2026-03-10 23:09:15 +00:00
Jack Ye
e8353f7648
Merge pull request #4339 from Flow-Launcher/copilot/fix-folder-search-action
Some checks failed
Build / build (push) Has been cancelled
Fix ArgumentException when editing a disabled Explorer action keyword
2026-03-10 23:29:51 +08:00
VictoriousRaptor
8d042d2134
Fix settings window is minimized when re-opened. (#4341)
* Fix settings window is minimized when re-opened

* Don't save minimized state
2026-03-10 22:50:40 +08:00
Jack Ye
a406eb83e1
Fix ReportWindow crash when log directory is empty or missing (#4338)
* Initial plan

* Fix ReportWindow crash when log directory is empty or doesn't exist

Co-authored-by: Jack251970 <53996452+Jack251970@users.noreply.github.com>

* Improve code comments

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-03-10 20:29:09 +08:00
copilot-swe-agent[bot]
531b45210a Fix exception when setting Folder Search action keyword in Explorer plugin
- Fix (false, false) case in EditActionKeyword to break gracefully instead
  of throwing ArgumentException. This handles the valid scenario where the
  user changes a disabled keyword's text but keeps it disabled.
- Fix GetActiveActionKeywords to return an empty dictionary instead of null
  when actionKeywordStr is null/empty, preventing NullReferenceException.
- Fix ActionKeyword setter to only auto-enable when the value actually
  changes, preventing unintended side-effects during construction.
- Initialize ActionKeywordSetting backing fields directly in constructor to
  avoid the auto-enable triggering during initialization.
- Change TextBox binding to UpdateSourceTrigger=PropertyChanged so the
  checkbox auto-enables as the user types (before they click the checkbox),
  fixing the checkbox toggle issue caused by LostFocus timing.

Co-authored-by: Jack251970 <53996452+Jack251970@users.noreply.github.com>
2026-03-10 05:40:25 +00:00
copilot-swe-agent[bot]
319db64393 Initial plan 2026-03-10 05:19:00 +00:00
Jack Ye
24f6c90f72
Merge pull request #4333 from Flow-Launcher/dependabot/nuget/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Svg.Skia-3.5.0
Some checks are pending
Build / build (push) Waiting to run
Bump Svg.Skia from 3.4.1 to 3.5.0
2026-03-10 11:52:19 +08:00
dependabot[bot]
3e493263c3
Bump Svg.Skia from 3.4.1 to 3.5.0
---
updated-dependencies:
- dependency-name: Svg.Skia
  dependency-version: 3.5.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-09 23:05:08 +00:00
7 changed files with 35 additions and 17 deletions

View file

@ -38,9 +38,20 @@ namespace Flow.Launcher
private void SetException(Exception exception)
{
var path = DataLocation.VersionLogDirectory;
var directory = new DirectoryInfo(path);
var log = directory.GetFiles().OrderByDescending(f => f.LastWriteTime).First();
FileInfo log = null;
try
{
var path = DataLocation.VersionLogDirectory;
var directory = new DirectoryInfo(path);
if (directory.Exists)
{
log = directory.GetFiles().OrderByDescending(f => f.LastWriteTime).FirstOrDefault();
}
}
catch (Exception)
{
// Intentionally ignore all errors when trying to find the log file to avoid secondary crashes
}
var websiteUrl = exception switch
{
@ -49,8 +60,11 @@ namespace Flow.Launcher
};
var paragraph = Hyperlink(Localize.reportWindow_please_open_issue(), websiteUrl);
paragraph.Inlines.Add(Localize.reportWindow_upload_log(log.FullName));
paragraph.Inlines.Add("\n");
if (log is not null)
{
paragraph.Inlines.Add(Localize.reportWindow_upload_log(log.FullName));
paragraph.Inlines.Add("\n");
}
paragraph.Inlines.Add(Localize.reportWindow_copy_below());
ErrorTextbox.Document.Blocks.Add(paragraph);

View file

@ -96,7 +96,7 @@ public partial class SettingWindow
private void Window_StateChanged(object sender, EventArgs e)
{
RefreshMaximizeRestoreButton();
if (IsLoaded)
if (IsLoaded && WindowState != WindowState.Minimized)
{
_settings.SettingWindowState = WindowState;
}
@ -169,7 +169,9 @@ public partial class SettingWindow
SetWindowPosition(top, left);
}
WindowState = _settings.SettingWindowState;
WindowState = _settings.SettingWindowState == WindowState.Minimized
? WindowState.Normal
: _settings.SettingWindowState;
}
private void SetWindowPosition(double top, double left)

View file

@ -110,7 +110,7 @@
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.4.0" />
<PackageReference Include="Flow.Launcher.Localization" Version="0.0.6" />
<PackageReference Include="Microsoft.Data.Sqlite" Version="10.0.3" />
<PackageReference Include="Svg.Skia" Version="3.4.1" />
<PackageReference Include="Svg.Skia" Version="3.5.0" />
<PackageReference Include="SkiaSharp" Version="3.119.1" />
</ItemGroup>

View file

@ -230,7 +230,7 @@ namespace Flow.Launcher.Plugin.Explorer
internal Dictionary<ActionKeyword, string> GetActiveActionKeywords(string actionKeywordStr)
{
var result = new Dictionary<ActionKeyword, string>();
if (string.IsNullOrEmpty(actionKeywordStr)) return null;
if (string.IsNullOrEmpty(actionKeywordStr)) return result;
foreach (var action in Enum.GetValues<ActionKeyword>())
{
var keywordStr = GetActionKeyword(action);

View file

@ -321,8 +321,9 @@ namespace Flow.Launcher.Plugin.Explorer.ViewModels
Context.API.AddActionKeyword(Context.CurrentPluginMetadata.ID, actionKeywordWindow.ActionKeyword);
break;
case (false, false):
throw new ArgumentException(
$"Both false in {nameof(actionKeyword)}.{nameof(actionKeyword.Enabled)} and {nameof(actionKeywordWindow)}.{nameof(actionKeywordWindow.KeywordEnabled)} should suggest that the ShowDialog() result is false");
// Keyword was disabled and remains disabled, but the keyword text was changed.
// No action keyword registration changes needed; the model will be updated below.
break;
}
(actionKeyword.Keyword, actionKeyword.Enabled) = (actionKeywordWindow.ActionKeyword, actionKeywordWindow.KeywordEnabled);

View file

@ -82,7 +82,7 @@
VerticalAlignment="Center"
DataObject.Pasting="TextBox_Pasting"
PreviewKeyDown="TxtCurrentActionKeyword_OnKeyDown"
Text="{Binding ActionKeyword}" />
Text="{Binding ActionKeyword, UpdateSourceTrigger=PropertyChanged}" />
</StackPanel>
<StackPanel Margin="0 10 0 15" Orientation="Horizontal">
<TextBlock

View file

@ -16,9 +16,9 @@ namespace Flow.Launcher.Plugin.Explorer.Views
get => actionKeyword;
set
{
// Set Enable to be true if user change ActionKeyword
KeywordEnabled = true;
_ = SetProperty(ref actionKeyword, value);
// Set Enable to be true only when the ActionKeyword value actually changes
if (SetProperty(ref actionKeyword, value))
KeywordEnabled = true;
}
}
@ -34,8 +34,9 @@ namespace Flow.Launcher.Plugin.Explorer.Views
public ActionKeywordSetting(ActionKeywordModel selectedActionKeyword)
{
CurrentActionKeyword = selectedActionKeyword;
ActionKeyword = selectedActionKeyword.Keyword;
KeywordEnabled = selectedActionKeyword.Enabled;
// Initialize backing fields directly to avoid triggering the auto-enable side-effect
actionKeyword = selectedActionKeyword.Keyword;
_keywordEnabled = selectedActionKeyword.Enabled;
InitializeComponent();