diff --git a/MainPage.xaml.cpp b/MainPage.xaml.cpp index f219fb1b1632ea98086a724cea2a21c70d5c15c9..140a76b59549604e1eb16351964675067e36625e 100644 --- a/MainPage.xaml.cpp +++ b/MainPage.xaml.cpp @@ -232,7 +232,6 @@ void RingClientUWP::MainPage::OnsummonVideoPage() } } - videoPage->chatOpen = false; videoPage->updatePageContent(); showFrame(_videoFrame_); } diff --git a/MessageTextPage.xaml.cpp b/MessageTextPage.xaml.cpp index 9700db0acacfa8c7e10c3e8f1e881cd2e7862bb3..9c6be50edabb0f379825d09b70c86265dadc8aba 100644 --- a/MessageTextPage.xaml.cpp +++ b/MessageTextPage.xaml.cpp @@ -72,6 +72,7 @@ RingClientUWP::Views::MessageTextPage::updatePageContent() /* show the name of contact on the page */ _title_->Text = contact->_name; _profilName_->Text = contact->_displayName; + contact->_unreadMessages = 0; String^ image_path = Utils::toPlatformString(RingD::instance->getLocalFolder()) + ".vcards\\" + contact->_vcardUID + ".png"; if (Utils::fileExists(Utils::toString(image_path))) { diff --git a/SmartPanel.xaml b/SmartPanel.xaml index 187eda2afd7916031f1e4ccff5a6c799da04f9c5..44d098397ba6be1efbd7f7fa0f6131d8ec03371c 100644 --- a/SmartPanel.xaml +++ b/SmartPanel.xaml @@ -256,8 +256,6 @@ </Border>--> <Border x:Name="_visualNotificationNewMessage_" Visibility="{x:Bind _contact._unreadMessages, Converter={StaticResource _NewMessageBubleNotification_}, Mode=OneWay}" - BorderThickness="2" - BorderBrush="White" Style="{StaticResource BorderStyle2}"> <TextBlock Text="{x:Bind _contact._unreadMessages, Mode=OneWay}" Style="{StaticResource TextStyle3}"/> diff --git a/VideoPage.xaml.cpp b/VideoPage.xaml.cpp index 67dc210c22aa157a27c395924b2f021d9a1bdde3..1ec2c97e62acefdb69eaaea23034de426f588aed 100644 --- a/VideoPage.xaml.cpp +++ b/VideoPage.xaml.cpp @@ -136,6 +136,10 @@ VideoPage::VideoPage() } case CallStatus::ENDED: Video::VideoManager::instance->rendererManager()->raiseClearRenderTarget(); + + /* "close" the chat panel */ + _rowChatBx_->Height = 0; + break; case CallStatus::PEER_PAUSED: case CallStatus::PAUSED: @@ -267,15 +271,13 @@ void RingClientUWP::Views::VideoPage::_btnPause__Tapped(Platform::Object^ sender void RingClientUWP::Views::VideoPage::_btnChat__Tapped(Platform::Object^ sender, Windows::UI::Xaml::Input::TappedRoutedEventArgs^ e) { - chatOpen = !chatOpen; - _rowChatBx_->Height = (chatOpen) ? 200 : 0; - /*if (chatOpen) { + if (_rowChatBx_->Height == 0) { _rowChatBx_->Height = 200; - chatPanelCall(); + SmartPanelItemsViewModel::instance->_selectedItem->_contact->_unreadMessages = 0; } else { _rowChatBx_->Height = 0; - }*/ + } } @@ -395,19 +397,8 @@ VideoPage::WriteFrameAsSoftwareBitmapAsync(String^ id, uint8_t* buf, int width, void RingClientUWP::Views::VideoPage::OnincomingMessage(Platform::String ^callId, Platform::String ^payload) { - if (!chatOpen) { + if (_rowChatBx_->Height == 0) _rowChatBx_->Height = 200; - chatOpen = true; - } - - auto item = SmartPanelItemsViewModel::instance->_selectedItem; - - //if (item) - // if (item->_callId != callId) { - // SmartPanelItemsViewModel::instance->findItem(callId)->_contact->_unreadMessages++; - // //item->_contact->_unreadMessages++; - // } - scrollDown(); } diff --git a/VideoPage.xaml.h b/VideoPage.xaml.h index ffd567a6075db204c2491fdba553f620d21659a7..bda71fa12a6f9c021bae8c84d1f9d96cff017626 100644 --- a/VideoPage.xaml.h +++ b/VideoPage.xaml.h @@ -63,18 +63,6 @@ public: } } - property bool chatOpen // use this with a converter to set the height to 200px for the chatpanel... - { - bool get() - { - return chatOpen_; - } - void set(bool value) - { - chatOpen_ = value; - } - } - void scrollDown(); void screenVideo(bool state); @@ -95,7 +83,6 @@ internal: private: bool barFading_; - bool chatOpen_; void _sendBtn__Click(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e); void _messageTextBox__KeyDown(Platform::Object^ sender, Windows::UI::Xaml::Input::KeyRoutedEventArgs^ e);