Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
savoirfairelinux
jami-client-uwp
Commits
c551c365
Commit
c551c365
authored
Oct 01, 2016
by
Nicolas Jager
Browse files
smartpanel : refactoring
Change-Id: Iea01dd8242270e1c080cd95030da4d211638d993 Tuleap: #1202
parent
f2fdec8a
Changes
21
Hide whitespace changes
Inline
Side-by-side
Call.cpp
View file @
c551c365
...
...
@@ -35,17 +35,10 @@ Call::Call(String^ accountIdz, String^ callIdz, String^ fromz)
isOutGoing
=
false
;
// by default, we consider the call incomming, REFACTO : add this to the constructor params...
this
->
state
=
"incoming call"
;
this
->
state
=
CallStatus
::
NONE
;
this
->
code
=
-
1
;
}
void
RingClientUWP
::
Call
::
stateChange
(
String
^
state
,
int
code
)
{
this
->
state
=
state
;
PropertyChanged
(
this
,
ref
new
PropertyChangedEventArgs
(
"state"
));
this
->
code
=
code
;
}
void
Call
::
NotifyPropertyChanged
(
String
^
propertyName
)
{
...
...
Call.h
View file @
c551c365
...
...
@@ -21,12 +21,15 @@ using namespace Windows::UI::Xaml::Data;
namespace
RingClientUWP
{
/* enumerations. */
public
enum
class
CallStatus
{
NONE
,
INCOMING_RINGING
,
OUTGOING_RINGING
,
SEARCHING
,
IN_PROGRESS
,
ENDED
};
public
ref
class
Call
sealed
:
public
INotifyPropertyChanged
{
public:
/* functions */
Call
(
String
^
accountId
,
String
^
callId
,
String
^
from
);
void
stateChange
(
String
^
state
,
int
code
);
/* properties */
virtual
event
PropertyChangedEventHandler
^
PropertyChanged
;
...
...
@@ -34,7 +37,15 @@ public:
property
String
^
accountId
;
property
String
^
callId
;
property
String
^
from
;
property
String
^
state
;
property
CallStatus
state
{
CallStatus
get
()
{
return
state_
;
}
void
set
(
CallStatus
value
)
{
state_
=
value
;
PropertyChanged
(
this
,
ref
new
PropertyChangedEventArgs
(
"state"
));
}
}
property
bool
isOutGoing
;
property
int
code
;
...
...
@@ -49,6 +60,9 @@ internal:
void
accept
();
void
cancel
();
private:
CallStatus
state_
;
};
}
CallsViewModel.cpp
View file @
c551c365
...
...
@@ -34,32 +34,10 @@ CallsViewModel::CallsViewModel()
RingD
::
instance
->
incomingCall
+=
ref
new
RingClientUWP
::
IncomingCall
([
&
](
String
^
accountId
,
String
^
callId
,
String
^
from
)
{
auto
call
=
addNewCall
(
accountId
,
callId
,
from
);
// REFACTO : add if call == nullptr
callRecieved
(
call
);
});
RingD
::
instance
->
stateChange
+=
ref
new
RingClientUWP
::
StateChange
([
&
](
String
^
callId
,
String
^
state
,
int
code
)
{
for
each
(
auto
call
in
CallsList_
)
{
if
(
call
->
callId
==
callId
)
{
if
(
state
==
"OVER"
)
{
delete
call
;
call
->
stateChange
(
""
,
code
);
callEnded
();
callStatusUpdated
(
call
);
// used ?
RingD
::
instance
->
hangUpCall
(
call
);
return
;
}
else
if
(
state
==
"CURRENT"
)
{
callStarted
();
}
call
->
stateChange
(
state
,
code
);
callStatusUpdated
(
call
);
// same...
return
;
}
}
WNG_
(
"Call not found"
);
if
(
call
)
callRecieved
(
call
);
});
RingD
::
instance
->
stateChange
+=
ref
new
RingClientUWP
::
StateChange
(
this
,
&
RingClientUWP
::
ViewModel
::
CallsViewModel
::
OnstateChange
);
}
Call
^
...
...
@@ -87,3 +65,20 @@ CallsViewModel::findCall(String^ callId)
return
nullptr
;
}
void
RingClientUWP
::
ViewModel
::
CallsViewModel
::
OnstateChange
(
Platform
::
String
^
callId
,
RingClientUWP
::
CallStatus
state
,
int
code
)
{
auto
call
=
findCall
(
callId
);
if
(
!
call
)
return
;
switch
(
state
)
{
case
CallStatus
::
ENDED
:
RingD
::
instance
->
hangUpCall
(
call
);
default:
break
;
}
}
CallsViewModel.h
View file @
c551c365
...
...
@@ -66,6 +66,7 @@ private:
CallsViewModel
();
// singleton
Vector
<
Call
^>^
CallsList_
;
// refacto : change C to c
void
OnstateChange
(
Platform
::
String
^
callId
,
RingClientUWP
::
CallStatus
state
,
int
code
);
};
}
}
Contact.cpp
View file @
c551c365
...
...
@@ -65,28 +65,6 @@ Contact::Contact(String^ name,
notificationNewMessage
=
Windows
::
UI
::
Xaml
::
Visibility
::
Visible
;
PropertyChanged
(
this
,
ref
new
PropertyChangedEventArgs
(
"unreadMessages"
));
}
/* connect to delegate */
ContactsViewModel
::
instance
->
notifyNewConversationMessage
+=
ref
new
NotifyNewConversationMessage
([
&
]
(
bool
isContactNotSelected
)
{
if
(
isContactNotSelected
)
PropertyChanged
(
this
,
ref
new
PropertyChangedEventArgs
(
"unreadMessages"
));
});
ContactsViewModel
::
instance
->
newContactSelected
+=
ref
new
RingClientUWP
::
NewContactSelected
([
&
]()
{
if
(
ContactsViewModel
::
instance
->
selectedContact
==
this
)
{
PropertyChanged
(
this
,
ref
new
PropertyChangedEventArgs
(
"unreadMessages"
));
notificationNewMessage
=
Windows
::
UI
::
Xaml
::
Visibility
::
Collapsed
;
unreadMessages_
=
0
;
ContactsViewModel
::
instance
->
saveContactsToFile
();
}
});
}
void
Contact
::
addNotifyNewConversationMessage
()
{
notificationNewMessage
=
Windows
::
UI
::
Xaml
::
Visibility
::
Visible
;
unreadMessages_
++
;
}
void
...
...
@@ -169,4 +147,8 @@ Contact::saveConversationToFile()
file
.
close
();
}
}
}
\ No newline at end of file
}
Contact.h
View file @
c551c365
...
...
@@ -64,23 +64,16 @@ public:
PropertyChanged
(
this
,
ref
new
PropertyChangedEventArgs
(
"notificationNewMessage"
));
}
}
property
String
^
unreadMessages
property
uint32
_
unreadMessages
{
String
^
get
()
uint32
get
()
{
return
unreadMessages_
.
ToString
()
;
return
unreadMessages_
;
}
}
property
Call
^
_call
{
Call
^
get
()
{
return
call_
;
}
void
set
(
Call
^
call
)
void
set
(
uint32
value
)
{
call
_
=
c
al
l
;
PropertyChanged
(
this
,
ref
new
PropertyChangedEventArgs
(
"_
call
"
));
unreadMessages
_
=
v
al
ue
;
PropertyChanged
(
this
,
ref
new
PropertyChangedEventArgs
(
"_
unreadMessages
"
));
}
}
property
Windows
::
UI
::
Xaml
::
GridLength
_contactBarHeight
...
...
@@ -100,7 +93,6 @@ internal:
void
saveConversationToFile
();
String
^
StringifyConversation
();
void
DestringifyConversation
(
String
^
data
);
void
addNotifyNewConversationMessage
();
protected:
void
NotifyPropertyChanged
(
String
^
propertyName
);
...
...
@@ -110,7 +102,6 @@ private:
Visibility
notificationNewMessage_
;
unsigned
int
unreadMessages_
;
Windows
::
UI
::
Xaml
::
GridLength
contactBarHeight_
=
0
;
Call
^
call_
;
};
}
ContactsViewModel.cpp
View file @
c551c365
...
...
@@ -39,13 +39,13 @@ ContactsViewModel::ContactsViewModel()
/* connect delegates. */
RingD
::
instance
->
incomingAccountMessage
+=
ref
new
IncomingAccountMessage
([
&
](
String
^
accountId
,
String
^
from
,
String
^
payload
)
{
auto
contact
=
findContactByName
(
from
);
String
^
from
RingId
,
String
^
payload
)
{
auto
contact
=
findContactByName
(
from
RingId
);
if
(
contact
==
nullptr
)
contact
=
addNewContact
(
from
,
from
);
// contact checked inside addNewContact.
contact
=
addNewContact
(
from
RingId
,
fromRingId
);
// contact checked inside addNewContact.
bool
isNotSelected
=
(
contact
!=
Contact
sViewModel
::
instance
->
selected
Contact
)
?
true
:
false
;
auto
item
=
SmartPanelItem
sViewModel
::
instance
->
_
selected
Item
;
if
(
contact
==
nullptr
)
{
ERR_
(
"contact not handled!"
);
...
...
@@ -57,15 +57,13 @@ ContactsViewModel::ContactsViewModel()
/* save contacts conversation to disk */
contact
->
saveConversationToFile
();
if
(
contact
->
ringID_
==
from
)
{
// increment contact's unread message count
if
(
isNotSelected
)
{
contact
->
addNotifyNewConversationMessage
();
// save to disk
saveContactsToFile
();
}
// update the xaml for all contacts
notifyNewConversationMessage
(
isNotSelected
);
auto
selectedContact
=
(
item
)
?
item
->
_contact
:
nullptr
;
if
(
contact
->
ringID_
==
fromRingId
&&
contact
!=
selectedContact
)
{
contact
->
_unreadMessages
++
;
/* saveContactsToFile used to save the notification */
saveContactsToFile
();
}
});
}
...
...
ContactsViewModel.h
View file @
c551c365
...
...
@@ -26,11 +26,6 @@ namespace RingClientUWP
{
/* delegates */
delegate
void
NewContactSelected
();
delegate
void
NoContactSelected
();
delegate
void
ScreenConversationMessage
(
String
^
accountId
,
String
^
from
,
String
^
payload
);
delegate
void
NotifyNewConversationMessage
(
bool
isContactNotSelected
);
delegate
void
ShowContactBar
();
delegate
void
ContactAdded
(
Contact
^
);
namespace
ViewModel
{
...
...
@@ -56,23 +51,6 @@ internal:
void
Destringify
(
String
^
data
);
/* properties */
property
Contact
^
selectedContact
{
Contact
^
get
()
{
return
currentItem_
;
}
void
set
(
Contact
^
value
)
{
oldItem_
=
currentItem_
;
currentItem_
=
value
;
if
(
value
)
newContactSelected
();
else
noContactSelected
();
}
}
property
Vector
<
Contact
^>^
contactsList
{
Vector
<
Contact
^>^
get
()
...
...
@@ -82,11 +60,6 @@ internal:
}
/* events */
event
NewContactSelected
^
newContactSelected
;
event
NoContactSelected
^
noContactSelected
;
event
ScreenConversationMessage
^
screenConversationMessage
;
event
NotifyNewConversationMessage
^
notifyNewConversationMessage
;
event
ShowContactBar
^
showContactBar
;
event
ContactAdded
^
contactAdded
;
private:
...
...
MainPage.xaml.cpp
View file @
c551c365
...
...
@@ -60,36 +60,13 @@ MainPage::MainPage()
_messageTextFrame_
->
Navigate
(
TypeName
(
RingClientUWP
::
Views
::
MessageTextPage
::
typeid
));
/* connect to delegates */
ContactsViewModel
::
instance
->
newContactSelected
+=
ref
new
NewContactSelected
([
&
]()
{
Contact
^
selectedContact
=
ContactsViewModel
::
instance
->
selectedContact
;
auto
call
=
selectedContact
?
SmartPanelItemsViewModel
::
instance
->
findItem
(
selectedContact
)
->
_call
:
nullptr
;
if
(
call
!=
nullptr
)
{
if
(
call
->
state
==
"CURRENT"
)
showFrame
(
_videoFrame_
);
else
showFrame
(
_messageTextFrame_
);
}
else
{
showFrame
(
_messageTextFrame_
);
}
});
ContactsViewModel
::
instance
->
noContactSelected
+=
ref
new
NoContactSelected
([
&
]()
{
showFrame
(
_welcomeFrame_
);
});
CallsViewModel
::
instance
->
callStarted
+=
ref
new
CallStarted
([
&
]()
{
showFrame
(
_videoFrame_
);
});
CallsViewModel
::
instance
->
callEnded
+=
ref
new
CallEnded
([
&
]()
{
auto
contact
=
ContactsViewModel
::
instance
->
selectedContact
;
if
(
contact
)
showFrame
(
_messageTextFrame_
);
else
showFrame
(
_welcomeFrame_
);
});
RingD
::
instance
->
stateChange
+=
ref
new
RingClientUWP
::
StateChange
(
this
,
&
RingClientUWP
::
MainPage
::
OnstateChange
);
auto
smartPanel
=
dynamic_cast
<
SmartPanel
^>
(
_smartPanel_
->
Content
);
smartPanel
->
summonMessageTextPage
+=
ref
new
RingClientUWP
::
SummonMessageTextPage
(
this
,
&
RingClientUWP
::
MainPage
::
OnsummonMessageTextPage
);
smartPanel
->
summonWelcomePage
+=
ref
new
RingClientUWP
::
SummonWelcomePage
(
this
,
&
RingClientUWP
::
MainPage
::
OnsummonWelcomePage
);
smartPanel
->
summonVideoPage
+=
ref
new
RingClientUWP
::
SummonVideoPage
(
this
,
&
RingClientUWP
::
MainPage
::
OnsummonVideoPage
);
auto
videoPage
=
dynamic_cast
<
VideoPage
^>
(
_videoFrame_
->
Content
);
videoPage
->
pressHangUpCall
+=
ref
new
RingClientUWP
::
PressHangUpCall
(
this
,
&
RingClientUWP
::
MainPage
::
OnpressHangUpCall
);
DisplayInformation
^
displayInformation
=
DisplayInformation
::
GetForCurrentView
();
dpiChangedtoken
=
(
displayInformation
->
DpiChanged
+=
ref
new
TypedEventHandler
<
DisplayInformation
^
,
...
...
@@ -132,7 +109,6 @@ RingClientUWP::MainPage::showFrame(Windows::UI::Xaml::Controls::Frame^ frame)
dynamic_cast
<
VideoPage
^>
(
_videoFrame_
->
Content
)
->
updatePageContent
();
}
else
if
(
frame
==
_messageTextFrame_
)
{
_navGrid_
->
SetRow
(
_messageTextFrame_
,
1
);
dynamic_cast
<
MessageTextPage
^>
(
_messageTextFrame_
->
Content
)
->
updatePageContent
();
}
}
...
...
@@ -227,4 +203,60 @@ void
RingClientUWP
::
MainPage
::
hideLoadingOverlay
()
{
_loadingOverlay_
->
Visibility
=
Windows
::
UI
::
Xaml
::
Visibility
::
Collapsed
;
}
\ No newline at end of file
}
void
RingClientUWP
::
MainPage
::
OnsummonMessageTextPage
()
{
auto
messageTextPage
=
dynamic_cast
<
MessageTextPage
^>
(
_messageTextFrame_
->
Content
);
messageTextPage
->
updatePageContent
();
showFrame
(
_messageTextFrame_
);
}
void
RingClientUWP
::
MainPage
::
OnsummonWelcomePage
()
{
showFrame
(
_welcomeFrame_
);
}
void
RingClientUWP
::
MainPage
::
OnsummonVideoPage
()
{
auto
videoPage
=
dynamic_cast
<
VideoPage
^>
(
_videoFrame_
->
Content
);
videoPage
->
updatePageContent
();
showFrame
(
_videoFrame_
);
}
void
RingClientUWP
::
MainPage
::
OnpressHangUpCall
()
{
OnsummonMessageTextPage
();
}
void
RingClientUWP
::
MainPage
::
OnstateChange
(
Platform
::
String
^
callId
,
RingClientUWP
::
CallStatus
state
,
int
code
)
{
auto
item
=
SmartPanelItemsViewModel
::
instance
->
_selectedItem
;
switch
(
state
)
{
/* send the user to the peer's message text page */
case
CallStatus
::
ENDED
:
{
if
(
item
)
OnsummonMessageTextPage
();
break
;
}
/* if the state changes to IN_PROGRESS for any peer, show the video page.
nb : the peer is currently selected from the SmartPannel. */
case
CallStatus
::
IN_PROGRESS
:
{
if
(
item
)
OnsummonVideoPage
();
break
;
}
default:
break
;
}
}
MainPage.xaml.h
View file @
c551c365
...
...
@@ -24,6 +24,7 @@ using namespace Windows::Foundation;
namespace
RingClientUWP
{
namespace
Views
{
}
public
ref
class
MainPage
sealed
...
...
@@ -51,5 +52,10 @@ private:
void
_toggleSmartBoxButton__Click
(
Platform
::
Object
^
sender
,
Windows
::
UI
::
Xaml
::
RoutedEventArgs
^
e
);
void
showFrame
(
Windows
::
UI
::
Xaml
::
Controls
::
Frame
^
frame
);
void
OnsummonMessageTextPage
();
void
OnsummonWelcomePage
();
void
OnsummonVideoPage
();
void
OnpressHangUpCall
();
void
OnstateChange
(
Platform
::
String
^
callId
,
RingClientUWP
::
CallStatus
state
,
int
code
);
};
}
\ No newline at end of file
MessageTextPage.xaml.cpp
View file @
c551c365
...
...
@@ -16,8 +16,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
**************************************************************************/
#include
"pch.h"
#include
"ContactsViewModel.h"
#include
"MainPage.xaml.h"
#include
"MessageTextPage.xaml.h"
...
...
@@ -44,25 +44,19 @@ MessageTextPage::MessageTextPage()
{
InitializeComponent
();
/* connect delegates. */
// REFACTO : useless ?
/* connect to delegates */
RingD
::
instance
->
incomingAccountMessage
+=
ref
new
IncomingAccountMessage
([
&
](
String
^
accountId
,
String
^
from
,
String
^
payload
)
{
});
ContactsViewModel
::
instance
->
notifyNewConversationMessage
+=
ref
new
NotifyNewConversationMessage
([
&
](
bool
isContactNotSelected
)
{
if
(
!
isContactNotSelected
)
{
/* if the contact is selected that means we should scroll down */
scrollDown
();
}
String
^
fromRingId
,
String
^
payload
)
{
scrollDown
();
});
}
void
RingClientUWP
::
Views
::
MessageTextPage
::
updatePageContent
()
{
auto
contact
=
ContactsViewModel
::
instance
->
selectedContact
;
auto
item
=
SmartPanelItemsViewModel
::
instance
->
_selectedItem
;
auto
contact
=
item
->
_contact
;
if
(
!
contact
)
return
;
...
...
@@ -96,7 +90,9 @@ RingClientUWP::Views::MessageTextPage::_messageTextBox__KeyDown(Platform::Object
void
RingClientUWP
::
Views
::
MessageTextPage
::
sendMessage
()
{
auto
contact
=
ContactsViewModel
::
instance
->
selectedContact
;
auto
item
=
SmartPanelItemsViewModel
::
instance
->
_selectedItem
;
auto
contact
=
item
->
_contact
;
auto
txt
=
_messageTextBox_
->
Text
;
/* empty the textbox */
...
...
RingD.cpp
View file @
c551c365
...
...
@@ -67,7 +67,8 @@ void RingClientUWP::RingD::sendAccountTextMessage(String^ message)
std
::
string
accountId3
(
accountId2
.
begin
(),
accountId2
.
end
());
/* recipient */
auto
contact
=
ContactsViewModel
::
instance
->
selectedContact
;
auto
item
=
SmartPanelItemsViewModel
::
instance
->
_selectedItem
;
auto
contact
=
item
->
_contact
;
auto
toRingId
=
contact
->
ringID_
;
std
::
wstring
toRingId2
(
toRingId
->
Begin
());
std
::
string
toRingId3
(
toRingId2
.
begin
(),
toRingId2
.
end
());
...
...
@@ -197,7 +198,7 @@ RingClientUWP::RingD::startDaemon()
CoreDispatcherPriority
::
Normal
,
ref
new
DispatchedHandler
([
=
]()
{
incomingCall
(
accountId2
,
callId2
,
from2
);
stateChange
(
callId2
,
"incoming call"
,
0
);
stateChange
(
callId2
,
CallStatus
::
INCOMING_RINGING
,
0
);
}));
}),
DRing
::
exportable_callback
<
DRing
::
CallSignal
::
StateChange
>
([
this
](
...
...
@@ -213,11 +214,13 @@ RingClientUWP::RingD::startDaemon()
auto
callId2
=
toPlatformString
(
callId
);
auto
state2
=
toPlatformString
(
state
);
auto
state3
=
getCallStatus
(
state2
);
CoreApplication
::
MainView
->
CoreWindow
->
Dispatcher
->
RunAsync
(
CoreDispatcherPriority
::
Low
,
ref
new
DispatchedHandler
([
=
]()
{
stateChange
(
callId2
,
state
2
,
code
);
stateChange
(
callId2
,
state
3
,
code
);
}));
}),
DRing
::
exportable_callback
<
DRing
::
ConfigurationSignal
::
IncomingAccountMessage
>
([
&
](
...
...
@@ -414,3 +417,23 @@ RingD::dequeueTasks()
tasksList_
.
pop
();
}
}
CallStatus
RingClientUWP
::
RingD
::
getCallStatus
(
String
^
state
)
{
if
(
state
==
"INCOMING"
)
return
CallStatus
::
INCOMING_RINGING
;
if
(
state
==
"CURRENT"
)
return
CallStatus
::
IN_PROGRESS
;
if
(
state
==
"OVER"
)
return
CallStatus
::
ENDED
;
if
(
state
==
"RINGING"
)
return
CallStatus
::
OUTGOING_RINGING
;
if
(
state
==
"CONNECTING"
)
return
CallStatus
::
SEARCHING
;
return
CallStatus
::
NONE
;
}
RingD.h
View file @
c551c365
...
...
@@ -24,7 +24,7 @@ namespace RingClientUWP
/* delegate */
delegate
void
IncomingCall
(
String
^
accountId
,
String
^
callId
,
String
^
from
);
delegate
void
StateChange
(
String
^
callId
,
String
^
state
,
int
code
);
delegate
void
StateChange
(
String
^
callId
,
CallStatus
state
,
int
code
);
delegate
void
IncomingAccountMessage
(
String
^
accountId
,
String
^
from
,
String
^
payload
);
delegate
void
Calling
(
Call
^
call
);
...
...
@@ -104,6 +104,7 @@ private:
/* functions */
RingD
();
// singleton
void
dequeueTasks
();
CallStatus
getCallStatus
(
String
^
state
);
/* members */
std
::
string
localFolder_
;
...
...
SmartPanel.xaml
View file @
c551c365
...
...
@@ -21,11 +21,18 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:RingClientUWP"
xmlns:controls="using:RingClientUWP.Controls"
xmlns:views="using:RingClientUWP.Views"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d">
<Page.Resources>
<!-- converters -->
<views:NewMessageBubleNotification x:Key="_NewMessageBubleNotification_" />
<views:IncomingVisibility x:Key="_IncomingVisibility_" />
<views:OutGoingVisibility x:Key="_OutGoingVisibility_" />
<views:HasAnActiveCall x:Key="_HasAnActiveCall_" />
<Style x:Key="addContactTextBoxStyle"
TargetType="TextBox">
<Setter Property="MinWidth" Value="{ThemeResource TextControlThemeMinWidth}"/>
...
...
@@ -146,15 +153,6 @@
<TranslateTransform X="17" Y="-14"/>
</Border.RenderTransform>
</Border>
<Border x:Name="_visualNotificationNewMessage_"
Visibility="{x:Bind notificationNewMessage, Mode=OneWay}"
Style="{StaticResource BorderStyle2}">
<TextBlock Text="{x:Bind unreadMessages, Mode=OneWay}"
Style="{StaticResource TextStyle3}"/>
<Border.RenderTransform>
<TranslateTransform X="-17" Y="-14"/>
</Border.RenderTransform>
</Border>
<Grid Grid.Column="1">
<Grid.RowDefinitions>
<RowDefinition Height="30"/>
...
...
@@ -166,42 +164,8 @@
Text="{x:Bind name_}"
TextTrimming="CharacterEllipsis">
</TextBlock>
<!-- call status. REFACTO : REMOVE CODE BELOW -->
<!--<StackPanel MaxWidth="240"
MinWidth="240"
Grid.Row="1"
HorizontalAlignment="Left">
<TextBlock x:Name="_contactCallStatus_"
Foreground="DarkGray"
Text="{x:Bind _call.state, Mode=OneWay}"
Visibility="Visible"
HorizontalAlignment="Center">
</TextBlock>
</StackPanel>-->
</Grid>
</Grid>
<!-- REFACTO : REMOVE CODE BELOW -->
<!-- button bar for accept/reject or cancel call. -->
<!-- nb : dont use Visibility with the grid, use the height of the hosting row (_contactBar_). -->
<!--<Grid Width="320"
HorizontalAlignment="Left"
Grid.Row="2"
Background="DarkGray">
<StackPanel Orientation="Horizontal"
Grid.Row="0"
HorizontalAlignment="Center">
<Button x:Name="_acceptIncomingCallBtn_"
Click="_acceptIncomingCallBtn__Click"
VerticalAlignment="Center"
HorizontalAlignment="Center"
Content="Accept"/>