Skip to content

Commit 19f37f4

Browse files
committed
Add code comments
1 parent 78b4c7d commit 19f37f4

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,8 @@ ORDER BY i.width DESC
162162

163163
if (imageData is not { Length: > 0 })
164164
return;
165-
165+
166+
// Check if the image data is compressed (GZip)
166167
if (imageData.Length > 2 && imageData[0] == 0x1f && imageData[1] == 0x8b)
167168
{
168169
using var inputStream = new MemoryStream(imageData);
@@ -171,9 +172,9 @@ ORDER BY i.width DESC
171172
gZipStream.CopyTo(outputStream);
172173
imageData = outputStream.ToArray();
173174
}
174-
175+
176+
// Convert the image data to WebP format
175177
var webpData = FaviconHelper.TryConvertToWebp(imageData);
176-
177178
if (webpData != null)
178179
{
179180
var faviconPath = Path.Combine(_faviconCacheDir, $"firefox_{domain}_{iconId}.webp");

Plugins/Flow.Launcher.Plugin.BrowserBookmark/Helper/FaviconHelper.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,4 +121,4 @@ public static byte[] TryConvertToWebp(byte[] data)
121121

122122
return null;
123123
}
124-
}
124+
}

0 commit comments

Comments
 (0)