Skip to content

Commit e85c569

Browse files
authored
Merge branch 'dev' into administrator_mode
2 parents aac717c + 4b41578 commit e85c569

File tree

17 files changed

+139
-36
lines changed

17 files changed

+139
-36
lines changed

.github/workflows/default_plugins.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
runs-on: windows-latest
1111

1212
steps:
13-
- uses: actions/checkout@v4
13+
- uses: actions/checkout@v5
1414
- name: Setup .NET
1515
uses: actions/setup-dotnet@v4
1616
with:

.github/workflows/dotnet.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
NUGET_CERT_REVOCATION_MODE: offline
2121
BUILD_NUMBER: ${{ github.run_number }}
2222
steps:
23-
- uses: actions/checkout@v4
23+
- uses: actions/checkout@v5
2424
- name: Set Flow.Launcher.csproj version
2525
id: update
2626
uses: vers-one/[email protected]

.github/workflows/release_pr.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
update-pr:
1212
runs-on: ubuntu-latest
1313
steps:
14-
- uses: actions/checkout@v4
14+
- uses: actions/checkout@v5
1515

1616
- uses: actions/setup-python@v5
1717
with:

Flow.Launcher/Flow.Launcher.csproj

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,48 @@
3939
<Prefer32Bit>false</Prefer32Bit>
4040
</PropertyGroup>
4141

42+
<Target Name="RemoveUnnecessaryRuntimesAfterBuild" AfterTargets="Build">
43+
<RemoveDir Directories="$(OutputPath)runtimes\browser-wasm;
44+
$(OutputPath)runtimes\linux-arm;
45+
$(OutputPath)runtimes\linux-arm64;
46+
$(OutputPath)runtimes\linux-armel;
47+
$(OutputPath)runtimes\linux-mips64;
48+
$(OutputPath)runtimes\linux-musl-arm;
49+
$(OutputPath)runtimes\linux-musl-arm64;
50+
$(OutputPath)runtimes\linux-musl-x64;
51+
$(OutputPath)runtimes\linux-musl-s390x;
52+
$(OutputPath)runtimes\linux-ppc64le;
53+
$(OutputPath)runtimes\linux-s390x;
54+
$(OutputPath)runtimes\linux-x64;
55+
$(OutputPath)runtimes\linux-x86;
56+
$(OutputPath)runtimes\maccatalyst-arm64;
57+
$(OutputPath)runtimes\maccatalyst-x64;
58+
$(OutputPath)runtimes\osx;
59+
$(OutputPath)runtimes\osx-arm64;
60+
$(OutputPath)runtimes\osx-x64"/>
61+
</Target>
62+
63+
<Target Name="RemoveUnnecessaryRuntimesAfterPublish" AfterTargets="Publish">
64+
<RemoveDir Directories="$(PublishDir)runtimes\browser-wasm;
65+
$(PublishDir)runtimes\linux-arm;
66+
$(PublishDir)runtimes\linux-arm64;
67+
$(PublishDir)runtimes\linux-armel;
68+
$(PublishDir)runtimes\linux-mips64;
69+
$(PublishDir)runtimes\linux-musl-arm;
70+
$(PublishDir)runtimes\linux-musl-arm64;
71+
$(PublishDir)runtimes\linux-musl-x64;
72+
$(PublishDir)runtimes\linux-musl-s390x;
73+
$(PublishDir)runtimes\linux-ppc64le;
74+
$(PublishDir)runtimes\linux-s390x;
75+
$(PublishDir)runtimes\linux-x64;
76+
$(PublishDir)runtimes\linux-x86;
77+
$(PublishDir)runtimes\maccatalyst-arm64;
78+
$(PublishDir)runtimes\maccatalyst-x64;
79+
$(PublishDir)runtimes\osx;
80+
$(PublishDir)runtimes\osx-arm64;
81+
$(PublishDir)runtimes\osx-x64"/>
82+
</Target>
83+
4284
<ItemGroup>
4385
<ApplicationDefinition Remove="App.xaml" />
4486
</ItemGroup>

