currentcallview: avoid to spam toggleRecording after switching inputs

Change-Id: I8fc0f90c16287b1150bd3c85a7522d256722c0ed
Reviewed-by: Philippe Gorley <philippe.gorley@savoirfairelinux.com>
diff --git a/src/currentcallview.cpp b/src/currentcallview.cpp
index ff4bbe4..16d8dbe 100644
--- a/src/currentcallview.cpp
+++ b/src/currentcallview.cpp
@@ -300,8 +300,12 @@
     auto callToRender = priv->cpp->conversation->callId;
     if (!priv->cpp->conversation->confId.empty())
         callToRender = priv->cpp->conversation->confId;
-    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(priv->togglebutton_record),
-                                (*priv->cpp->accountInfo)->callModel->isRecording(callToRender));
+    bool nextStatus = (*priv->cpp->accountInfo)->callModel->isRecording(callToRender);
+    bool currentStatus = (*priv->cpp->accountInfo)->callModel->isRecording(callToRender);
+    if (nextStatus != currentStatus) {
+        gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(priv->togglebutton_record),
+            (*priv->cpp->accountInfo)->callModel->isRecording(callToRender));
+    }
 }
 
 static void