Skip to content

Commit

Permalink
Limit JPEG XL update notifications to appearing on JXL interactions only
Browse files Browse the repository at this point in the history
Even if a libjxl update is available, I don't want to interrupt the user unless they're actively trying to load a JPEG XL file.
  • Loading branch information
tannerhelland committed Feb 24, 2024
1 parent fda9291 commit 9968087
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion Modules/ImageLoader.bas
Expand Up @@ -1373,7 +1373,16 @@ Private Function LoadJXL(ByRef srcFile As String, ByRef dstImage As pdImage, ByR

'If libjxl *is* available, check for plugin updates before proceeding
Else
Plugin_jxl.CheckJXLVersionAndOfferUpdates True

'Before offering updates, see if the target file is even a JPEG XL image.
' (If it isn't, we don't want to spam the user with an irrelevant update notification.)
If Plugin_jxl.IsFileJXL(srcFile) Then
Plugin_jxl.CheckJXLVersionAndOfferUpdates True
Else
LoadJXL = False
Exit Function
End If

End If

'Offload the remainder of the job to the libjxl interface
Expand Down

0 comments on commit 9968087

Please sign in to comment.