Commit 6abfc0d2 authored by Nicolas Jager's avatar Nicolas Jager
Browse files

smartpanel : adds ui for ring accounts edition

Change-Id: Id773083f7266ea45593f80ea6ec595c90bf0b04c
Tuleap: #1243
parent a570103b
...@@ -31,13 +31,15 @@ Account::Account(String^ name, ...@@ -31,13 +31,15 @@ Account::Account(String^ name,
String^ ringID, String^ ringID,
String^ accountType, String^ accountType,
String^ accountID, String^ accountID,
String^ deviceId) String^ deviceId,
bool upnpState)
{ {
name_ = name; name_ = name;
ringID_ = ringID; ringID_ = ringID;
accountType_ = accountType; accountType_ = accountType;
accountID_ = accountID; accountID_ = accountID;
_deviceId = deviceId; _deviceId = deviceId;
_upnpState = _upnpState;
} }
void void
......
...@@ -28,11 +28,20 @@ namespace RingClientUWP ...@@ -28,11 +28,20 @@ namespace RingClientUWP
public ref class Account sealed : public INotifyPropertyChanged public ref class Account sealed : public INotifyPropertyChanged
{ {
public: public:
Account(String^ name, String^ ringID, String^ accountType, String^ accountID, String^ deviceId); Account(String^ name, String^ ringID, String^ accountType, String^ accountID, String^ deviceId, bool upnpState);
virtual event PropertyChangedEventHandler^ PropertyChanged; virtual event PropertyChangedEventHandler^ PropertyChanged;
property String^ name_; property String^ name_
{
String^ get() {
return name__;
}
void set(String^ value) {
name__ = value;
PropertyChanged(this, ref new PropertyChangedEventArgs("name_"));
}
}
property String^ ringID_; property String^ ringID_;
property String^ accountType_; // refacto : create a enum accountType property String^ accountType_; // refacto : create a enum accountType
property String^ accountID_; property String^ accountID_;
...@@ -44,13 +53,15 @@ public: ...@@ -44,13 +53,15 @@ public:
void set(Windows::Foundation::Collections::IVector<String^>^ value) { void set(Windows::Foundation::Collections::IVector<String^>^ value) {
devicesIdList_ = value; devicesIdList_ = value;
} }
} };
property bool _upnpState;
protected: protected:
void NotifyPropertyChanged(String^ propertyName); void NotifyPropertyChanged(String^ propertyName);
private: private:
Windows::Foundation::Collections::IVector<String^>^ devicesIdList_; Windows::Foundation::Collections::IVector<String^>^ devicesIdList_;
String^ name__;
}; };
} }
......
...@@ -31,7 +31,8 @@ using namespace ViewModel; ...@@ -31,7 +31,8 @@ using namespace ViewModel;
AccountListItem::AccountListItem(Account^ a) AccountListItem::AccountListItem(Account^ a)
{ {
_account = a; _account = a;
_editionMode = false;
} }
void void
......
...@@ -41,6 +41,7 @@ public: ...@@ -41,6 +41,7 @@ public:
return isSelected_; return isSelected_;
} }
} }
property bool _editionMode;
protected: protected:
void NotifyPropertyChanged(String^ propertyName); void NotifyPropertyChanged(String^ propertyName);
......
...@@ -50,3 +50,13 @@ void RingClientUWP::ViewModel::AccountListItemsViewModel::OnclearAccountsList() ...@@ -50,3 +50,13 @@ void RingClientUWP::ViewModel::AccountListItemsViewModel::OnclearAccountsList()
{ {
itemsList_->Clear(); itemsList_->Clear();
} }
AccountListItem^
RingClientUWP::ViewModel::AccountListItemsViewModel::findItem(String^ accountId)
{
for each (AccountListItem^ item in itemsList_)
if (item->_account->accountID_ == accountId)
return item;
return nullptr;
}
...@@ -42,9 +42,9 @@ internal: ...@@ -42,9 +42,9 @@ internal:
} }
/* functions */ /* functions */
// to do AccountListItem^ findItem(String^ accountId);
/* properties */
property Vector<AccountListItem^>^ itemsList property Vector<AccountListItem^>^ itemsList
{ {
Vector<AccountListItem^>^ get() Vector<AccountListItem^>^ get()
...@@ -61,6 +61,8 @@ internal: ...@@ -61,6 +61,8 @@ internal:
} }
void set(AccountListItem^ value) void set(AccountListItem^ value)
{ {
if (currentItem_)
currentItem_->_isSelected = false;
currentItem_ = value; currentItem_ = value;
} }
} }
......
...@@ -29,14 +29,15 @@ AccountsViewModel::AccountsViewModel() ...@@ -29,14 +29,15 @@ AccountsViewModel::AccountsViewModel()
} }
void void
AccountsViewModel::add(std::string& name, std::string& ringID, std::string& accountType, std::string& accountID, std::string& deviceId) AccountsViewModel::add(std::string& name, std::string& ringID, std::string& accountType, std::string& accountID, std::string& deviceId, bool upnpState)
{ {
auto account = ref new Account( auto account = ref new Account(
Utils::toPlatformString(name), Utils::toPlatformString(name),
Utils::toPlatformString(ringID), Utils::toPlatformString(ringID),
Utils::toPlatformString(accountType), Utils::toPlatformString(accountType),
Utils::toPlatformString(accountID), Utils::toPlatformString(accountID),
Utils::toPlatformString(deviceId)); Utils::toPlatformString(deviceId),
upnpState);
accountsList_->Append(account); accountsList_->Append(account);
updateScrollView(); updateScrollView();
...@@ -48,4 +49,13 @@ AccountsViewModel::clearAccountList() ...@@ -48,4 +49,13 @@ AccountsViewModel::clearAccountList()
{ {
accountsList_->Clear(); accountsList_->Clear();
clearAccountsList(); clearAccountsList();
} }
\ No newline at end of file
Account ^ RingClientUWP::ViewModel::AccountsViewModel::findItem(String ^ accountId)
{
for each (Account^ item in accountsList_)
if (item->accountID_ == accountId)
return item;
return nullptr;
}
...@@ -31,6 +31,7 @@ delegate void AccountAdded(Account^ account); ...@@ -31,6 +31,7 @@ delegate void AccountAdded(Account^ account);
delegate void ClearAccountsList(); delegate void ClearAccountsList();
namespace ViewModel { namespace ViewModel {
public ref class AccountsViewModel sealed public ref class AccountsViewModel sealed
{ {
internal: internal:
...@@ -45,8 +46,9 @@ internal: ...@@ -45,8 +46,9 @@ internal:
} }
/* functions */ /* functions */
void add(std::string& name, std::string& ringID, std::string& accountType, std::string& accountID, std::string& deviceId); void add(std::string& name, std::string& ringID, std::string& accountType, std::string& accountID, std::string& deviceId, bool upnpState);
void clearAccountList(); void clearAccountList();
Account^ findItem(String^ accountId);
/* properties */ /* properties */
property Vector<Account^>^ accountsList property Vector<Account^>^ accountsList
......
...@@ -27,6 +27,8 @@ ...@@ -27,6 +27,8 @@
#include "fileutils.h" #include "fileutils.h"
#include "account_schema.h" #include "account_schema.h"
#include "account_const.h" #include "account_const.h"
#include "string_utils.h" // used to get some const expr like TRUE_STR
#include "SmartPanel.xaml.h" #include "SmartPanel.xaml.h"
...@@ -44,7 +46,7 @@ using namespace RingClientUWP::ViewModel; ...@@ -44,7 +46,7 @@ using namespace RingClientUWP::ViewModel;
void void
RingClientUWP::RingD::reloadAccountList() RingClientUWP::RingD::reloadAccountList()
{ {
RingClientUWP::ViewModel::AccountsViewModel::instance->clearAccountList(); //RingClientUWP::ViewModel::AccountsViewModel::instance->clearAccountList();
std::vector<std::string> accountList = DRing::getAccountList(); std::vector<std::string> accountList = DRing::getAccountList();
...@@ -61,6 +63,12 @@ RingClientUWP::RingD::reloadAccountList() ...@@ -61,6 +63,12 @@ RingClientUWP::RingD::reloadAccountList()
std::map<std::string,std::string> accountDetails = DRing::getAccountDetails(*rit); std::map<std::string,std::string> accountDetails = DRing::getAccountDetails(*rit);
std::string ringID(accountDetails.find(DRing::Account::ConfProperties::USERNAME)->second); std::string ringID(accountDetails.find(DRing::Account::ConfProperties::USERNAME)->second);
bool upnpState = (accountDetails.find(DRing::Account::ConfProperties::UPNP_ENABLED)->second == ring::TRUE_STR)
? true
: false;
MSG_("upnp state : " + accountDetails.find(DRing::Account::ConfProperties::UPNP_ENABLED)->second);
if(!ringID.empty()) if(!ringID.empty())
ringID = ringID.substr(5); ringID = ringID.substr(5);
...@@ -68,7 +76,22 @@ RingClientUWP::RingD::reloadAccountList() ...@@ -68,7 +76,22 @@ RingClientUWP::RingD::reloadAccountList()
auto type = accountDetails.find(DRing::Account::ConfProperties::TYPE)->second; auto type = accountDetails.find(DRing::Account::ConfProperties::TYPE)->second;
auto deviceId = (type == "SIP")? std::string() : accountDetails.find(DRing::Account::ConfProperties::RING_DEVICE_ID)->second; auto deviceId = (type == "SIP")? std::string() : accountDetails.find(DRing::Account::ConfProperties::RING_DEVICE_ID)->second;
RingClientUWP::ViewModel::AccountsViewModel::instance->add(alias, ringID, type, *rit /*account id*/, deviceId); auto accountId = Utils::toPlatformString(*rit);
auto account = AccountsViewModel::instance->findItem(accountId);
if (account) {
account->name_ = Utils::toPlatformString(alias);
account->_upnpState = upnpState;
accountUpdated(account);
}
else {
RingClientUWP::ViewModel::AccountsViewModel::instance->add(alias, ringID, type, *rit /*account id*/, deviceId, upnpState);
}
if (editModeOn_) {
auto frame = dynamic_cast<Frame^>(Window::Current->Content);
dynamic_cast<RingClientUWP::MainPage^>(frame->Content)->showLoadingOverlay(false, false);
}
} }
...@@ -257,6 +280,19 @@ void RingClientUWP::RingD::eraseCacheFolder() ...@@ -257,6 +280,19 @@ void RingClientUWP::RingD::eraseCacheFolder()
}); });
} }
void RingClientUWP::RingD::updateAccount(String^ accountId)
{
editModeOn_ = true;
auto frame = dynamic_cast<Frame^>(Window::Current->Content);
dynamic_cast<RingClientUWP::MainPage^>(frame->Content)->showLoadingOverlay(true, true);
auto task = ref new RingD::Task(Request::UpdateAccount);
task->_accountId = accountId;
tasksList_.push(task);
}
void void
RingClientUWP::RingD::startDaemon() RingClientUWP::RingD::startDaemon()
{ {
...@@ -398,6 +434,7 @@ RingClientUWP::RingD::startDaemon() ...@@ -398,6 +434,7 @@ RingClientUWP::RingD::startDaemon()
}), }),
DRing::exportable_callback<DRing::ConfigurationSignal::AccountsChanged>([this]() DRing::exportable_callback<DRing::ConfigurationSignal::AccountsChanged>([this]()
{ {
MSG_("<AccountsChanged>");
CoreApplication::MainView->CoreWindow->Dispatcher->RunAsync(CoreDispatcherPriority::High, CoreApplication::MainView->CoreWindow->Dispatcher->RunAsync(CoreDispatcherPriority::High,
ref new DispatchedHandler([=]() { ref new DispatchedHandler([=]() {
reloadAccountList(); reloadAccountList();
...@@ -682,6 +719,19 @@ RingD::dequeueTasks() ...@@ -682,6 +719,19 @@ RingD::dequeueTasks()
auto password2 = Utils::toString(password); auto password2 = Utils::toString(password);
DRing::exportOnRing(accountId2, password2); DRing::exportOnRing(accountId2, password2);
break;
}
case Request::UpdateAccount:
{
auto accountId = task->_accountId;
auto accountId2 = Utils::toString(accountId);
auto account = AccountListItemsViewModel::instance->findItem(accountId)->_account;
std::map<std::string, std::string> accountDetails = DRing::getAccountDetails(accountId2);
accountDetails[DRing::Account::ConfProperties::UPNP_ENABLED] = (account->_upnpState) ? ring::TRUE_STR : ring::FALSE_STR;
accountDetails[DRing::Account::ConfProperties::ALIAS] = Utils::toString(account->name_);
DRing::setAccountDetails(Utils::toString(account->accountID_), accountDetails);
break;
} }
default: default:
break; break;
......
...@@ -35,6 +35,7 @@ delegate void IncomingMessage(String^ callId, String^ payload); ...@@ -35,6 +35,7 @@ delegate void IncomingMessage(String^ callId, String^ payload);
delegate void DevicesListRefreshed(Vector<String^>^ devicesList); delegate void DevicesListRefreshed(Vector<String^>^ devicesList);
delegate void ExportOnRingEnded(String^ accountId, String^ pin); delegate void ExportOnRingEnded(String^ accountId, String^ pin);
delegate void SummonWizard(); delegate void SummonWizard();
delegate void AccountUpdated(Account^ account);
public ref class RingD sealed public ref class RingD sealed
...@@ -96,6 +97,7 @@ internal: ...@@ -96,6 +97,7 @@ internal:
void askToRefreshKnownDevices(String^ accountId); void askToRefreshKnownDevices(String^ accountId);
void askToExportOnRing(String^ accountId, String^ password); void askToExportOnRing(String^ accountId, String^ password);
void eraseCacheFolder(); void eraseCacheFolder();
void updateAccount(String^ accountId);
/* TODO : move members */ /* TODO : move members */
///bool hasConfig; // replaced by startingStatus ///bool hasConfig; // replaced by startingStatus
...@@ -111,6 +113,7 @@ internal: ...@@ -111,6 +113,7 @@ internal:
event DevicesListRefreshed^ devicesListRefreshed; event DevicesListRefreshed^ devicesListRefreshed;
event ExportOnRingEnded^ exportOnRingEnded; event ExportOnRingEnded^ exportOnRingEnded;
event SummonWizard^ summonWizard; event SummonWizard^ summonWizard;
event AccountUpdated^ accountUpdated;
private: private:
/* sub classes */ /* sub classes */
...@@ -126,7 +129,8 @@ private: ...@@ -126,7 +129,8 @@ private:
UnPauseCall, UnPauseCall,
RegisterDevice, RegisterDevice,
GetKnownDevices, GetKnownDevices,
ExportOnRing ExportOnRing,
UpdateAccount
}; };
...@@ -165,5 +169,6 @@ private: ...@@ -165,5 +169,6 @@ private:
bool daemonRunning_ = false; bool daemonRunning_ = false;
std::queue<Task^> tasksList_; std::queue<Task^> tasksList_;
StartingStatus startingStatus_ = StartingStatus::NORMAL; StartingStatus startingStatus_ = StartingStatus::NORMAL;
bool editModeOn_ = false;
}; };
} }
\ No newline at end of file
...@@ -192,6 +192,7 @@ ...@@ -192,6 +192,7 @@
VerticalAlignment="Top" VerticalAlignment="Top"
Content="&#xE104;" Content="&#xE104;"
FontFamily="Segoe MDL2 Assets" FontFamily="Segoe MDL2 Assets"
Click="_editAccountMenuButton__Click"
FontSize="20" FontSize="20"
Foreground="White" Foreground="White"
Background="Transparent" Background="Transparent"
...@@ -204,7 +205,7 @@ ...@@ -204,7 +205,7 @@
<StackPanel Grid.Column="1"> <StackPanel Grid.Column="1">
<TextBlock x:Name="_accountName_" <TextBlock x:Name="_accountName_"
Style="{StaticResource TextStyle5}" Style="{StaticResource TextStyle5}"
Text="{x:Bind _account.name_}"/> Text="{x:Bind _account.name_, Mode=OneWay}"/>
<TextBlock x:Name="_ringID_" <TextBlock x:Name="_ringID_"
Grid.ColumnSpan="2" Grid.ColumnSpan="2"
Style="{StaticResource TextStyle6}" Style="{StaticResource TextStyle6}"
...@@ -509,6 +510,67 @@ ...@@ -509,6 +510,67 @@
</StackPanel> </StackPanel>
</Grid> </Grid>
</Grid> </Grid>
<!-- account edition menu. -->
<Grid x:Name="_accountEditionMenuGrid_"
Grid.Row="2"
Visibility="Collapsed"
Background="LightBlue">
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="30"/>
</Grid.RowDefinitions>
<StackPanel Orientation="Vertical"
Grid.Row="0"
Background="#FFE4F1F9">
<!-- alias sub menu. -->
<StackPanel Orientation="Horizontal" Margin="10">
<TextBlock Style="{StaticResource TextSegoeStyle-20pt-black}"
Text="&#xE1CB;"/>
<TextBlock Text="Alias" Margin="10"/>
</StackPanel>
<TextBox x:Name="_aliasTextBoxEditionMenu_"
FontSize="20"
Margin="20,10"
PlaceholderText="Enter your username"/>
<!-- upnp sub menu. -->
<StackPanel Orientation="Horizontal" Margin="10">
<TextBlock Style="{StaticResource TextSegoeStyle-20pt-black}"
Text="&#xE15E;"/>
<TextBlock Text="UPnP" Margin="10"/>
</StackPanel>
<ToggleSwitch x:Name="_upnpState_"
Margin="20,10"/>
<!-- delete account sub menu. -->
<!--<StackPanel Orientation="Horizontal" Margin="10">
<TextBlock Style="{StaticResource TextSegoeStyle-20pt-black}"
Text="&#xE74D;"/>
<TextBlock Text="Delete account" Margin="10"/>
</StackPanel>
<ToggleButton x:Name="_deleteAccountBtnEditionMenu_"
Margin="20,10"
Content="Delete"/>-->
</StackPanel>
<!-- buttons yes/no to accept the modification. -->
<Grid Grid.Row="1">
<StackPanel Orientation="Horizontal"
HorizontalAlignment="Center">
<Button x:Name="_acceptAccountModification_"
Grid.Row="1"
VerticalAlignment="Center"
HorizontalAlignment="Center"
Content="&#xE081;"
Click="_acceptAccountModification__Click"
Style="{StaticResource ButtonStyle5}"/>
<Button x:Name="_cancelAccountModification_"
Grid.Row="1"
VerticalAlignment="Center"
HorizontalAlignment="Center"
Content="&#xE106;"
Click="_cancelAccountModification__Click"
Style="{StaticResource ButtonStyle5}"/>
</StackPanel>
</Grid>
</Grid>
<!-- share menu. --> <!-- share menu. -->
<Grid x:Name="_shareMenuGrid_" <Grid x:Name="_shareMenuGrid_"
Grid.Row="2" Grid.Row="2"
......
...@@ -131,7 +131,7 @@ SmartPanel::SmartPanel() ...@@ -131,7 +131,7 @@ SmartPanel::SmartPanel()
}); });
RingD::instance->exportOnRingEnded += ref new RingClientUWP::ExportOnRingEnded(this, &RingClientUWP::Views::SmartPanel::OnexportOnRingEnded); RingD::instance->exportOnRingEnded += ref new RingClientUWP::ExportOnRingEnded(this, &RingClientUWP::Views::SmartPanel::OnexportOnRingEnded);
RingD::instance->accountUpdated += ref new RingClientUWP::AccountUpdated(this, &RingClientUWP::Views::SmartPanel::OnaccountUpdated);
} }
...@@ -143,7 +143,9 @@ RingClientUWP::Views::SmartPanel::updatePageContent() ...@@ -143,7 +143,9 @@ RingClientUWP::Views::SmartPanel::updatePageContent()
if (!accountListItem) if (!accountListItem)
return; return;
auto name = accountListItem->_account->name_; auto name = accountListItem->_account->name_; // refacto remove name variable and use the link directly on the next line... like _upnpnState..._
accountListItem->_isSelected = true;
Configuration::UserPreferences::instance->PREF_ACCOUNT_INDEX = _accountsList_->SelectedIndex; Configuration::UserPreferences::instance->PREF_ACCOUNT_INDEX = _accountsList_->SelectedIndex;
Configuration::UserPreferences::instance->save(); Configuration::UserPreferences::instance->save();
...@@ -160,6 +162,8 @@ RingClientUWP::Views::SmartPanel::updatePageContent() ...@@ -160,6 +162,8 @@ RingClientUWP::Views::SmartPanel::updatePageContent()
_shareMenuButton_->Visibility = (accountListItem->_account->accountType_ == "RING") _shareMenuButton_->Visibility = (accountListItem->_account->accountType_ == "RING")
? Windows::UI::Xaml::Visibility::Visible ? Windows::UI::Xaml::Visibility::Visible
: Windows::UI::Xaml::Visibility::Collapsed; : Windows::UI::Xaml::Visibility::Collapsed;
_upnpState_->IsOn = accountListItem->_account->_upnpState;
} }
void RingClientUWP::Views::SmartPanel::_accountsMenuButton__Checked(Object^ sender, RoutedEventArgs^ e) void RingClientUWP::Views::SmartPanel::_accountsMenuButton__Checked(Object^ sender, RoutedEventArgs^ e)
...@@ -176,6 +180,7 @@ void RingClientUWP::Views::SmartPanel::_accountsMenuButton__Unchecked(Object^ se ...@@ -176,6 +180,7 @@ void RingClientUWP::Views::SmartPanel::_accountsMenuButton__Unchecked(Object^ se
{ {
_accountsMenuGrid_->Visibility = Windows::UI::Xaml::Visibility::Collapsed; _accountsMenuGrid_->Visibility = Windows::UI::Xaml::Visibility::Collapsed;
_accountCreationMenuGrid_->Visibility = Windows::UI::Xaml::Visibility::Collapsed; _accountCreationMenuGrid_->Visibility = Windows::UI::Xaml::Visibility::Collapsed;
_accountEditionMenuGrid_->Visibility = Windows::UI::Xaml::Visibility::Collapsed;
} }
void RingClientUWP::Views::SmartPanel::_settings__Checked(Object^ sender, RoutedEventArgs^ e) void RingClientUWP::Views::SmartPanel::_settings__Checked(Object^ sender, RoutedEventArgs^ e)
...@@ -216,6 +221,7 @@ void RingClientUWP::Views::SmartPanel::_shareMenuButton__Checked(Platform::Objec ...@@ -216,6 +221,7 @@ void RingClientUWP::Views::SmartPanel::_shareMenuButton__Checked(Platform::Objec
_shareMenuGrid_->Visibility = Windows::UI::Xaml::Visibility::Visible; _shareMenuGrid_->Visibility = Windows::UI::Xaml::Visibility::Visible;
_accountsMenuGrid_->Visibility = Windows::UI::Xaml::Visibility::Collapsed; _accountsMenuGrid_->Visibility = Windows::UI::Xaml::Visibility::Collapsed;
_accountCreationMenuGrid_->Visibility = Windows::UI::Xaml::Visibility::Collapsed; _accountCreationMenuGrid_->Visibility = Windows::UI::Xaml::Visibility::Collapsed;
_accountEditionMenuGrid_->Visibility = Windows::UI::Xaml::Visibility::Collapsed;
_devicesMenuGrid_->Visibility = Windows::UI::Xaml::Visibility::Collapsed; _devicesMenuGrid_->Visibility = Windows::UI::Xaml::Visibility::Collapsed;
_addingDeviceGrid_->Visibility = Windows::UI::Xaml::Visibility::Collapsed; _addingDeviceGrid_->Visibility = Windows::UI::Xaml::Visibility::Collapsed;
_accountsMenuButton_->IsChecked = false; _accountsMenuButton_->IsChecked = false;
...@@ -228,6 +234,7 @@ void RingClientUWP::Views::SmartPanel::_shareMenuButton__Unchecked(Platform::Obj ...@@ -228,6 +234,7 @@ void RingClientUWP::Views::SmartPanel::_shareMenuButton__Unchecked(Platform::Obj
{ {
_shareMenuGrid_->Visibility = Windows::UI::Xaml::Visibility::Collapsed; _shareMenuGrid_->Visibility = Windows::UI::Xaml::Visibility::Collapsed;
_accountsMenuGrid_->Visibility = Windows::UI::Xaml::Visibility::Collapsed; _accountsMenuGrid_->Visibility = Windows::UI::Xaml::Visibility::Collapsed;
_accountEditionMenuGrid_->Visibility = Windows::UI::Xaml::Visibility::Collapsed;
_accountCreationMenuGrid_->Visibility = Windows::UI::Xaml::Visibility::Collapsed; _accountCreationMenuGrid_->Visibility = Windows::UI::Xaml::Visibility::Collapsed;
} }
...@@ -326,6 +333,7 @@ SmartPanel::_accountList__SelectionChanged(Platform::Object^ sender, Windows::UI ...@@ -326,6 +333,7 @@ SmartPanel::_accountList__SelectionChanged(Platform::Object^ sender, Windows::UI
} }
auto account = safe_cast<AccountListItem^>(listbox->SelectedItem); auto account = safe_cast<AccountListItem^>(listbox->SelectedItem);
AccountListItemsViewModel::instance->_selectedItem = account; AccountListItemsViewModel::instance->_selectedItem = account;
updatePageContent(); updatePageContent();
} }
...@@ -706,3 +714,39 @@ Object ^ RingClientUWP::Views::AccountSelectedToVisibility::ConvertBack(Object ^ ...@@ -706,3 +714,39 @@ Object ^ RingClientUWP::Views::AccountSelectedToVisibility::ConvertBack(Object ^