oneSwitch.userName,
model_.getActivityName(oneSwitch.activityType),
[this, oneSwitch](auto item) {
- this->createUpdatePage(oneSwitch.switchId);
+ this->createUpdatePage(oneSwitch.switchId, oneSwitch.userName);
}));
}
items.push_back(std::make_unique<ListItem>(
ACCESSIBILITY_UNIVERSAL_SWITCH_PLUS_ICON));
}
-void SwitchesPagePresenter::createUpdatePage(const std::string &switchId)
+void SwitchesPagePresenter::createUpdatePage(const std::string &switchId, const std::string &userName)
{
auto providerName = utils::stringSplitByDelimiter(switchId, '_')[0];
if (providerName == ACCESSIBILITY_UNIVERSAL_SWITCH_SCREEN_SWITCH_PROVIDER) {
- Singleton<AppContext>::instance().push(std::make_unique<SelectActionPagePresenter>(switchId, ACCESSIBILITY_UNIVERSAL_SWITCH_SCREEN, ChangeType::UPDATE, 0));
+ Singleton<AppContext>::instance().push(std::make_unique<SelectActionPagePresenter>(switchId, userName, ChangeType::UPDATE, 0));
return;
}
if (providerName == ACCESSIBILITY_UNIVERSAL_SWITCH_ACCESSORIES_SWITCH_PROVIDER) {
return;
}
if (providerName == ACCESSIBILITY_UNIVERSAL_SWITCH_CAMERA_SWITCH_PROVIDER) {
- Singleton<AppContext>::instance().push(std::make_unique<SelectActionPagePresenter>(switchId, ACCESSIBILITY_UNIVERSAL_SWITCH_CAMERA_SWITCH_PROVIDER, ChangeType::UPDATE, 0));
+ Singleton<AppContext>::instance().push(std::make_unique<SelectActionPagePresenter>(switchId, userName, ChangeType::UPDATE, 0));
return;
}
}
private:
void addItemsToList();
- void createUpdatePage(const std::string &switchId);
+ void createUpdatePage(const std::string &switchId, const std::string &userName);
void updateSwitchDeleteAction();
SwitchesPageModel model_;
Action *deleteSwitchesAction_ = nullptr;