mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-21 09:58:13 +00:00
UPD: CheckPhotosVersion - optimization
This commit is contained in:
parent
defc205605
commit
503584708b
2 changed files with 15 additions and 5 deletions
|
|
@ -396,8 +396,7 @@ begin
|
|||
// Special case Microsoft Photos
|
||||
if (AppID = 'Microsoft.Windows.Photos_8wekyb3d8bbwe!App') then
|
||||
begin
|
||||
// https://blogs.windows.com/windowsdeveloper/2024/06/03/microsoft-photos-migrating-from-uwp-to-windows-app-sdk/
|
||||
if CheckPhotosVersion(2024, 11050) then
|
||||
if CheckPhotosVersion then
|
||||
begin
|
||||
URL:= URIEncode(URL);
|
||||
URL:= 'ms-photos:viewer?fileName=' + StringReplace(URL, '%5C', '\', [rfReplaceAll]);
|
||||
|
|
|
|||
|
|
@ -176,7 +176,7 @@ procedure CreateShortcut(const Target, Shortcut: String);
|
|||
}
|
||||
function ExtractFileAttributes(const FindData: TWin32FindDataW): DWORD;
|
||||
|
||||
function CheckPhotosVersion(Build, Revision: UInt16): Boolean;
|
||||
function CheckPhotosVersion: Boolean;
|
||||
|
||||
procedure UpdateEnvironment;
|
||||
|
||||
|
|
@ -1300,9 +1300,20 @@ begin
|
|||
end;
|
||||
end;
|
||||
|
||||
function CheckPhotosVersion(Build, Revision: UInt16): Boolean;
|
||||
function CheckPhotosVersion: Boolean;
|
||||
const
|
||||
PhotosNew: TDuplicates = dupIgnore;
|
||||
begin
|
||||
Result:= CheckPackageVersion('Microsoft.Windows.Photos_8wekyb3d8bbwe', Build, Revision);
|
||||
if (PhotosNew = dupIgnore) then
|
||||
begin
|
||||
// https://blogs.windows.com/windowsdeveloper/2024/06/03/microsoft-photos-migrating-from-uwp-to-windows-app-sdk/
|
||||
if CheckPackageVersion('Microsoft.Windows.Photos_8wekyb3d8bbwe', 2024, 11050) then
|
||||
PhotosNew:= dupAccept
|
||||
else begin
|
||||
PhotosNew:= dupError;
|
||||
end;
|
||||
end;
|
||||
Result:= (PhotosNew = dupAccept);
|
||||
end;
|
||||
|
||||
var
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue