Skip to content

Commit

Permalink
Qodana fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
bagusnl committed Apr 3, 2024
1 parent 7af90dc commit 6228e4d
Show file tree
Hide file tree
Showing 4 changed files with 111 additions and 108 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@ internal enum MediaType
private static Grid? _bgOverlayTitleBar;

private static Grid? _parentBgImageBackgroundGrid;
#pragma warning disable CS0169 // Field is never used
private static Grid? _parentBgImageForegroundGrid;
#pragma warning restore CS0169 // Field is never used
private static Grid? _parentBgMediaPlayerBackgroundGrid;

internal static MediaType CurrentAppliedMediaType = MediaType.Unknown;
Expand Down
8 changes: 4 additions & 4 deletions CollapseLauncher/Classes/Helper/Image/ImageLoaderHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -248,8 +248,8 @@ private static async Task<FileStream> GenerateCachedStream(FileInfo InputFileInf
FileInfo newCachedFileInfo = new FileInfo(InputFileName);

await using (FileStream newCachedFileStream = newCachedFileInfo.Create())
await using (FileStream oldInputFileStream = InputFileInfo.OpenRead())
await ResizeImageStream(oldInputFileStream, newCachedFileStream, ToWidth, ToHeight);
await using (FileStream oldInputFileStream = InputFileInfo.OpenRead())
await ResizeImageStream(oldInputFileStream, newCachedFileStream, ToWidth, ToHeight);

InputFileInfo.Delete();
return newCachedFileInfo.OpenRead();
Expand All @@ -260,8 +260,8 @@ private static async Task<FileStream> GenerateCachedStream(FileInfo InputFileInf
if (isCachedFileExist) return cachedFileInfo.OpenRead();

await using (FileStream cachedFileStream = cachedFileInfo.Create())
await using (FileStream inputFileStream = InputFileInfo.OpenRead())
await ResizeImageStream(inputFileStream, cachedFileStream, ToWidth, ToHeight);
await using (FileStream inputFileStream = InputFileInfo.OpenRead())
await ResizeImageStream(inputFileStream, cachedFileStream, ToWidth, ToHeight);

return cachedFileInfo.OpenRead();
}
Expand Down
Loading

0 comments on commit 6228e4d

Please sign in to comment.