mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 10:37:35 +02:00
Merge pull request #9106 from howard-stearns/animate-suggestions-when-available
animate suggestions when available
This commit is contained in:
commit
dcda5d50a0
2 changed files with 12 additions and 1 deletions
|
@ -112,6 +112,7 @@ Window {
|
||||||
placeName: model.place_name;
|
placeName: model.place_name;
|
||||||
hifiUrl: model.place_name + model.path;
|
hifiUrl: model.place_name + model.path;
|
||||||
thumbnail: model.thumbnail_url;
|
thumbnail: model.thumbnail_url;
|
||||||
|
imageUrl: model.image_url;
|
||||||
action: model.action;
|
action: model.action;
|
||||||
timestamp: model.created_at;
|
timestamp: model.created_at;
|
||||||
onlineUsers: model.online_users;
|
onlineUsers: model.online_users;
|
||||||
|
@ -395,6 +396,7 @@ Window {
|
||||||
created_at: data.created_at || "",
|
created_at: data.created_at || "",
|
||||||
action: data.action || "",
|
action: data.action || "",
|
||||||
thumbnail_url: resolveUrl(thumbnail_url),
|
thumbnail_url: resolveUrl(thumbnail_url),
|
||||||
|
image_url: resolveUrl(data.details.image_url),
|
||||||
|
|
||||||
metaverseId: (data.id || "").toString(), // Some are strings from server while others are numbers. Model objects require uniformity.
|
metaverseId: (data.id || "").toString(), // Some are strings from server while others are numbers. Model objects require uniformity.
|
||||||
|
|
||||||
|
|
|
@ -25,6 +25,7 @@ Rectangle {
|
||||||
property string timestamp: "";
|
property string timestamp: "";
|
||||||
property string hifiUrl: "";
|
property string hifiUrl: "";
|
||||||
property string thumbnail: defaultThumbnail;
|
property string thumbnail: defaultThumbnail;
|
||||||
|
property string imageUrl: "";
|
||||||
property var goFunction: null;
|
property var goFunction: null;
|
||||||
property string storyId: "";
|
property string storyId: "";
|
||||||
|
|
||||||
|
@ -67,13 +68,21 @@ Rectangle {
|
||||||
return 'about a minute ago';
|
return 'about a minute ago';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
property bool hasGif: imageUrl.indexOf('.gif') === (imageUrl.length - 4);
|
||||||
|
AnimatedImage {
|
||||||
|
id: animation;
|
||||||
|
// Always visible, to drive loading, but initially covered up by lobby during load.
|
||||||
|
source: hasGif ? imageUrl : "";
|
||||||
|
fillMode: lobby.fillMode;
|
||||||
|
anchors.fill: lobby;
|
||||||
|
}
|
||||||
Image {
|
Image {
|
||||||
id: lobby;
|
id: lobby;
|
||||||
|
visible: !hasGif || (animation.status !== Image.Ready);
|
||||||
width: parent.width - (isConcurrency ? 0 : (2 * smallMargin));
|
width: parent.width - (isConcurrency ? 0 : (2 * smallMargin));
|
||||||
height: parent.height - messageHeight - (isConcurrency ? 0 : smallMargin);
|
height: parent.height - messageHeight - (isConcurrency ? 0 : smallMargin);
|
||||||
source: thumbnail || defaultThumbnail;
|
source: thumbnail || defaultThumbnail;
|
||||||
fillMode: Image.PreserveAspectCrop;
|
fillMode: Image.PreserveAspectCrop;
|
||||||
// source gets filled in later
|
|
||||||
anchors {
|
anchors {
|
||||||
horizontalCenter: parent.horizontalCenter;
|
horizontalCenter: parent.horizontalCenter;
|
||||||
top: parent.top;
|
top: parent.top;
|
||||||
|
|
Loading…
Reference in a new issue