Changeset - 5f607b56220b
[Not reviewed]
0 1 0
Jan Kaluza - 13 years ago 2012-12-11 11:29:54
hanzz.k@gmail.com
Handle also TextIsngleFormField in Settings command
1 file changed with 1 insertions and 0 deletions:
0 comments (0 inline, 0 general)
src/settingsadhoccommand.cpp
Show inline comments
 
@@ -96,12 +96,13 @@ boost::shared_ptr<Swift::Command> SettingsAdHocCommand::handleResponse(boost::sh
 
			if (boost::dynamic_pointer_cast<Swift::BooleanFormField>(received)) {
 
				Swift::BooleanFormField::ref f(boost::dynamic_pointer_cast<Swift::BooleanFormField>(received));
 
				std::string value = f->getValue() ? "1" : "0";
 
				m_storageBackend->updateUserSetting(user.id, f->getName(), value);
 
			}
 
			else if (boost::dynamic_pointer_cast<Swift::TextSingleFormField>(received)) {
 
				Swift::TextSingleFormField::ref f(boost::dynamic_pointer_cast<Swift::TextSingleFormField>(received));
 
				m_storageBackend->updateUserSetting(user.id, f->getName(), f->getValue());
 
			}
 
		}
 
	}
 

	
 
	boost::shared_ptr<Swift::Command> response(new Swift::Command("settings", m_id, Swift::Command::Completed));
0 comments (0 inline, 0 general)