@ -248,6 +248,9 @@ void Widget::init()
@@ -248,6 +248,9 @@ void Widget::init()
ui - > searchContactFilterBox - > setMenu ( filterMenu ) ;
core = & profile . getCore ( ) ;
auto coreExt = core - > getExt ( ) ;
sharedMessageProcessorParams . reset ( new MessageProcessor : : SharedParams ( core - > getMaxMessageSize ( ) , coreExt - > getMaxExtendedMessageSize ( ) ) ) ;
contactListWidget = new FriendListWidget ( * core , this , settings . getGroupchatPosition ( ) ) ;
connect ( contactListWidget , & FriendListWidget : : searchCircle , this , & Widget : : searchCircle ) ;
@ -707,7 +710,7 @@ void Widget::onCoreChanged(Core& core)
@@ -707,7 +710,7 @@ void Widget::onCoreChanged(Core& core)
connect ( this , & Widget : : friendRequestAccepted , & core , & Core : : acceptFriendRequest ) ;
connect ( this , & Widget : : changeGroupTitle , & core , & Core : : changeGroupTitle ) ;
sharedMessageProcessorParams . setPublicKey ( core . getSelfPublicKey ( ) . toString ( ) ) ;
sharedMessageProcessorParams - > setPublicKey ( core . getSelfPublicKey ( ) . toString ( ) ) ;
}
void Widget : : onConnected ( )
@ -999,7 +1002,7 @@ void Widget::setUsername(const QString& username)
@@ -999,7 +1002,7 @@ void Widget::setUsername(const QString& username)
Qt : : convertFromPlainText ( username , Qt : : WhiteSpaceNormal ) ) ; // for overlength names
}
sharedMessageProcessorParams . onUserNameSet ( username ) ;
sharedMessageProcessorParams - > onUserNameSet ( username ) ;
}
void Widget : : onStatusMessageChanged ( const QString & newStatusMessage )
@ -1151,7 +1154,7 @@ void Widget::addFriend(uint32_t friendId, const ToxPk& friendPk)
@@ -1151,7 +1154,7 @@ void Widget::addFriend(uint32_t friendId, const ToxPk& friendPk)
connectFriendWidget ( * widget ) ;
auto history = profile . getHistory ( ) ;
auto messageProcessor = MessageProcessor ( sharedMessageProcessorParams ) ;
auto messageProcessor = MessageProcessor ( * sharedMessageProcessorParams ) ;
auto friendMessageDispatcher =
std : : make_shared < FriendMessageDispatcher > ( * newfriend , std : : move ( messageProcessor ) , * core , * core - > getExt ( ) ) ;
@ -2127,7 +2130,7 @@ Group* Widget::createGroup(uint32_t groupnumber, const GroupId& groupId)
@@ -2127,7 +2130,7 @@ Group* Widget::createGroup(uint32_t groupnumber, const GroupId& groupId)
const auto compact = settings . getCompactLayout ( ) ;
auto widget = new GroupWidget ( chatroom , compact ) ;
auto messageProcessor = MessageProcessor ( sharedMessageProcessorParams ) ;
auto messageProcessor = MessageProcessor ( * sharedMessageProcessorParams ) ;
auto messageDispatcher =
std : : make_shared < GroupMessageDispatcher > ( * newgroup , std : : move ( messageProcessor ) , * core ,
* core , settings ) ;