private void OnPostAddRuleFinished(JObject ruleResponse, string oldRuleID)
 {
     m_DataManager.UpdateRuleId(oldRuleID, ruleResponse["id"].Value <string>());
     m_DataManager.RemoveRuleFromAddedRuleIDs(oldRuleID);
     m_DataManager.SetLastCachedRulesList();
     DoCleanUp();
 }
        private void OnPostAddRuleFinished(RuleResponse ruleResponse, string oldRuleID)
        {
            var rule = m_DataManager.GetRuleByID(oldRuleID);

            m_DataManager.DeleteRule(oldRuleID);
            rule.id = ruleResponse.id;
            m_DataManager.UpdateRule(rule);
            m_DataManager.RemoveRuleFromAddedRuleIDs(rule.id);
            m_DataManager.SetLastCachedRulesList();
            DoCleanUp();
        }