diff --git a/Account.cpp b/Account.cpp index e5e38b09b9d0c7e946ffee14c009107d3915dc35..cdbd9e257fc49396ece5045c4decba8026d11e57 100644 --- a/Account.cpp +++ b/Account.cpp @@ -29,11 +29,13 @@ using namespace RingClientUWP; Account::Account(String^ name, String^ ringID, - String^ accountType) + String^ accountType, + String^ accountID) { name_ = name; ringID_ = ringID; accountType_ = accountType; + accountID_ = accountID; } void diff --git a/Account.h b/Account.h index 9ffc1646b1cfcf346a70d60c7d0b69b2c95b18f1..f9ee44843a55f4822221b872620e85c228673397 100644 --- a/Account.h +++ b/Account.h @@ -27,13 +27,14 @@ namespace RingClientUWP public ref class Account sealed : public INotifyPropertyChanged { public: - Account(String^ name, String^ ringID, String^ accountType); + Account(String^ name, String^ ringID, String^ accountType, String^ accountID); virtual event PropertyChangedEventHandler^ PropertyChanged; property String^ name_; property String^ ringID_; property String^ accountType_; + property String^ accountID_; protected: void NotifyPropertyChanged(String^ propertyName); diff --git a/AccountsViewModel.cpp b/AccountsViewModel.cpp index 11b8c86a60cffbba3607bca4f3b57b22921f200c..36e891ff6628361c16e39813490ecb2f2392928f 100644 --- a/AccountsViewModel.cpp +++ b/AccountsViewModel.cpp @@ -29,12 +29,13 @@ AccountsViewModel::AccountsViewModel() } void -AccountsViewModel::add(std::string& name, std::string& ringID, std::string& accountType) +AccountsViewModel::add(std::string& name, std::string& ringID, std::string& accountType, std::string& accountID) { accountsList_->Append(ref new Account( Utils::toPlatformString(name), Utils::toPlatformString(ringID), - Utils::toPlatformString(accountType) + Utils::toPlatformString(accountType), + Utils::toPlatformString(accountID) )); } diff --git a/AccountsViewModel.h b/AccountsViewModel.h index 0aa5977619ee861dbd42a4bbeaeafe972940432a..fcbd4b72872b6287d44debe5b7813b0f1979ab16 100644 --- a/AccountsViewModel.h +++ b/AccountsViewModel.h @@ -42,7 +42,7 @@ internal: } /* functions */ - void add(std::string& name, std::string& ringID, std::string& accountType); + void add(std::string& name, std::string& ringID, std::string& accountType, std::string& accountID); void clearAccountList(); /* properties */ diff --git a/RingD.cpp b/RingD.cpp index e714fc3208413df7ea864d5f0a8a80ad3f4aa453..f63215326644af2eb4ddb9a1ba910ec8bfe9f619 100644 --- a/RingD.cpp +++ b/RingD.cpp @@ -56,7 +56,8 @@ RingClientUWP::RingD::reloadAccountList() RingClientUWP::ViewModel::AccountsViewModel::instance->add( accountDetails.find(ring::Conf::CONFIG_ACCOUNT_ALIAS)->second, //name ringID, //ringid - accountDetails.find(ring::Conf::CONFIG_ACCOUNT_TYPE)->second); //type + accountDetails.find(ring::Conf::CONFIG_ACCOUNT_TYPE)->second, //type + *rit); } // load user preferences Configuration::UserPreferences::instance->load();