right click in the calendar list bring up wrong calendar property dialog after toggle offline

RESOLVED FIXED in 3.3

Status

defect
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: weichen302, Assigned: weichen302)

Tracking

Lightning 2.6.4
x86_64
Linux

Details

Attachments

(1 attachment, 1 obsolete attachment)

Assignee

Description

5 years ago
Reproducible: Always

Steps to Reproduce:
Right click on a network calendar, in the properties dialog, toggle offline mode, accept change, then right click the same calendar again, open the properties dialog, this time the dialog shows properties of the calendar below, unless it right clicked calendar is the last one.


patch:
right click a calendar in calendar tree will assign it to compositeCalendar.defaultCalendar, if right click that calendar again without click another calendar, the  compositeCalendar.defaultCalendar is unchanged. It is normally okay until toggle calendar offline status from the right click => properties  dialog, the offline toggling remove old one, assign next calendar to compositeCalendar.defaultCalendar, and does not assign the newly created cached/uncached calendar to  compositeCalendar.defaultCalendar after done. The next time right click on calendar will bring up the properties dialog of the calendar below it, unless it is the last one in the tree view.
Attachment #8378866 - Flags: review?(philipp)
Duplicate of this bug: 839906
Assignee: nobody → weichen302
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Comment on attachment 8378866 [details] [diff] [review]
fix right click bring up wrong calendar property dialog

Looks good, r=philipp
Attachment #8378866 - Flags: review?(philipp) → review+
Comment on attachment 8378866 [details] [diff] [review]
fix right click bring up wrong calendar property dialog

Review of attachment 8378866 [details] [diff] [review]:
-----------------------------------------------------------------

::: calendar/base/content/widgets/calendar-list-tree.xml
@@ +499,5 @@
> +                composite.defaultCalendar.id !=
> +                      this.getCalendar(this.tree.currentIndex).id) {
> +              composite.defaultCalendar = this.getCalendar(
> +                                                        this.tree.currentIndex);
> +              }

Actually, these lines could be split up a bit with local variables, and it looks like there are some minor whitespace issues. I'll fix this before checkin.
Posted patch Fix - v2 β€” β€” Splinter Review
Here is the patch for checkin
Attachment #8378866 - Attachment is obsolete: true
Attachment #8392456 - Flags: review+
https://hg.mozilla.org/comm-central/rev/74fed8c5ce2d
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → 3.1
Target Milestone: 3.1 → 3.3
You need to log in before you can comment on or make changes to this bug.