Really fix duration of remote refresh timer for is-composing.

This commit is contained in:
Ghislain MARY 2017-09-01 11:41:17 +02:00
parent 5c8fe022b6
commit e414951cd9
2 changed files with 5 additions and 6 deletions

View file

@ -123,8 +123,10 @@ void IsComposing::startRefreshTimer () {
}
}
void IsComposing::startRemoteRefreshTimer () {
void IsComposing::startRemoteRefreshTimer (const char *refreshStr) {
int duration = getRemoteRefreshTimerDuration();
if (refreshStr)
duration = atoi(refreshStr);
if (!remoteRefreshTimer) {
remoteRefreshTimer = sal_create_timer(core->sal, remoteRefreshTimerExpired, this,
duration * 1000, "composing remote refresh timeout");
@ -217,11 +219,8 @@ void IsComposing::parse (xmlparsing_context_t *xmlCtx) {
if (stateStr) {
if (strcmp(stateStr, "active") == 0) {
//int refreshDuration = getRefreshTimerDuration();
state = true;
//if (refreshStr)
// refreshDuration = atoi(refreshStr);
startRemoteRefreshTimer();
startRemoteRefreshTimer(refreshStr);
} else {
stopRemoteRefreshTimer();
}

View file

@ -39,7 +39,7 @@ public:
void parse (const std::string &content);
void startIdleTimer ();
void startRefreshTimer ();
void startRemoteRefreshTimer ();
void startRemoteRefreshTimer (const char *refreshStr);
void stopComposing ();
void stopIdleTimer ();
void stopRefreshTimer ();