Commit 1d4ab4a2 authored by Nicolas Jager's avatar Nicolas Jager

message text : clear the conversation from the conversation page

Change-Id: I86a3cad4c5b39abb77d4924e7ae1cb468af828f2
Tuleap: #1287
parent e72856b7
......@@ -147,6 +147,9 @@
<Button x:Name="_deleteContact_"
Content="delete"
Click="_deleteContact__Click"/>
<Button x:Name="_clearConversation_"
Content="clear conversation"
Click="_clearConversation__Click"/>
</StackPanel>
</StackPanel>
......
......@@ -190,3 +190,12 @@ void RingClientUWP::Views::MessageTextPage::_deleteContact__Click(Platform::Obje
ContactsViewModel::instance->deleteContact(contact);
SmartPanelItemsViewModel::instance->removeItem(item);
}
void RingClientUWP::Views::MessageTextPage::_clearConversation__Click(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e)
{
auto item = SmartPanelItemsViewModel::instance->_selectedItem;
auto contact = item->_contact;
contact->_conversation->_messages->Clear();
contact->saveConversationToFile();
}
......@@ -58,6 +58,7 @@ private:
void OnSelectionChanged(Platform::Object ^sender, Windows::UI::Xaml::Controls::SelectionChangedEventArgs ^e);
void _deleteContact__Click(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e);
void _clearConversation__Click(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e);
};
}
}
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