Merge ~dobey/unity-scope-snappy:skip-priced into unity-scope-snappy:master

Proposed by dobey
Status: Merged
Approved by: Marcus Tomlinson
Approved revision: 443f3354b024b42ffd1c921736610d52993d38b6
Merged at revision: 92201d34eae18d99e4b8f1a584a57c742376d4a9
Proposed branch: ~dobey/unity-scope-snappy:skip-priced
Merge into: unity-scope-snappy:master
Diff against target: 19 lines (+5/-0)
1 file modified
store/packages/snapd_client.go (+5/-0)
Reviewer Review Type Date Requested Status
Marcus Tomlinson (community) Approve
Review via email: mp+309293@code.launchpad.net

Commit message

Hide apps with prices for the time being.

To post a comment you must log in.
Revision history for this message
Marcus Tomlinson (marcustomlinson) wrote :

Nice, that'll do it.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/store/packages/snapd_client.go b/store/packages/snapd_client.go
2index 8007725..fa855f2 100644
3--- a/store/packages/snapd_client.go
4+++ b/store/packages/snapd_client.go
5@@ -88,9 +88,14 @@ func (snapd *SnapdClient) GetStorePackages(query string) ([]client.Snap, error)
6
7 packages := make([]client.Snap, 0)
8 for _, snap := range snaps {
9+ // Only show snaps that are of the "app" type.
10 if snap.Type != client.TypeApp {
11 continue
12 }
13+ // Skip apps with prices, as we don't support purchases yet
14+ if len(snap.Prices) != 0 {
15+ continue
16+ }
17 packages = append(packages, *snap)
18 }
19 return packages, nil

Subscribers

People subscribed via source and target branches

to all changes: