Commit b4c9587a authored by Daniel Brötzmann's avatar Daniel Brötzmann Committed by Philipp Hörist

Chat Markers: Correctly load displayed marker when restoring conversation

parent e643a25d
...@@ -49,8 +49,10 @@ def _adapt_common_error(common_error): ...@@ -49,8 +49,10 @@ def _adapt_common_error(common_error):
sqlite3.register_converter('common_error', _convert_common_error) sqlite3.register_converter('common_error', _convert_common_error)
sqlite3.register_adapter(CommonError, _adapt_common_error) sqlite3.register_adapter(CommonError, _adapt_common_error)
def _convert_marker(marker): def _convert_marker(marker):
return 'received' if marker == 0 else 'displayed' return 'received' if int(marker) == 0 else 'displayed'
sqlite3.register_converter('marker', _convert_marker) sqlite3.register_converter('marker', _convert_marker)
......
...@@ -964,7 +964,10 @@ def print_conversation_line(self, text, kind, name, tim, ...@@ -964,7 +964,10 @@ def print_conversation_line(self, text, kind, name, tim,
message_line.set_error(to_user_string(error)) message_line.set_error(to_user_string(error))
if marker is not None: if marker is not None:
message_line.set_receipt() if marker == 'received':
message_line.set_receipt()
elif marker == 'displayed':
message_line.set_displayed()
if index is None: if index is None:
# New Message # New Message
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment