Use reference when editing

This commit is contained in:
Vic 2022-11-04 01:44:23 +08:00
parent 1296b0ec42
commit fc7ed31004
4 changed files with 6 additions and 3 deletions

View file

@ -59,7 +59,7 @@ namespace Flow.Launcher.Infrastructure.UserSettings
{
Key = key;
Description = description;
Expand = expand ?? (() => { return Key; });
Expand = expand ?? (() => { return ""; });
}
}
}

View file

@ -117,6 +117,7 @@
LastChildFill="True">
<Button
x:Name="btnTestShortcut"
Margin="0,0,10,0"
Padding="10,5,10,5"
Click="BtnTestShortcut_OnClick"
Content="{DynamicResource preview}"

View file

@ -2520,6 +2520,7 @@
Text="{DynamicResource customQueryShortcut}" />
<ListView
Grid.Row="7"
Name="customShortcutView"
MinHeight="160"
Margin="0,6,0,0"
Background="{DynamicResource Color02B}"

View file

@ -421,8 +421,9 @@ namespace Flow.Launcher
var shortcutSettingWindow = new CustomShortcutSetting(item, settings);
if (shortcutSettingWindow.ShowDialog() == true)
{
settings.CustomShortcuts.Remove(item);
settings.CustomShortcuts.Add(shortcutSettingWindow.ShortCut);
item.Key = shortcutSettingWindow.Key;
item.Value = shortcutSettingWindow.Value;
customShortcutView.Items.Refresh();
}
}