summaryrefslogtreecommitdiff
path: root/plugins/NewsAggregator/Src
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/NewsAggregator/Src')
-rw-r--r--plugins/NewsAggregator/Src/Services.cpp4
-rw-r--r--plugins/NewsAggregator/Src/Update.cpp2
-rw-r--r--plugins/NewsAggregator/Src/Utils.cpp2
3 files changed, 4 insertions, 4 deletions
diff --git a/plugins/NewsAggregator/Src/Services.cpp b/plugins/NewsAggregator/Src/Services.cpp
index c16222014a..21705031da 100644
--- a/plugins/NewsAggregator/Src/Services.cpp
+++ b/plugins/NewsAggregator/Src/Services.cpp
@@ -228,11 +228,11 @@ INT_PTR NewsAggrGetAvatarInfo(WPARAM wParam, LPARAM lParam)
// otherwise, cached avatar is used
if (wParam & GAIF_FORCE && DBGetContactSettingDword(pai->hContact, MODULE, "UpdateTime", 60))
UpdateListAdd(pai->hContact);
- if (!ThreadRunning)
+ if (db_get_b(NULL, MODULE, "AutoUpdate", 1) != 0 && !ThreadRunning)
mir_forkthread(UpdateThreadProc, NULL);
DBVARIANT dbv = {0};
- if(DBGetContactSettingTString(pai->hContact,MODULE,"ImageURL",&dbv))
+ if(DBGetContactSettingTString(pai->hContact, MODULE, "ImageURL", &dbv))
{
return GAIR_NOAVATAR;
}
diff --git a/plugins/NewsAggregator/Src/Update.cpp b/plugins/NewsAggregator/Src/Update.cpp
index c0b42eb759..2ff5b0a071 100644
--- a/plugins/NewsAggregator/Src/Update.cpp
+++ b/plugins/NewsAggregator/Src/Update.cpp
@@ -39,7 +39,7 @@ VOID CALLBACK timerProc(HWND hwnd, UINT uMsg, UINT_PTR idEvent, DWORD dwTime)
if (DBGetContactSettingDword(hContact, MODULE, "UpdateTime", 60))
{
double diff = difftime(time(NULL), DBGetContactSettingDword(hContact, MODULE, "LastCheck", 0));
- if (diff >= DBGetContactSettingDword(hContact, MODULE, "UpdateTime", 60) * 60)
+ if (db_get_b(NULL, MODULE, "AutoUpdate", 1) != 0 && diff >= DBGetContactSettingDword(hContact, MODULE, "UpdateTime", 60) * 60)
{
UpdateListAdd(hContact);
HaveUpdates = TRUE;
diff --git a/plugins/NewsAggregator/Src/Utils.cpp b/plugins/NewsAggregator/Src/Utils.cpp
index 50aa1edefa..0a4cca2207 100644
--- a/plugins/NewsAggregator/Src/Utils.cpp
+++ b/plugins/NewsAggregator/Src/Utils.cpp
@@ -790,7 +790,7 @@ VOID CheckCurrentFeed(HANDLE hContact)
DBVARIANT dbURL = {0};
if (DBGetContactSettingTString(hContact, MODULE, "URL", &dbURL))
return;
- else if (db_get_b(NULL, MODULE, "AutoUpdate", 1) != 0 && db_get_b(hContact, MODULE, "CheckState", 1) != 0)
+ else if (db_get_b(hContact, MODULE, "CheckState", 1) != 0)
{
GetNewsData(dbURL.ptszVal, &szData, hContact, NULL);
DBFreeVariant(&dbURL);