fix : property _unreadMessages set at 0

Change-Id: I7e4a5a9e745abedbb5c5584890e66bbbb7273e4c
Tuleap: #1203
diff --git a/SmartPanel.xaml.cpp b/SmartPanel.xaml.cpp
index 8aec15d..e091474 100644
--- a/SmartPanel.xaml.cpp
+++ b/SmartPanel.xaml.cpp
@@ -255,15 +255,22 @@
     }

 

     auto call = item->_call;

+    auto contact = item->_contact;

+

     if (call) {

         auto state = call->state;

+

         if (state == CallStatus::IN_PROGRESS) {

+            if (contact) {

+                contact->_unreadMessages = 0;

+                ContactsViewModel::instance->saveContactsToFile();

+            }

+

             summonVideoPage();

             return;

         }

     }

 

-    auto contact = item->_contact;

     if (contact) {

         summonMessageTextPage();

         contact->_unreadMessages = 0;