Commit f2fdec8a authored by Nicolas Jager's avatar Nicolas Jager

fix : show the right frame when a call ends.

- returns to the welcome page if no contact is selected during the
end of the call. Returns to the text message page otherwise.

Change-Id: I817a8466b1c5f6725f02c94e2e0d4a678f2878e8
Tuleap: #1056
parent e87716fa
......@@ -63,8 +63,8 @@ MainPage::MainPage()
ContactsViewModel::instance->newContactSelected += ref new NewContactSelected([&]() {
Contact^ selectedContact = ContactsViewModel::instance->selectedContact;
auto call = selectedContact?
SmartPanelItemsViewModel::instance->findItem(selectedContact)->_call:
nullptr;
SmartPanelItemsViewModel::instance->findItem(selectedContact)->_call:
nullptr;
if (call != nullptr) {
if (call->state == "CURRENT")
showFrame(_videoFrame_);
......@@ -77,12 +77,18 @@ MainPage::MainPage()
});
ContactsViewModel::instance->noContactSelected += ref new NoContactSelected([&]() {
showFrame(_welcomeFrame_);
});
});
CallsViewModel::instance->callStarted += ref new CallStarted([&]() {
showFrame(_videoFrame_);
});
CallsViewModel::instance->callEnded += ref new CallEnded([&]() {
showFrame(_messageTextFrame_);
auto contact = ContactsViewModel::instance->selectedContact;
if(contact)
showFrame(_messageTextFrame_);
else
showFrame(_welcomeFrame_);
});
DisplayInformation^ displayInformation = DisplayInformation::GetForCurrentView();
......
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