Ignore:
Timestamp:
2012-11-11T14:42:20Z (9 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
62f6b45
Parents:
ddc2de5
Message:

Showing tweets now, and leaking less memory. Still lots of cleanup left
to do.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/twitter/twitter.c

    rddc2de5 rdff0e0b  
    55*                                                                           *
    66*  Copyright 2009 Geert Mulders <g.c.w.m.mulders@gmail.com>                 *
     7*  Copyright 2010-2012 Wilmer van der Gaast <wilmer@gaast.net>              *
    78*                                                                           *
    89*  This library is free software; you can redistribute it and/or            *
     
    6667        // Run this once. After this queue the main loop function.
    6768        twitter_main_loop(ic, -1, 0);
    68 
    69         // Queue the main_loop
    70         // Save the return value, so we can remove the timeout on logout.
    71         td->main_loop_id =
    72             b_timeout_add(set_getint(&ic->acc->set, "fetch_interval") * 1000, twitter_main_loop, ic);
     69       
     70        if (set_getbool(&ic->acc->set, "stream")) {
     71                /* That fetch was just to get backlog, the stream will give
     72                   us the rest. \o/ */
     73                twitter_open_stream(ic);
     74        } else {
     75                /* Not using the streaming API, so keep polling the old-
     76                   fashioned way. :-( */
     77                td->main_loop_id =
     78                    b_timeout_add(set_getint(&ic->acc->set, "fetch_interval") * 1000,
     79                                  twitter_main_loop, ic);
     80        }
    7381}
    7482
     
    279287
    280288        s = set_add(&acc->set, "strip_newlines", "false", set_eval_bool, acc);
     289       
     290        s = set_add(&acc->set, "stream", "true", set_eval_bool, acc);
     291        s->flags |= ACC_SET_OFFLINE_ONLY;
    281292}
    282293
Note: See TracChangeset for help on using the changeset viewer.