@ -32,9 +32,8 @@ extern "C" {
static MainWindow * s_mainWindow = nullptr ;
static MainWindow * s_mainWindow = nullptr ;
static void onMsgReceivedCallback ( const char * ch_id , int ch_id_len , uint64_t author ) {
static void onMsgReceivedCallback ( const char * ch_id , int ch_id_len , uint64_t author ) {
Q_UNUSED ( ch_id_len ) ;
if ( s_mainWindow )
if ( s_mainWindow )
s_mainWindow - > onMessageReceived ( ch_id , author ) ;
s_mainWindow - > onMessageReceived ( ch_id , ch_id_len , author ) ;
}
}
static void onChannelUpdatedCallback ( const char * ch_id , int ch_id_len ) {
static void onChannelUpdatedCallback ( const char * ch_id , int ch_id_len ) {
@ -334,8 +333,8 @@ void MainWindow::showSettings() {
dlg . exec ( ) ;
dlg . exec ( ) ;
}
}
void MainWindow : : onMessageReceived ( const char * ch_id , uint64_t author ) {
void MainWindow : : onMessageReceived ( const char * ch_id , int ch_id_len , uint64_t author ) {
QString cid = QString : : fromUtf8 ( ch_id ) ;
QString cid = QString : : fromUtf8 ( ch_id , ch_id_len ) ;
DEBUG_INFO ( DEBUG_CATEGORY_DEBUG , " MainWindow::onMessageReceived ch=%s author=%llu cur=%s " ,
DEBUG_INFO ( DEBUG_CATEGORY_DEBUG , " MainWindow::onMessageReceived ch=%s author=%llu cur=%s " ,
qPrintable ( cid ) , ( unsigned long long ) author , qPrintable ( m_currentChannelId ) ) ;
qPrintable ( cid ) , ( unsigned long long ) author , qPrintable ( m_currentChannelId ) ) ;
if ( m_db & & author ! = m_db - > myNodeId ( ) )
if ( m_db & & author ! = m_db - > myNodeId ( ) )