Closed Bug 1436491 Opened 2 years ago Closed 2 years ago

Move category related functions into calCategoryUtils.jsm

Categories

(Calendar :: Internal Components, enhancement)

Lightning 6.2
enhancement
Not set

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: Fallen, Assigned: Fallen)

References

Details

Attachments

(2 files, 2 obsolete files)

Using the script from attachment 8942466 [details] [diff] [review] and the following migrations:

cal.setupDefaultCategories           -> cal.category.setupDefaultCategories
cal.getPrefCategoriesArray           -> cal.category.fromPrefs
cal.setPrefCategoriesFromArray       -> cal.category.toPrefs
cal.categoriesStringToArray          -> cal.category.stringToArray
cal.categoriesArrayToString          -> cal.category.arrayToString

I'd like to move window functions out of calUtils.js(m). Again, there will be some manual changes in one patch, and one with all automatic changes. This goes after bug 1436490 in patch order.
The function setPrefCategoriesFromArray() seems to be unused.
Attached patch Manual Changes - v1 (obsolete) β€” β€” Splinter Review
Removing toPrefs while there is fromPrefs makes me a bit uncomfortable, but there is indeed no further use so I'll remove it.

In case you are wondering about the categories.js removal, the code has moved into the category retrieval function where it should be.
Attachment #8949179 - Flags: review?(makemyday)
Attached patch Manual Changes - v2 (obsolete) β€” β€” Splinter Review
Attachment #8949179 - Attachment is obsolete: true
Attachment #8949179 - Flags: review?(makemyday)
Attachment #8949208 - Flags: review?(makemyday)
Attached patch Manual Changes - v3 β€” β€” Splinter Review
This is the patch I used on the try run.
Attachment #8949208 - Attachment is obsolete: true
Attachment #8949208 - Flags: review?(makemyday)
Attachment #8949337 - Flags: review?(makemyday)
Comment on attachment 8949337 [details] [diff] [review]
Manual Changes - v3

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

looks good, r=me
Attachment #8949337 - Flags: review?(makemyday) → review+
Please push both the automatic and manual patches, after the bug mentioned in comment 0.
Keywords: checkin-needed
Pushed by mozilla@jorgk.com:
https://hg.mozilla.org/comm-central/rev/3de68de8bf72
Move category related functions into calCategoryUtils.jsm - manual changes. r=MakeMyDay
https://hg.mozilla.org/comm-central/rev/79de47fa45ed
Move category related functions into calCategoryUtils.jsm - automatic changes. r=MakeMyDay
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → 6.2
You need to log in before you can comment on or make changes to this bug.