The default bug view has changed. See this FAQ.

Support setting persistence to -1 for doorhangers

RESOLVED FIXED

Status

()

Firefox for Android
General
P2
normal
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: Margaret, Assigned: Margaret)

Tracking

unspecified
All
Android
Points:
---

Firefox Tracking Flags

(firefox11 fixed, fennec11+)

Details

Attachments

(1 attachment)

(Assignee)

Description

5 years ago
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.
(Assignee)

Comment 1

5 years ago
Created attachment 574422 [details] [diff] [review]
patch

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?
(Assignee)

Comment 3

5 years ago
(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! :)
(Assignee)

Comment 4

5 years ago
https://hg.mozilla.org/projects/birch/rev/2c4d1a8d4079
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
tracking-fennec: --- → 11+
status-firefox11: --- → fixed
You need to log in before you can comment on or make changes to this bug.