Pass galaxy object to onLoggedIn cb
This commit is contained in:
parent
8eb4b94ccd
commit
ae9071b27d
1 changed files with 2 additions and 2 deletions
|
@ -113,7 +113,7 @@
|
||||||
* @param {boolean} [options.supportsSaving] - Indicates to Galaxy that this game supports saving. Defaults to false.
|
* @param {boolean} [options.supportsSaving] - Indicates to Galaxy that this game supports saving. Defaults to false.
|
||||||
* @param {boolean} [options.supportsSaveManager] - Indicates to Galaxy that this game supports a saves manager. Defaults to false.
|
* @param {boolean} [options.supportsSaveManager] - Indicates to Galaxy that this game supports a saves manager. Defaults to false.
|
||||||
* @param {boolean} [options.ignoreApiVersion] - Ignores the api_version property received from Galaxy. By default this value is false, meaning if an unknown API version is encountered, the API will fail to initialize.
|
* @param {boolean} [options.ignoreApiVersion] - Ignores the api_version property received from Galaxy. By default this value is false, meaning if an unknown API version is encountered, the API will fail to initialize.
|
||||||
* @param {(loggedIn: boolean) => void} [options.onLoggedInChanged] - A callback for when the logged in status of the player changes after the initialization.
|
* @param {(galaxy: GalaxyApi) => void} [options.onLoggedInChanged] - A callback for when the logged in status of the player changes after the initialization.
|
||||||
* @returns {Promise<GalaxyApi>}
|
* @returns {Promise<GalaxyApi>}
|
||||||
*/
|
*/
|
||||||
export function initGalaxy({
|
export function initGalaxy({
|
||||||
|
@ -203,7 +203,7 @@ export function initGalaxy({
|
||||||
if (firstInfoResponse) {
|
if (firstInfoResponse) {
|
||||||
accept(galaxy);
|
accept(galaxy);
|
||||||
} else {
|
} else {
|
||||||
galaxy.onLoggedInChanged?.(logged_in);
|
galaxy.onLoggedInChanged?.(galaxy);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Add table
Reference in a new issue