diff options
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 15 |
1 files changed, 6 insertions, 9 deletions
@@ -217,9 +217,6 @@ int main(int argc, char* argv[]){ int ret = read( fd, buffer, EVENT_BUF_LEN ); int i = 0; while( ret > 0 ) { -#ifdef DEBUG - fprintf(stderr, "%d\n", ret); -#endif struct inotify_event *event = (struct inotify_event*) (buffer+i); ret -= EVENT_SIZE + event->len; i += EVENT_SIZE + event->len; @@ -229,15 +226,16 @@ int main(int argc, char* argv[]){ #endif if( strncmp(event->name, "IN", 2) == 0 ) { sprintf(sms_filename, "%s%s", config.SMS_INBOX, event->name); - fprintf(stderr, "%s\n", sms_filename); - readSMS(sms_filename, 0); + readSMS(sms_filename, SMS_IN, SMS_UNREAD); } else { sprintf(sms_filename, "%s%s", config.SMS_SENTBOX, event->name); - fprintf(stderr, "%s\n", sms_filename); - readSMS(sms_filename, 1); + readSMS(sms_filename, SMS_OUT, SMS_UNREAD); } } } + if( i > 0 ) { + showContactListW(); + } if (c == KEY_RESIZE) { resize(); @@ -422,8 +420,7 @@ edit: } } - - } + } // inotify stuff if( wd_in >= 0 ) { |