diff options
Diffstat (limited to 'src/social/place.cpp')
-rw-r--r-- | src/social/place.cpp | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/src/social/place.cpp b/src/social/place.cpp index b7e5179..8b1f4f3 100644 --- a/src/social/place.cpp +++ b/src/social/place.cpp | |||
@@ -20,8 +20,10 @@ Place::Place (QObject *parent) : QObject (parent) | |||
20 | m_msg = 0; | 20 | m_msg = 0; |
21 | m_mod = 0; | 21 | m_mod = 0; |
22 | 22 | ||
23 | connect (this, &Place::setTrayMessageSignal, | 23 | #if FIXME |
24 | connect (this, &Place::setTrayMessage, | ||
24 | theApp, &App::setTrayMessage, Qt::QueuedConnection); | 25 | theApp, &App::setTrayMessage, Qt::QueuedConnection); |
26 | #endif | ||
25 | } | 27 | } |
26 | 28 | ||
27 | void | 29 | void |
@@ -229,6 +231,7 @@ Place::insertMessage (Message *msg) | |||
229 | 231 | ||
230 | // Find thread | 232 | // Find thread |
231 | 233 | ||
234 | bool newThread = false; | ||
232 | uint64_t threadId = 0; | 235 | uint64_t threadId = 0; |
233 | Modifier *mod = msg->findModifier ("_id_thread"); | 236 | Modifier *mod = msg->findModifier ("_id_thread"); |
234 | if (mod) | 237 | if (mod) |
@@ -256,8 +259,9 @@ Place::insertMessage (Message *msg) | |||
256 | } | 259 | } |
257 | } | 260 | } |
258 | 261 | ||
262 | m_threads += thread; | ||
259 | m_threadHash.insert (threadId, thread); | 263 | m_threadHash.insert (threadId, thread); |
260 | m_threadList.append (thread); | 264 | newThread = true; |
261 | } | 265 | } |
262 | 266 | ||
263 | // Find parent message | 267 | // Find parent message |
@@ -276,6 +280,13 @@ Place::insertMessage (Message *msg) | |||
276 | 280 | ||
277 | if (parent) | 281 | if (parent) |
278 | parent->appendChild (msg); | 282 | parent->appendChild (msg); |
283 | |||
284 | emit messageReceived (msg, parent, thread); | ||
285 | |||
286 | if (newThread) | ||
287 | { | ||
288 | emit threadAdded (msg); | ||
289 | } | ||
279 | } | 290 | } |
280 | 291 | ||
281 | 292 | ||
@@ -303,6 +314,6 @@ Place::notifyData (uint16_t *data_size, void *data) | |||
303 | return GNUNET_NO; | 314 | return GNUNET_NO; |
304 | 315 | ||
305 | m_inTransmit = false; | 316 | m_inTransmit = false; |
306 | emit dataSentSignal (); | 317 | emit dataSent (); |
307 | return GNUNET_YES; | 318 | return GNUNET_YES; |
308 | } | 319 | } |