Commit e414951c authored by Ghislain MARY's avatar Ghislain MARY
Browse files

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

parent 5c8fe022
...@@ -123,8 +123,10 @@ void IsComposing::startRefreshTimer () { ...@@ -123,8 +123,10 @@ void IsComposing::startRefreshTimer () {
} }
} }
void IsComposing::startRemoteRefreshTimer () { void IsComposing::startRemoteRefreshTimer (const char *refreshStr) {
int duration = getRemoteRefreshTimerDuration(); int duration = getRemoteRefreshTimerDuration();
if (refreshStr)
duration = atoi(refreshStr);
if (!remoteRefreshTimer) { if (!remoteRefreshTimer) {
remoteRefreshTimer = sal_create_timer(core->sal, remoteRefreshTimerExpired, this, remoteRefreshTimer = sal_create_timer(core->sal, remoteRefreshTimerExpired, this,
duration * 1000, "composing remote refresh timeout"); duration * 1000, "composing remote refresh timeout");
...@@ -217,11 +219,8 @@ void IsComposing::parse (xmlparsing_context_t *xmlCtx) { ...@@ -217,11 +219,8 @@ void IsComposing::parse (xmlparsing_context_t *xmlCtx) {
if (stateStr) { if (stateStr) {
if (strcmp(stateStr, "active") == 0) { if (strcmp(stateStr, "active") == 0) {
//int refreshDuration = getRefreshTimerDuration();
state = true; state = true;
//if (refreshStr) startRemoteRefreshTimer(refreshStr);
// refreshDuration = atoi(refreshStr);
startRemoteRefreshTimer();
} else { } else {
stopRemoteRefreshTimer(); stopRemoteRefreshTimer();
} }
......
...@@ -39,7 +39,7 @@ public: ...@@ -39,7 +39,7 @@ public:
void parse (const std::string &content); void parse (const std::string &content);
void startIdleTimer (); void startIdleTimer ();
void startRefreshTimer (); void startRefreshTimer ();
void startRemoteRefreshTimer (); void startRemoteRefreshTimer (const char *refreshStr);
void stopComposing (); void stopComposing ();
void stopIdleTimer (); void stopIdleTimer ();
void stopRefreshTimer (); void stopRefreshTimer ();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment