Bug 312603

Summary: Chat starting time should be when the first message was received
Product: [Unmaintained] telepathy Reporter: Daniele E. Domenichelli <ddomenichelli>
Component: text-uiAssignee: Telepathy Bugs <kde-telepathy-bugs-null>
Status: RESOLVED FIXED    
Severity: minor CC: kde
Priority: NOR Keywords: junior-jobs
Version First Reported In: 0.5.2   
Target Milestone: 0.5-next   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In: 0.5.3
Sentry Crash Report:
Attachments: Screenshot showing the problem

Description Daniele E. Domenichelli 2013-01-04 14:13:03 UTC
Created attachment 76183 [details]
Screenshot showing the problem

If you receive a message, wait for a while, and then open the chat, the time displayed by the chat is not the one of the first (new) message, but the time when you opened the chat.

(See the attachment to get an idea of the problem)
Comment 1 Daniele E. Domenichelli 2013-01-04 14:15:27 UTC
Targeting next minor release, hoping that some newcomer wants to take it ;)
Comment 2 David Edmundson 2013-01-22 01:30:37 UTC
We need to change:

    info.setTimeOpened(QDateTime::currentDateTime());

in the constructor 
To solve this I would look at d->channel's message queue (http://telepathy.freedesktop.org/doc/telepathy-qt/a00408.html#a4a0acad4523d9278a654888468219dff) when we start.

If it contains a message, extract the time from the first message, and use that. Otherwise use current time like we do now.
Comment 3 David Edmundson 2013-01-22 01:31:48 UTC
The above is referring to the constructor of ChatWidget, which inside lib.
Comment 4 Andrea Scarpino 2013-01-29 22:03:16 UTC
Git commit d12ffbd79d36d9e40753c6dfc80ab20bb12a018c by Andrea Scarpino.
Committed on 29/01/2013 at 23:00.
Pushed by scarpino into branch 'master'.

Show the first message time as chat starting time
FIXED-IN: 0.6

M  +8    -1    lib/chat-widget.cpp

http://commits.kde.org/telepathy-text-ui/d12ffbd79d36d9e40753c6dfc80ab20bb12a018c
Comment 5 Daniele E. Domenichelli 2013-01-30 12:57:05 UTC
Git commit fbdebd087dc72b514b2423abfddf672a9052469c by Daniele E. Domenichelli, on behalf of Andrea Scarpino.
Committed on 29/01/2013 at 23:00.
Pushed by ddomenichelli into branch 'kde-telepathy-0.5'.

Show the first message time as chat starting time
FIXED-IN: 0.5.3
(cherry picked from commit d12ffbd79d36d9e40753c6dfc80ab20bb12a018c)

Conflicts:
	lib/chat-widget.cpp

M  +8    -1    lib/chat-widget.cpp

http://commits.kde.org/telepathy-text-ui/fbdebd087dc72b514b2423abfddf672a9052469c