fixed messages not replacing

This commit is contained in:
fourtf 2018-06-19 20:19:43 +02:00
parent cf6bdeddc7
commit ee396bc1b8

View file

@ -435,7 +435,7 @@ void ChannelView::setChannel(ChannelPtr newChannel)
// on message replaced // on message replaced
this->channelConnections_.push_back( this->channelConnections_.push_back(
newChannel->messageReplaced.connect([this](size_t index, MessagePtr replacement) { newChannel->messageReplaced.connect([this](size_t index, MessagePtr replacement) {
if (this->messages.getSnapshot().getLength() >= index || index < 0) { if (index >= this->messages.getSnapshot().getLength() || index < 0) {
return; return;
} }