Skip to content
Snippets Groups Projects
Commit 8e8787fa authored by Nicolas Jager's avatar Nicolas Jager
Browse files

fix : message text bugs

- fix wrong unread notifications.
- fix, closes the chat panel at the end of a call.
- cleanup some tricky code.

Change-Id: I65beca257bd4aee5451165ef6dc0a9ad5236161e
Tuleap: #790
parent cc883242
No related branches found
No related tags found
No related merge requests found
......@@ -232,7 +232,6 @@ void RingClientUWP::MainPage::OnsummonVideoPage()
}
}
videoPage->chatOpen = false;
videoPage->updatePageContent();
showFrame(_videoFrame_);
}
......
......@@ -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))) {
......
......@@ -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}"/>
......
......@@ -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();
}
......
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment