~marcustomlinson/unity-scope-click/lp-1578283-2

« back to all changes in this revision

Viewing changes to scope/clickstore/store-scope.cpp

  • Committer: CI Train Bot
  • Author(s): Rodney Dawes
  • Date: 2016-03-07 14:10:27 UTC
  • mfrom: (412.1.3 login-payment)
  • Revision ID: ci-train-bot@canonical.com-20160307141027-m4go0dycgmdo858m
Use the online-accounts integration for payments button.
Refresh the store results on purchase cancellation. Fixes: #1513093
Approved by: Charles Kerr

Show diffs side-by-side

added added

removed removed

Lines of Context:
128
128
        activation->setHint("purchased", unity::scopes::Variant(true));
129
129
        qDebug() << "returning ShowPreview";
130
130
        activation->setStatus(unity::scopes::ActivationResponse::Status::ShowPreview);
 
131
    } else if (action_id == "purchaseCancelled") {
 
132
        qDebug() << "Purchase was cancelled, refreshing scope results.";
 
133
        click::DownloadErrorPreview strategy{result};
 
134
        strategy.invalidateScope(STORE_SCOPE_ID.toUtf8().data());
131
135
    } else if (action_id == "purchaseError") {
132
136
        activation->setHint(click::Preview::Actions::DOWNLOAD_FAILED, unity::scopes::Variant(true));
133
137
        activation->setStatus(unity::scopes::ActivationResponse::Status::ShowPreview);