Flow.Launcher/MainWindow.xaml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -534,10 +534,8 @@
534534
MinHeight="380"
535535
MaxHeight="{Binding ElementName=ResultListBox, Path=ActualHeight}"
536536
Padding="0 0 10 10"
537-
d:DataContext="{d:DesignInstance vm:ResultViewModel}"
538-
DataContext="{Binding PreviewSelectedItem, Mode=OneWay}"
539537
Visibility="{Binding ShowCustomizedPreview}">
540-
<ContentControl Content="{Binding Result.PreviewPanel.Value}" />
538+
<ContentControl Content="{Binding CustomizedPreviewControl}" />
541539
</Border>
542540
</Grid>
543541
</Grid>

Flow.Launcher/ViewModel/MainViewModel.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
using System.Threading.Tasks;
1010
using System.Windows;
1111
using System.Windows.Input;
12+
using System.Windows.Controls;
1213
using System.Windows.Media;
1314
using System.Windows.Threading;
1415
using CommunityToolkit.Mvvm.DependencyInjection;
@@ -883,6 +884,12 @@ private ResultsViewModel SelectedResults
883884
}
884885
}
885886

887+
public Visibility ShowCustomizedPreview
888+
=> InternalPreviewVisible && PreviewSelectedItem?.Result.PreviewPanel != null ? Visibility.Visible : Visibility.Collapsed;
889+
890+
public UserControl CustomizedPreviewControl
891+
=> ShowCustomizedPreview == Visibility.Visible ? PreviewSelectedItem?.Result.PreviewPanel.Value : null;
892+
886893
public Visibility ProgressBarVisibility { get; set; }
887894
public Visibility MainWindowVisibility { get; set; }
888895

Flow.Launcher/ViewModel/PluginViewModel.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,17 @@ private async Task LoadIconAsync()
3737
OnPropertyChanged(nameof(Image));
3838
}
3939

40+
private bool _imageLoaded = false;
41+
4042
public ImageSource Image
4143
{
4244
get
4345
{
44-
if (_image == ImageLoader.MissingImage)
46+
if (!_imageLoaded)
47+
{
48+
_imageLoaded = true;
4549
_ = LoadIconAsync();
50+
}
4651

4752
return _image;
4853
}

Flow.Launcher/ViewModel/ResultViewModel.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,6 @@ public ResultViewModel(Result result, Settings settings)
6666

6767
public Visibility ShowDefaultPreview => Result.PreviewPanel == null ? Visibility.Visible : Visibility.Collapsed;
6868

69-
public Visibility ShowCustomizedPreview => Result.PreviewPanel == null ? Visibility.Collapsed : Visibility.Visible;
70-
7169
public Visibility ShowIcon
7270
{
7371
get

Plugins/Flow.Launcher.Plugin.BrowserBookmark/Main.cs

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,26 @@ public void Init(PluginInitContext context)
3636
_faviconCacheDir = Path.Combine(
3737
context.CurrentPluginMetadata.PluginCacheDirectoryPath,
3838
"FaviconCache");
39+
40+
try
41+
{
42+
if (Directory.Exists(_faviconCacheDir))
43+
{
44+
var files = Directory.GetFiles(_faviconCacheDir);
45+
foreach (var file in files)
46+
{
47+
var extension = Path.GetExtension(file);
48+
if (extension is ".db-shm" or ".db-wal" or ".sqlite-shm" or ".sqlite-wal")
49+
{
50+
File.Delete(file);
51+
}
52+
}
53+
}
54+
}
55+
catch (Exception e)
56+
{
57+
Context.API.LogException(ClassName, "Failed to clean up orphaned cache files.", e);
58+
}
3959

4060
LoadBookmarksIfEnabled();
4161
}

Plugins/Flow.Launcher.Plugin.WebSearch/Languages/en.xaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
<system:String x:Key="flowlauncher_plugin_websearch_edit">Edit</system:String>
1414
<system:String x:Key="flowlauncher_plugin_websearch_add">Add</system:String>
1515
<system:String x:Key="flowlauncher_plugin_websearch_enabled_label">Enabled</system:String>
16+
<system:String x:Key="flowlauncher_plugin_websearch_private_mode_label">Private Mode</system:String>
1617
<system:String x:Key="flowlauncher_plugin_websearch_true">Enabled</system:String>
1718
<system:String x:Key="flowlauncher_plugin_websearch_false">Disabled</system:String>
1819
<system:String x:Key="flowlauncher_plugin_websearch_confirm">Confirm</system:String>

0 commit comments

Comments
 (0)