mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 15:09:24 +02:00
Ensure snapshots without story_ids get uploaded
This commit is contained in:
parent
76a025aade
commit
6765451cc8
2 changed files with 4 additions and 3 deletions
|
@ -300,7 +300,7 @@ function addImage(image_data, isLoggedIn, canShare, isGifLoading, isShowingPrevi
|
||||||
if (!isGifLoading) {
|
if (!isGifLoading) {
|
||||||
appendShareBar(id, isLoggedIn, canShare, isGif, blastButtonDisabled, hifiButtonDisabled, canBlast);
|
appendShareBar(id, isLoggedIn, canShare, isGif, blastButtonDisabled, hifiButtonDisabled, canBlast);
|
||||||
}
|
}
|
||||||
if (!isGifLoading && !isShowingPreviousImages) {
|
if (!isGifLoading || (isShowingPreviousImages && !image_data.story_id)) {
|
||||||
shareForUrl(id);
|
shareForUrl(id);
|
||||||
}
|
}
|
||||||
if (isShowingPreviousImages && isLoggedIn && image_data.story_id) {
|
if (isShowingPreviousImages && isLoggedIn && image_data.story_id) {
|
||||||
|
|
|
@ -138,10 +138,10 @@ function onMessage(message) {
|
||||||
isLoggedIn = Account.isLoggedIn();
|
isLoggedIn = Account.isLoggedIn();
|
||||||
if (isLoggedIn) {
|
if (isLoggedIn) {
|
||||||
print('Sharing snapshot with audience "for_url":', message.data);
|
print('Sharing snapshot with audience "for_url":', message.data);
|
||||||
Window.shareSnapshot(message.data, message.href || href);
|
Window.shareSnapshot(message.data, Settings.getValue("previousSnapshotHref"));
|
||||||
} else {
|
} else {
|
||||||
shareAfterLogin = true;
|
shareAfterLogin = true;
|
||||||
snapshotToShareAfterLogin.push({ path: message.data, href: message.href || href });
|
snapshotToShareAfterLogin.push({ path: message.data, href: Settings.getValue("previousSnapshotHref") });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -349,6 +349,7 @@ function takeSnapshot() {
|
||||||
// We will record snapshots based on the starting location. That could change, e.g., when recording a .gif.
|
// We will record snapshots based on the starting location. That could change, e.g., when recording a .gif.
|
||||||
// Even the domainId could change (e.g., if the user falls into a teleporter while recording).
|
// Even the domainId could change (e.g., if the user falls into a teleporter while recording).
|
||||||
href = location.href;
|
href = location.href;
|
||||||
|
Settings.setValue("previousSnapshotHref", href);
|
||||||
domainId = location.domainId;
|
domainId = location.domainId;
|
||||||
Settings.setValue("previousSnapshotDomainID", domainId);
|
Settings.setValue("previousSnapshotDomainID", domainId);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue