Closed Bug 1161095 Opened 10 years ago Closed 10 years ago

Installing/updating a theme more than once should not duplicate the theme in the Settings app themes list

Categories

(Firefox OS Graveyard :: Gaia::Theme Editor, defect, P1)

ARM
Gonk (Firefox OS)
defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: etienne, Assigned: etienne)

References

Details

Attachments

(2 files)

In js/generation.js, when the |mozApps.mgmt.import| call succeeds, we should store the manifestURL in the Studio IDB database. This way when enabling/updating a theme that already has a manifestURL set we can uninstall it first and prevent the duplication.
Priority: -- → P1
Blocks: 1161097
Blocks: 1161098
Blocks: 1161103
Hope to get this one done this week to unblock the rest.
Assignee: nobody → etienne
Attached file Studio part
Attachment #8604082 - Flags: feedback?(fabrice)
Comment on attachment 8604081 [details] [review] [gaia] etiennesegonzac:bug-1161095 > mozilla-b2g:master I don't think we can use mozApps.mgmt.import() to push an update so I'm deinstalling/reinstalling the theme. If we keep the prompt it's really confusing (the user gets prompted to "delete" just after tapping an "install" button). What do you think?
Attachment #8604081 - Flags: feedback?(fabrice)
Attachment #8604082 - Flags: feedback?(fabrice) → feedback+
(In reply to Etienne Segonzac (:etienne) from comment #4) > Comment on attachment 8604081 [details] [review] > [gaia] etiennesegonzac:bug-1161095 > mozilla-b2g:master > > I don't think we can use mozApps.mgmt.import() to push an update so I'm > deinstalling/reinstalling the theme. > > If we keep the prompt it's really confusing (the user gets prompted to > "delete" just after tapping an "install" button). > > What do you think? Yep, that's not a great experience. The fix looks ok but I'm slightly worried about generalizing that too much (I guess updating add-ons will need the same change).
Attachment #8604081 - Flags: feedback?(fabrice) → feedback+
Comment on attachment 8604081 [details] [review] [gaia] etiennesegonzac:bug-1161095 > mozilla-b2g:master Moving to review then! Added some tests (this part was not covered by unit tests yet, just homescreen integration tests).
Attachment #8604081 - Flags: review?(kgrandon)
Comment on attachment 8604082 [details] [review] Studio part Mind taking a look? :)
Attachment #8604082 - Flags: review?(hub)
Comment on attachment 8604081 [details] [review] [gaia] etiennesegonzac:bug-1161095 > mozilla-b2g:master Nice find. LGTM.
Attachment #8604081 - Flags: review?(kgrandon) → review+
Comment on attachment 8604082 [details] [review] Studio part Looks good
Attachment #8604082 - Flags: review?(hub) → review+
Keywords: checkin-needed
Keywords: checkin-needed
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: