Closed Bug 1050823 Opened 10 years ago Closed 9 years ago

[Messages][Refactoring] Revise "ThreadUI.updateHeaderData" call while retrieving threads

Categories

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

ARM
Gonk (Firefox OS)
defect
Not set
minor

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: azasypkin, Assigned: azasypkin)

References

Details

(Whiteboard: [sms-sprint-2.2S11][p=1])

Attachments

(1 file)

*** Follow-up from bug 1041124 ***

Looks like we don't need this call [1] anymore, but let's use this bug to check it to be 100% sure.

[1] https://github.com/mozilla-b2g/gaia/blob/8aff4c9d819544ddf8f1fa0928e5bb532aeab617/apps/sms/js/message_manager.js#L149
Will take a look if ThreadListUI(InboxView) still needs ThreadUI(ConversationView).updateHeaderData call since it's direct dependency between two views and blocks bug 1155509.
Assignee: nobody → azasypkin
Blocks: 1155509
Status: NEW → ASSIGNED
Comment on attachment 8598219 [details] [review]
[gaia] azasypkin:bug-1050823-remove-update-header > mozilla-b2g:master

Hey Julien,

Looks like we don't need this call anymore, I found only two cases when can call "updateHeaderData" when ThreadListUI is not rendered yet:

* When we open application via "new" activity - in this case "updateHeaderData" should work fine since Thread.active is set via [1];

* When we open application via notification - in this case "updateHeaderData" should work fine as well since Thread.active is set via [2];

I also added some integration tests to cover these non-really-obvious cases.

[1] https://github.com/mozilla-b2g/gaia/blob/42493f924fb1842976b1195689d9c755b539db31/apps/sms/js/message_manager.js#L515

[2] https://github.com/mozilla-b2g/gaia/blob/42493f924fb1842976b1195689d9c755b539db31/apps/sms/js/activity_handler.js#L241
Attachment #8598219 - Flags: review?(felash)
Comment on attachment 8598219 [details] [review]
[gaia] azasypkin:bug-1050823-remove-update-header > mozilla-b2g:master

I left some comments for the marionette tests.

If you want to land the code change + unit test change now and follow-up to get the marionette tests right it would work for me too.
Attachment #8598219 - Flags: review?(felash)
Whiteboard: [sms-sprint-2.2S11]
Comment on attachment 8598219 [details] [review]
[gaia] azasypkin:bug-1050823-remove-update-header > mozilla-b2g:master

Hey Julien,

I've fixed nits + added one more integration test we discussed in PR. I tend to leave both tests, but tell me what you think.

Thanks!
Attachment #8598219 - Flags: review?(felash)
Whiteboard: [sms-sprint-2.2S11] → [sms-sprint-2.2S11][p=1]
Comment on attachment 8598219 [details] [review]
[gaia] azasypkin:bug-1050823-remove-update-header > mozilla-b2g:master

r=me with some comments:

* I think we should set the storage before actually launching the app -- unless I miss something that makes this not desirable.
* file a bug to share the code for "launching with system message"
* some various nits.
Attachment #8598219 - Flags: review?(felash) → review+
See Also: → 1162165
Thanks for review!

(In reply to Julien Wajsberg [:julienw] (PTO May 8th -> May 17th) from comment #6)
> Comment on attachment 8598219 [details] [review]
> [gaia] azasypkin:bug-1050823-remove-update-header > mozilla-b2g:master
> * I think we should set the storage before actually launching the app --
> unless I miss something that makes this not desirable.

As we discussed it's impossible since there is no TestStorage until we run the app and inject content script to app frame.

> * file a bug to share the code for "launching with system message"

Yep, filed bug 1162165.

> * some various nits.

Nits fixed!
Keywords: checkin-needed
Status: ASSIGNED → RESOLVED
Closed: 9 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: