Closed Bug 702386 Opened 13 years ago Closed 13 years ago

Support setting persistence to -1 for doorhangers

Categories

(Firefox for Android Graveyard :: General, defect, P2)

All
Android
defect

Tracking

(firefox11 fixed, fennec11+)

RESOLVED FIXED
Tracking Status
firefox11 --- fixed
fennec 11+ ---

People

(Reporter: Margaret, Assigned: Margaret)

References

Details

Attachments

(1 file)

Follow-up to 700913, since I missed it. If persistence is set to -1, the doorhanger never closes automatically, but must be closed by the user.
Attached patch patch (deleted) — Splinter Review
When I was writing this patch I realized that my previous patch was actually buggy - there was no way to override the persistence or timeout options, even in cases where you always want to remove the doorhanger, like the onClick handler for the buttons. I modeled my fix after removeTransientNotifications in notification.xml, so now there's a separate remove method to handle this special location change case.
Attachment #574422 - Flags: review?(mark.finkle)
Priority: -- → P2
Attachment #574422 - Flags: review?(mark.finkle) → review+
Comment on attachment 574422 [details] [diff] [review] patch > public boolean shouldRemove() { >- if (mPersistence > 0) { >+ if (mPersistence != 0) { Maybe add a comment about -1 being a legal value meaning never automatically close?
(In reply to Mark Finkle (:mfinkle) from comment #2) > Comment on attachment 574422 [details] [diff] [review] [diff] [details] [review] > patch > > > public boolean shouldRemove() { > >- if (mPersistence > 0) { > >+ if (mPersistence != 0) { > > Maybe add a comment about -1 being a legal value meaning never automatically > close? Good call - the toolkit code didn't have that comment, and that's why I copied it wrong! :)
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
tracking-fennec: --- → 11+
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: