Bug 317866 - Messages are not sorted by time.
Summary: Messages are not sorted by time.
Status: RESOLVED FIXED
Alias: None
Product: telepathy
Classification: Unmaintained
Component: log-viewer (show other bugs)
Version: 0.6.0
Platform: Other Linux
: NOR minor
Target Milestone: Future
Assignee: Telepathy Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-04-05 08:59 UTC by Dennis Schridde
Modified: 2013-04-11 15:03 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 0.6.1
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dennis Schridde 2013-04-05 08:59:12 UTC
Currently the log viewer sorts messages by the time they were received, even if the time of sending that is included in the message disagrees with that.

I just noticed this when I began receiving backlog messages from $account@fakeskypedomain.fakedomain (Skype seems to do that to exchange history between its clients) and they were sorted in reverse order of the conversation (because Skype apparently sends the latest message first and then begins transmission of the older messages), even though the timestamp for each message seems to be correct (i.e. now log viewer shows the messages in this order: 01:04:02, 01:03:54, 01:03:09, 01:03:00, ... i.e. from the most current message at the top to the oldest message at the bottom).

Reproducible: Always
Comment 1 Daniele E. Domenichelli 2013-04-05 10:40:38 UTC
Is this a problem with the logviewer only or did you experienced something similar with the text-ui as well?
Comment 2 Dennis Schridde 2013-04-05 15:35:13 UTC
(In reply to comment #1)
> Is this a problem with the logviewer only or did you experienced something
> similar with the text-ui as well?

Yes, text-ui has the exact same problem.
Comment 3 David Edmundson 2013-04-08 17:10:05 UTC
TelepathyLogger only keeps one timestamp.

At which point there's nothing we can do.
Comment 4 Dennis Schridde 2013-04-08 17:38:35 UTC
How do you explain the logger displaying the time in reverse viewing order (but in the correct order they were originally written)?
Comment 5 Dennis Schridde 2013-04-08 17:40:12 UTC
(In reply to comment #4)
> How do you explain the logger displaying the time in reverse viewing order
> (but in the correct order they were originally written)?
they:=the messages
Comment 6 David Edmundson 2013-04-08 17:41:39 UTC
OK, so to clarify I have this correct:

The timestamps in the messages are perfectly correctly, but not displayed in the correct order.
Comment 7 Dennis Schridde 2013-04-08 17:42:54 UTC
Example:
ja 00:22:36
hi 00:22:20

I do not think this can be explained by sorting according to the one available timestamp. One possible explanation is that the messages are not sorted at all, but are instead being displayed in the order of arrival.
Comment 8 David Edmundson 2013-04-08 17:47:14 UTC
Sounds likely.  I'm updating the title so I don't get confused in future.

Fixing this properly (in the text-ui) is impractical with the current Adium themes.
However, we can add a quick fix in the log-viewer to sort things before displaying.
Comment 9 Daniel Vrátil 2013-04-11 15:03:58 UTC
Git commit be28c3891ac11ef4c2bb3b42279dc089f45a8c85 by Dan Vrátil.
Committed on 11/04/2013 at 17:03.
Pushed by dvratil into branch 'kde-telepathy-0.6'.

Sort log entries by timestamp before displaying them

Reviewed-By: David Edmundson, Martin Klapetek
FIXED-IN: 0.6.1

M  +10   -0    lib/logmanager.cpp
M  +8    -0    logviewer/message-view.cpp

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