Fix createUpdatePage in SwitchesPagePresenter 09/209409/1 accepted/tizen/unified/20190711.062837 submit/tizen/20190710.050854
authore.czarnocki <e.czarnocki@samsung.com>
Fri, 5 Jul 2019 13:09:13 +0000 (15:09 +0200)
committere.czarnocki <e.czarnocki@samsung.com>
Fri, 5 Jul 2019 13:09:13 +0000 (15:09 +0200)
Change-Id: I21ba23c7a66c0c0268e2012e65e4462ed49340b0

src/presenter/SwitchesPagePresenter.cpp
src/presenter/SwitchesPagePresenter.hpp

index 9edc8c2..3db4552 100644 (file)
@@ -35,7 +35,7 @@ void SwitchesPagePresenter::addItemsToList()
                        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>(
@@ -51,18 +51,18 @@ void SwitchesPagePresenter::addItemsToList()
                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;
        }
 }
index 75176fa..8ba66de 100644 (file)
@@ -11,7 +11,7 @@ class SwitchesPagePresenter : public ListPresenter
 
        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;