Closed Bug 1041124 Opened 10 years ago Closed 10 years ago

[Messages][Refactoring] Make use of EventDispatcher in MessageManager

Categories

(Firefox OS Graveyard :: Gaia::SMS, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
2.1 S2 (15aug)

People

(Reporter: azasypkin, Assigned: azasypkin)

References

Details

(Whiteboard: [sms-sprint-2.1S1][p=1])

Attachments

(1 file)

It would beneficial for MessageManager to get rid of direct dependencies to UI Components (ThreadsUI, ThreadListUI, ReportView, LinkActionHandler, Navigation, Threads). MessageManager can just fire appropriate events using EventDispatcher implemented in bug 1039585.

It should also help to make transition to Messages Datastore smoother.
Comment on attachment 8460067 [details] [review]
GitHub pull request URL

Hey Julien,

Here is the patch that removes all UI dependencies from MessageManager. I have few questions that I left at GitHub. At the moment I see only one part that can be easily extracted to a separate patch - "Utils.defineLazyGetter", but since I'm not sure that you're ok with it's currently in this patch :)

Thanks!
Attachment #8460067 - Flags: review?(felash)
Whiteboard: [sms-sprint-2.1S1]
Comment on attachment 8460067 [details] [review]
GitHub pull request URL

Please flip the review flag once you're ready!
Attachment #8460067 - Flags: review?(felash)
Comment on attachment 8460067 [details] [review]
GitHub pull request URL

I believe it's ready for review now! :)
Attachment #8460067 - Flags: review?(felash)
Comment on attachment 8460067 [details] [review]
GitHub pull request URL

Removing r? until I rebase on the latest master that brings some conflicts
Attachment #8460067 - Flags: review?(felash)
Comment on attachment 8460067 [details] [review]
GitHub pull request URL

Ready, please take a look!
Attachment #8460067 - Flags: review?(felash)
Blocks: 1010318
Whiteboard: [sms-sprint-2.1S1] → [sms-sprint-2.1S1][p=1]
Target Milestone: --- → 2.1 S2 (15aug)
Comment on attachment 8460067 [details] [review]
GitHub pull request URL

Some remaining comments, but this looks really good and everything I tried works perfectly well on my phone !
Attachment #8460067 - Flags: review?(felash)
Blocks: 1050823
Comment on attachment 8460067 [details] [review]
GitHub pull request URL

(In reply to Julien Wajsberg [:julienw] from comment #7)
> Comment on attachment 8460067 [details] [review]
> GitHub pull request URL
> 
> Some remaining comments, but this looks really good and everything I tried
> works perfectly well on my phone !

Thanks for review! Fixed remaining comments..
Attachment #8460067 - Flags: review?(felash)
Comment on attachment 8460067 [details] [review]
GitHub pull request URL

r=me with some nits in the tests

please wait for a green Gu before merging (I know the other test suites are green already)
Attachment #8460067 - Flags: review?(felash) → review+
(In reply to Julien Wajsberg [:julienw] from comment #9)
> Comment on attachment 8460067 [details] [review]
> GitHub pull request URL
> 
> r=me with some nits in the tests
> 
> please wait for a green Gu before merging (I know the other test suites are
> green already)

Thanks for review! Try is green now.

Master: https://github.com/mozilla-b2g/gaia/commit/7f88caf0681e488dfd496377e05de2ed5bee4c6b
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: