mirror of
https://github.com/AleziaKurdis/overte.git
synced 2025-04-14 09:06:51 +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;
|
||||
hifiUrl: model.place_name + model.path;
|
||||
thumbnail: model.thumbnail_url;
|
||||
imageUrl: model.image_url;
|
||||
action: model.action;
|
||||
timestamp: model.created_at;
|
||||
onlineUsers: model.online_users;
|
||||
|
@ -395,6 +396,7 @@ Window {
|
|||
created_at: data.created_at || "",
|
||||
action: data.action || "",
|
||||
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.
|
||||
|
||||
|
|
|
@ -25,6 +25,7 @@ Rectangle {
|
|||
property string timestamp: "";
|
||||
property string hifiUrl: "";
|
||||
property string thumbnail: defaultThumbnail;
|
||||
property string imageUrl: "";
|
||||
property var goFunction: null;
|
||||
property string storyId: "";
|
||||
|
||||
|
@ -67,13 +68,21 @@ Rectangle {
|
|||
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 {
|
||||
id: lobby;
|
||||
visible: !hasGif || (animation.status !== Image.Ready);
|
||||
width: parent.width - (isConcurrency ? 0 : (2 * smallMargin));
|
||||
height: parent.height - messageHeight - (isConcurrency ? 0 : smallMargin);
|
||||
source: thumbnail || defaultThumbnail;
|
||||
fillMode: Image.PreserveAspectCrop;
|
||||
// source gets filled in later
|
||||
anchors {
|
||||
horizontalCenter: parent.horizontalCenter;
|
||||
top: parent.top;
|
||||
|
|
Loading…
Reference in a new issue