[Bug 35886] Add support for text edits

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Fri Apr 29 18:30:21 CEST 2011


https://bugs.freedesktop.org/show_bug.cgi?id=35886

David Laban <david.laban at collabora.co.uk> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |david.laban at collabora.co.uk

--- Comment #1 from David Laban <david.laban at collabora.co.uk> 2011-04-29 09:30:19 PDT ---
After having a ref-counting crisis and talking with wjt for a while, I think I
have a minimal API:

supported use case is:
monday: message a
tuesday: message b supersedes a
wednesday: message c supersedes b

LogStore.get_events(monday) -> [c, b, a] (even though c happened on Wed) a
naive log viewer implementation should not lose the information that a was
edited.

c.dup_supersedes() -> [b, a]

a.dup_superseded_by() is not possible to implement without getting into
horrible refcounting issues, so I'm not going to implement it. If it is needed
later then LogStore.dup_superseded_by(a) is possible. Making get_events(monday)
also return edits means that this shouldn't be a problem.

The following representation is less trivial to implement (will file a bug and
do it later) but is representable by the api.
message a
message b supersedes a
message c supersedes a

c.dup_supersedes() -> [a, b]

Progress can be found at:
http://cgit.freedesktop.org/~alsuren/telepathy-logger/log/?h=edits

Currently, It doesn't properly link events that happen on different days
(requires some refactoring to make it easier to store events in random bullshit
places and deciding how to write a test for it), but it should be usable as a
base for CM/UI writers to test against if you avoid that bug.

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.



More information about the telepathy-bugs mailing list