From 3698b20a47c8154322841a84d5bca0dbc70ac923 Mon Sep 17 00:00:00 2001 From: mathieui Date: Sat, 26 Jun 2021 20:58:04 +0200 Subject: fix: hack around the time limit for topic messages we cannot have nice things --- poezio/log_loader.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/poezio/log_loader.py b/poezio/log_loader.py index eae89607..146bc9b4 100644 --- a/poezio/log_loader.py +++ b/poezio/log_loader.py @@ -143,10 +143,10 @@ class LogLoader: count = 0 for msg in iterate_messages_reverse(filepath): typ_ = msg.pop('type') - if msg['time'] < limit: - break if typ_ == 'message': results.append(make_line_local(self.tab, msg)) + elif msg['time'] < limit and 'set the subject' not in msg['txt']: + break if len(results) >= nb: break count += 1 @@ -201,12 +201,12 @@ class LogLoader: filepath = self.logger.get_file_path(self.tab.jid) for msg in iterate_messages_reverse(filepath): typ_ = msg.pop('type') - if msg['time'] < limit: - break if start and msg['time'] < start: break if typ_ == 'message' and (not end or msg['time'] < end): results.append(make_line_local(self.tab, msg)) + elif msg['time'] < limit and 'set the subject' not in msg['txt']: + break if len(results) >= amount: break count += 1 -- cgit v1.2.3