From ed84b49ece9fe29171d7c5864fb4405d09014797 Mon Sep 17 00:00:00 2001 From: Zach Fox Date: Wed, 19 Sep 2018 16:15:59 -0700 Subject: [PATCH] Small bugfixes and using original endpoints --- .../icons/tablet-icons/goto-a-msg.svg | 57 +++++++++++++++++++ .../{goto-msg.svg => goto-i-msg.svg} | 0 .../icons/tablet-icons/wallet-a-msg.svg | 6 ++ .../icons/tablet-icons/wallet-i-msg.svg | 16 ++++++ .../qml/hifi/commerce/purchases/Purchases.qml | 2 +- scripts/system/commerce/wallet.js | 2 +- scripts/system/marketplaces/marketplaces.js | 5 +- scripts/system/pal.js | 2 +- scripts/system/tablet-goto.js | 2 +- 9 files changed, 85 insertions(+), 7 deletions(-) create mode 100644 interface/resources/icons/tablet-icons/goto-a-msg.svg rename interface/resources/icons/tablet-icons/{goto-msg.svg => goto-i-msg.svg} (100%) create mode 100644 interface/resources/icons/tablet-icons/wallet-a-msg.svg create mode 100644 interface/resources/icons/tablet-icons/wallet-i-msg.svg diff --git a/interface/resources/icons/tablet-icons/goto-a-msg.svg b/interface/resources/icons/tablet-icons/goto-a-msg.svg new file mode 100644 index 0000000000..f1f611adb9 --- /dev/null +++ b/interface/resources/icons/tablet-icons/goto-a-msg.svg @@ -0,0 +1,57 @@ + + + +image/svg+xml + + \ No newline at end of file diff --git a/interface/resources/icons/tablet-icons/goto-msg.svg b/interface/resources/icons/tablet-icons/goto-i-msg.svg similarity index 100% rename from interface/resources/icons/tablet-icons/goto-msg.svg rename to interface/resources/icons/tablet-icons/goto-i-msg.svg diff --git a/interface/resources/icons/tablet-icons/wallet-a-msg.svg b/interface/resources/icons/tablet-icons/wallet-a-msg.svg new file mode 100644 index 0000000000..d51c3e99a2 --- /dev/null +++ b/interface/resources/icons/tablet-icons/wallet-a-msg.svg @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/interface/resources/icons/tablet-icons/wallet-i-msg.svg b/interface/resources/icons/tablet-icons/wallet-i-msg.svg new file mode 100644 index 0000000000..676f97a966 --- /dev/null +++ b/interface/resources/icons/tablet-icons/wallet-i-msg.svg @@ -0,0 +1,16 @@ + + + + + + + + + diff --git a/interface/resources/qml/hifi/commerce/purchases/Purchases.qml b/interface/resources/qml/hifi/commerce/purchases/Purchases.qml index 3b8e2c0f4d..2435678e77 100644 --- a/interface/resources/qml/hifi/commerce/purchases/Purchases.qml +++ b/interface/resources/qml/hifi/commerce/purchases/Purchases.qml @@ -93,7 +93,7 @@ Rectangle { console.log("Failed to get Available Updates", result.data.message); } else { sendToScript({method: 'purchases_availableUpdatesReceived', numUpdates: result.data.updates.length }); - root.numUpdatesAvailable = result.data.updates.length; + root.numUpdatesAvailable = result.total_entries; } } diff --git a/scripts/system/commerce/wallet.js b/scripts/system/commerce/wallet.js index 2f3f5c109d..c903080f62 100644 --- a/scripts/system/commerce/wallet.js +++ b/scripts/system/commerce/wallet.js @@ -601,7 +601,7 @@ function startup() { onOpened: walletOpened, onClosed: walletClosed, onMessage: fromQml, - notificationPollEndpoint: "/api/v1/notifications?source=commerce-history&per_page=10", + notificationPollEndpoint: "/api/v1/commerce/history?per_page=10", notificationPollTimeoutMs: 60000, notificationDataProcessPage: notificationDataProcessPage, notificationPollCallback: notificationPollCallback, diff --git a/scripts/system/marketplaces/marketplaces.js b/scripts/system/marketplaces/marketplaces.js index 1bb0713f50..9bd3a9facf 100644 --- a/scripts/system/marketplaces/marketplaces.js +++ b/scripts/system/marketplaces/marketplaces.js @@ -137,7 +137,6 @@ function onUsernameChanged() { } } -var userHasUpdates = false; function sendCommerceSettings() { ui.sendToHtml({ type: "marketplaces", @@ -147,7 +146,7 @@ function sendCommerceSettings() { userIsLoggedIn: Account.loggedIn, walletNeedsSetup: Wallet.walletStatus === 1, metaverseServerURL: Account.metaverseServerURL, - messagesWaiting: userHasUpdates + messagesWaiting: shouldShowDot } }); } @@ -1077,7 +1076,7 @@ function startup() { home: MARKETPLACE_URL_INITIAL, onScreenChanged: onTabletScreenChanged, onMessage: onQmlMessageReceived, - notificationPollEndpoint: "/api/v1/notifications?source=commerce-available_updates&per_page=10", + notificationPollEndpoint: "/api/v1/commerce/available_updates?per_page=10", notificationPollTimeoutMs: 60000, notificationDataProcessPage: notificationDataProcessPage, notificationPollCallback: notificationPollCallback, diff --git a/scripts/system/pal.js b/scripts/system/pal.js index 355ed0a504..b3499d759a 100644 --- a/scripts/system/pal.js +++ b/scripts/system/pal.js @@ -891,7 +891,7 @@ function startup() { onOpened: palOpened, onClosed: off, onMessage: fromQml, - notificationPollEndpoint: "/api/v1/notifications?source=users&filter=connections&per_page=10", + notificationPollEndpoint: "/api/v1/users?filter=connections&per_page=10", notificationPollTimeoutMs: 60000, notificationDataProcessPage: notificationDataProcessPage, notificationPollCallback: notificationPollCallback, diff --git a/scripts/system/tablet-goto.js b/scripts/system/tablet-goto.js index 63bc8431e8..f37b13c406 100644 --- a/scripts/system/tablet-goto.js +++ b/scripts/system/tablet-goto.js @@ -113,7 +113,7 @@ function startup() { 'protocol=' + encodeURIComponent(Window.protocolSignature()), 'per_page=10' ]; - var endpoint = '/api/v1/notifications?source=user_stories?' + options.join('&'); + var endpoint = '/api/v1/user_stories?' + options.join('&'); ui = new AppUi({ buttonName: BUTTON_NAME,