mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Add code comments
This commit is contained in:
parent
78b4c7db85
commit
19f37f4c3a
2 changed files with 5 additions and 4 deletions
|
|
@ -163,6 +163,7 @@ public abstract class FirefoxBookmarkLoaderBase : IBookmarkLoader
|
||||||
if (imageData is not { Length: > 0 })
|
if (imageData is not { Length: > 0 })
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
// Check if the image data is compressed (GZip)
|
||||||
if (imageData.Length > 2 && imageData[0] == 0x1f && imageData[1] == 0x8b)
|
if (imageData.Length > 2 && imageData[0] == 0x1f && imageData[1] == 0x8b)
|
||||||
{
|
{
|
||||||
using var inputStream = new MemoryStream(imageData);
|
using var inputStream = new MemoryStream(imageData);
|
||||||
|
|
@ -172,8 +173,8 @@ public abstract class FirefoxBookmarkLoaderBase : IBookmarkLoader
|
||||||
imageData = outputStream.ToArray();
|
imageData = outputStream.ToArray();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Convert the image data to WebP format
|
||||||
var webpData = FaviconHelper.TryConvertToWebp(imageData);
|
var webpData = FaviconHelper.TryConvertToWebp(imageData);
|
||||||
|
|
||||||
if (webpData != null)
|
if (webpData != null)
|
||||||
{
|
{
|
||||||
var faviconPath = Path.Combine(_faviconCacheDir, $"firefox_{domain}_{iconId}.webp");
|
var faviconPath = Path.Combine(_faviconCacheDir, $"firefox_{domain}_{iconId}.webp");
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue