~ubuntu-branches/ubuntu/saucy/geary/saucy-updates

« back to all changes in this revision

Viewing changes to src/client/models/conversation-list-store.vala

  • Committer: Package Import Robot
  • Author(s): Sebastien Bacher
  • Date: 2013-04-10 10:57:25 UTC
  • mfrom: (1.1.5)
  • Revision ID: package-import@ubuntu.com-20130410105725-f532n2cfre2sq6mf
Tags: 0.3.1-0ubuntu1
* New upstream bugfix version:
  - Reduced CPU and memory footprint
  - Account dialog bugs fixed
  - Stability improvements

Show diffs side-by-side

added added

removed removed

Lines of Context:
259
259
        Gtk.TreeIter iter;
260
260
        if (!get_iter_for_conversation(conversation, out iter)) {
261
261
            debug("Unable to find preview for conversation");
 
262
            
262
263
            return null;
263
264
        }
264
265
        
292
293
        
293
294
        Geary.Email? last_email = conversation.get_latest_email();
294
295
        if (last_email == null) {
 
296
            debug("Cannot refresh conversation: last email is null");
 
297
            
295
298
            remove(iter);
296
299
            return;
297
300
        }
305
308
            existing_message_data.num_emails = conversation.get_count();
306
309
            
307
310
            Gtk.TreePath? path = get_path(iter);
308
 
            if (path != null)
 
311
            if (path != null) {
309
312
                row_changed(path, iter);
 
313
            } else {
 
314
                debug("Cannot refresh conversation: no path for iterator");
 
315
            }
310
316
        }
311
317
    }
312
318
    
368
374
    
369
375
    private bool add_conversation(Geary.Conversation conversation) {
370
376
        Geary.Email? last_email = conversation.get_latest_email();
371
 
        if (last_email == null)
 
377
        if (last_email == null) {
 
378
            debug("Cannot add conversation: last email is null");
 
379
            
372
380
            return false;
 
381
        }
373
382
        
374
 
        if (has_conversation(conversation))
 
383
        if (has_conversation(conversation)) {
 
384
            debug("Conversation already present; not adding");
 
385
            
375
386
            return false;
 
387
        }
376
388
        
377
389
        Gtk.TreeIter iter;
378
390
        append(out iter);
423
435
    }
424
436
    
425
437
    private void on_conversation_appended(Geary.Conversation conversation) {
426
 
        if (has_conversation(conversation))
 
438
        if (has_conversation(conversation)) {
427
439
            refresh_conversation(conversation);
 
440
        } else {
 
441
            debug("Unable to append conversation; conversation not present in list store");
 
442
        }
428
443
    }
429
444
    
430
445
    private void on_conversation_trimmed(Geary.Conversation conversation) {