!fixup Allow inserting messages into ConversationView with same sort_time as the latest

This commit is contained in:
fiaxh 2019-12-19 18:14:37 +01:00
parent 2938c685a2
commit 9565140f01

View file

@ -164,7 +164,7 @@ public class ConversationView : Box, Plugins.ConversationItemCollection, Plugins
public void insert_item(Plugins.MetaConversationItem item) {
if (meta_items.size > 0) {
bool after_last = meta_items.last().sort_time.compare(item.sort_time) < 0;
bool after_last = meta_items.last().sort_time.compare(item.sort_time) <= 0;
bool within_range = meta_items.last().sort_time.compare(item.sort_time) > 0 && meta_items.first().sort_time.compare(item.sort_time) < 0;
bool accept = within_range || (at_current_content && after_last);
if (!accept) {