Closed Bug 1115295 Opened 10 years ago Closed 10 years ago

[Stingray][AppDeck/Home] Empty folders are not removed correctly in cardManager

Categories

(Firefox OS Graveyard :: Gaia, defect)

x86
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
2.2 S3 (9jan)

People

(Reporter: rexboy, Assigned: dwi2)

References

Details

(Whiteboard: [ft:conndevices])

Attachments

(2 files, 1 obsolete file)

When there are several empty folders, cardManager wouldn't remove them correctly after calling writeCardlistInCardStore(). Some of them keep remained. We also need to send card-removed event when empty folders are removed. To handle situations that several folders are removed at once, we may need to change argument passed to callback on card-removed such that multiple folders can be removed at once.
Assignee: nobody → tzhuang
Working on it
We could send `card-removed` event with detail of multiple indices of cardlist
Target Milestone: --- → 2.2 S3 (9jan)
Attached file WIP for cardManager (obsolete) —
The work in progress. Since Tzu-lin is doing refactoring, this is just for reference. It also includes some modification to allow inserting card/folder on specified position.
Another issue is that DETACHED folders are still written to database in the topmost cardList. (Although they don't generate new folder entries) We need to write cardList to database *after* excluding empty folders.
Attached file WIP for cardManager
Sorry I slightly changed it a bit. I found that it would be better to let user specify if it has to clean-up empty folders, otherwise rearranging would also cause empty folders to be cleaned. This is the WIP for reference.
Attachment #8541135 - Attachment is obsolete: true
Attached file pull request
Hi Rex, I made a patch based on the WIP you provided (https://bug1115295.bugzilla.mozilla.org/attachment.cgi?id=8541398). Please help to review it, thanks.
Attachment #8542887 - Flags: review?(rexboy)
Status: NEW → ASSIGNED
Comment on attachment 8542887 [details] [review] pull request Looks good to me with some comments. Thanks for the work!
Attachment #8542887 - Flags: review?(rexboy) → review+
Thanks, I modified commit message as commented and rebased the patch to latest master. Waiting fo Gaia-Try result https://treeherder.mozilla.org/ui/#/jobs?repo=gaia-try&revision=3bcc50c668e1
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Blocks: 1156143
Blocks: 1158665
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: