Closed Bug 954850 Opened 10 years ago Closed 10 years ago

Unread ruler should also appear after last context message

Categories

(Instantbird Graveyard :: Conversation, defect)

defect
Not set
minor

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: aleth, Assigned: aleth)

References

Details

Attachments

(1 file, 3 obsolete files)

*** Original post on bio 1415 at 2012-05-01 09:53:00 UTC ***

This has two parts
1) Allowing the ruler to appear after the last context message when new messages arrive.
2) Making the ruler appear there when opening a conversation from hold.
Depends on: 954791
Attached patch Patch (obsolete) — Splinter Review
*** Original post on bio 1415 as attmnt 1429 at 2012-05-03 17:39:00 UTC ***

Also fixes a bug in the existing code, which this change made apparent: The ruler was being added to the DOM synchronously, while the messages are added asynchronously.
Attachment #8353181 - Flags: review?(florian)
Attached patch Patch (obsolete) — Splinter Review
*** Original post on bio 1415 as attmnt 1430 at 2012-05-03 18:39:00 UTC ***

Save two lines.
Attachment #8353182 - Flags: review?(florian)
Comment on attachment 8353181 [details] [diff] [review]
Patch

*** Original change on bio 1415 attmnt 1429 at 2012-05-03 18:39:15 UTC was without comment, so any subsequent comment numbers will be shifted ***
Attachment #8353181 - Attachment is obsolete: true
Attachment #8353181 - Flags: review?(florian)
*** Original post on bio 1415 at 2012-05-03 23:26:10 UTC ***

(In reply to comment #1)

> Also fixes a bug in the existing code, which this change made apparent: The
> ruler was being added to the DOM synchronously, while the messages are added
> asynchronously.

Landed the fix for that specific bug as https://hg.instantbird.org/instantbird/rev/ab4e62cebafa

This will hopefully simplify the next iteration of this patch that's quite difficult to review.
Attached patch Patch (obsolete) — Splinter Review
*** Original post on bio 1415 as attmnt 1435 at 2012-05-04 10:28:00 UTC ***

Reorganised and regrouped all the booleans to make it clearer what is going on in this part of the code. 

I can't see a way to get rid of this._writingContextMessages which isn't worse than keeping it (e.g. distinguishing between this._readCount == 0 and this._readCount === undefined just overloads the variable with two different uses)
Attachment #8353187 - Flags: review?(florian)
Comment on attachment 8353182 [details] [diff] [review]
Patch

*** Original change on bio 1415 attmnt 1430 at 2012-05-04 10:28:16 UTC was without comment, so any subsequent comment numbers will be shifted ***
Attachment #8353182 - Attachment is obsolete: true
Attachment #8353182 - Flags: review?(florian)
*** Original post on bio 1415 at 2012-05-04 17:25:51 UTC ***

I think it would be good to rename "setUnreadFlag" to "shouldSetUnreadFlag" as it sounds less ambiguous in my opinion (and there are lots of "should*" bools in Mozilla code already.)
Attached patch PatchSplinter Review
*** Original post on bio 1415 as attmnt 1444 at 2012-05-04 22:43:00 UTC ***

Implemented Mic's suggestion (I did not know about this convention) and hopefully improved the comment.
Attachment #8353196 - Flags: review?(florian)
Comment on attachment 8353187 [details] [diff] [review]
Patch

*** Original change on bio 1415 attmnt 1435 at 2012-05-04 22:43:45 UTC was without comment, so any subsequent comment numbers will be shifted ***
Attachment #8353187 - Attachment is obsolete: true
Attachment #8353187 - Flags: review?(florian)
Comment on attachment 8353196 [details] [diff] [review]
Patch

*** Original change on bio 1415 attmnt 1444 at 2012-05-04 22:51:23 UTC was without comment, so any subsequent comment numbers will be shifted ***
Attachment #8353196 - Flags: review?(florian) → review+
*** Original post on bio 1415 at 2012-05-04 23:35:01 UTC ***

https://hg.instantbird.org/instantbird/rev/3dba6fdbf6f6
Severity: normal → minor
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → 1.2
You need to log in before you can comment on or make changes to this bug.