Skip to content

Commit

Permalink
Create refresh operating systems method, used it in the user agent up…
Browse files Browse the repository at this point in the history
…date on post message
  • Loading branch information
os-jsplopes authored and gnbm committed Sep 8, 2023
1 parent 9905c1a commit 18f6a86
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/scripts/OSFramework/OSUI/Helper/Device.ts
Original file line number Diff line number Diff line change
Expand Up @@ -602,5 +602,15 @@ namespace OSFramework.OSUI.Helper {

return localOs;
}

/**
* Refresh the operating system information
*
* @static
* @memberof DeviceInfo
*/
public static RefreshOperatingSystem(): void {
DeviceInfo._operatingSystem = DeviceInfo.GetOperatingSystem(DeviceInfo._getUserAgent());
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ namespace OutSystems.OSUI.Utils.LayoutPrivate {
sessionStorage.setItem('previewDevicesPixelRatio', evt.data.pixelRatio);
OnPostMessage.Unset();
evt.source.postMessage('received', { targetOrigin: evt.origin });
OSFramework.Helper.DeviceInfo.RefreshOperatingSystem();
SetDeviceClass(false);
}

Expand Down

0 comments on commit 18f6a86

Please sign in to comment.