diff options
author | George Hazan <ghazan@miranda.im> | 2018-01-15 12:43:40 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-01-15 12:43:40 +0300 |
commit | 0f6cf3a8d9ffb93fd3ffe685cb54f293cc866650 (patch) | |
tree | d53e663037d79ca3e1b77c580427044b67eba63f /plugins | |
parent | 7cb1539b0dbcf585472dd2341129adf174bb0bb5 (diff) |
NewsAggregator: removed useless AI inside SetContactStatus
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/NewsAggregator/Src/Services.cpp | 10 | ||||
-rw-r--r-- | plugins/NewsAggregator/Src/version.h | 2 |
2 files changed, 3 insertions, 9 deletions
diff --git a/plugins/NewsAggregator/Src/Services.cpp b/plugins/NewsAggregator/Src/Services.cpp index ef78723338..92bfa6aa8a 100644 --- a/plugins/NewsAggregator/Src/Services.cpp +++ b/plugins/NewsAggregator/Src/Services.cpp @@ -23,12 +23,6 @@ int g_nStatus = ID_STATUS_ONLINE; UINT_PTR timerId = 0;
HANDLE hTBButton = nullptr, hNewsAggregatorFolder = nullptr;
-void SetContactStatus(MCONTACT hContact, int nNewStatus)
-{
- if(db_get_w(hContact, MODULE, "Status", ID_STATUS_ONLINE) != nNewStatus)
- db_set_w(hContact, MODULE, "Status", nNewStatus);
-}
-
int OnFoldersChanged(WPARAM, LPARAM)
{
FoldersGetCustomPathT(hNewsAggregatorFolder, tszRoot, MAX_PATH, L"");
@@ -45,7 +39,7 @@ int NewsAggrInit(WPARAM, LPARAM) for (MCONTACT hContact = db_find_first(MODULE); hContact; hContact = db_find_next(hContact, MODULE)) {
if (!db_get_b(NULL, MODULE, "StartupRetrieve", 1))
db_set_dw(hContact, MODULE, "LastCheck", time(nullptr));
- SetContactStatus(hContact, ID_STATUS_ONLINE);
+ db_set_w(hContact, MODULE, "Status", ID_STATUS_ONLINE);
}
NetlibInit();
@@ -110,7 +104,7 @@ INT_PTR NewsAggrSetStatus(WPARAM wp, LPARAM) g_nStatus = nStatus;
for (MCONTACT hContact = db_find_first(MODULE); hContact; hContact = db_find_next(hContact, MODULE))
- SetContactStatus(hContact, nStatus);
+ db_set_w(hContact, MODULE, "Status", nStatus);
ProtoBroadcastAck(MODULE, NULL, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE)nOldStatus, g_nStatus);
}
diff --git a/plugins/NewsAggregator/Src/version.h b/plugins/NewsAggregator/Src/version.h index 726ad31029..3d2eb2d0a3 100644 --- a/plugins/NewsAggregator/Src/version.h +++ b/plugins/NewsAggregator/Src/version.h @@ -1,7 +1,7 @@ #define __MAJOR_VERSION 0 #define __MINOR_VERSION 1 #define __RELEASE_NUM 0 -#define __BUILD_NUM 2 +#define __BUILD_NUM 3 #include <stdver.h> |