From 4ec1e6ac7076575a1c12718ce00510295ee16a05 Mon Sep 17 00:00:00 2001 From: Kirill Volinsky Date: Tue, 28 Aug 2012 17:50:31 +0000 Subject: NewsAggregator: fixed not checking feed at start when time set at 0 git-svn-id: http://svn.miranda-ng.org/main/trunk@1533 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/NewsAggregator/Src/Services.cpp | 11 +++++------ protocols/NewsAggregator/Src/Update.cpp | 2 +- 2 files changed, 6 insertions(+), 7 deletions(-) (limited to 'protocols/NewsAggregator') diff --git a/protocols/NewsAggregator/Src/Services.cpp b/protocols/NewsAggregator/Src/Services.cpp index e86e5fdd1f..e1514ffe31 100644 --- a/protocols/NewsAggregator/Src/Services.cpp +++ b/protocols/NewsAggregator/Src/Services.cpp @@ -169,13 +169,13 @@ INT_PTR NewsAggrGetInfo(WPARAM wParam,LPARAM lParam) INT_PTR CheckAllFeeds(WPARAM wParam,LPARAM lParam) { - HANDLE hContact= (HANDLE)CallService(MS_DB_CONTACT_FINDFIRST, 0, 0); + HANDLE hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDFIRST, 0, 0); while (hContact != NULL) { - if(IsMyContact(hContact)) - { + if (IsMyContact(hContact) && lParam && DBGetContactSettingDword(hContact, MODULE, "UpdateTime", 60)) + UpdateListAdd(hContact); + else if (IsMyContact(hContact) && !lParam) UpdateListAdd(hContact); - } hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDNEXT, (WPARAM)hContact, 0); } if (!ThreadRunning) @@ -238,9 +238,8 @@ INT_PTR NewsAggrGetAvatarInfo(WPARAM wParam,LPARAM lParam) // if GAIF_FORCE is set, we are updating the feed // otherwise, cached avatar is used - if (wParam & GAIF_FORCE) + if (wParam & GAIF_FORCE && DBGetContactSettingDword(pai->hContact, MODULE, "UpdateTime", 60)) UpdateListAdd(pai->hContact); - //CheckCurrentFeed(pai->hContact); if (!ThreadRunning) mir_forkthread(UpdateThreadProc, NULL); diff --git a/protocols/NewsAggregator/Src/Update.cpp b/protocols/NewsAggregator/Src/Update.cpp index f2f5ecf92a..0c2431e9a0 100644 --- a/protocols/NewsAggregator/Src/Update.cpp +++ b/protocols/NewsAggregator/Src/Update.cpp @@ -62,7 +62,7 @@ VOID CALLBACK timerProc2(HWND hwnd, UINT uMsg, UINT_PTR idEvent, DWORD dwTime) if (!Miranda_Terminated()) { - CheckAllFeeds(0,0); + CheckAllFeeds(0, 1); timerId = SetTimer(NULL, 0, 30000, (TIMERPROC)timerProc); } } -- cgit v1.2.3