Turn code.js into a singleton
ClosedPublic

Authored by broulik on Feb 14 2018, 2:41 PM.

Details

Summary

Otherwise we would create an instance of this JS file for every delegate.
The only contextual object it uses is i18n, so pass that in for the function call.

Test Plan

Verified that the JS file is created only once. Speeds up things somewhat.
Verified that the favorites action still shows properly and works

Diff Detail

Repository
R119 Plasma Desktop
Lint
Lint Skipped
Unit
Unit Tests Skipped
broulik created this revision.Feb 14 2018, 2:41 PM
Restricted Application added a project: Plasma. · View Herald TranscriptFeb 14 2018, 2:41 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
broulik requested review of this revision.Feb 14 2018, 2:41 PM
davidedmundson accepted this revision.Feb 15 2018, 12:45 AM
This revision is now accepted and ready to land.Feb 15 2018, 12:45 AM
hein accepted this revision.Feb 15 2018, 10:28 AM

Nice! Thanks.

This revision was automatically updated to reflect the committed changes.