mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Compare commits
8 commits
b1b03fd3ea
...
8125bb3086
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8125bb3086 | ||
|
|
e8353f7648 | ||
|
|
8d042d2134 | ||
|
|
a406eb83e1 | ||
|
|
531b45210a | ||
|
|
319db64393 | ||
|
|
24f6c90f72 | ||
|
|
3e493263c3 |
7 changed files with 35 additions and 17 deletions
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue