Commit 1246f402 by Olzhas Aldabergenov

bot chat children node fixed

parent 77bcef1e
...@@ -195,5 +195,21 @@ ...@@ -195,5 +195,21 @@
landmarkType = "7"> landmarkType = "7">
</BreakpointContent> </BreakpointContent>
</BreakpointProxy> </BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "kt/Facade/Facade+Bot.swift"
timestampString = "531225432.809038"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "13"
endingLineNumber = "13"
landmarkName = "askBot(text:onSuccess:onError:)"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
</Breakpoints> </Breakpoints>
</Bucket> </Bucket>
...@@ -65,6 +65,8 @@ extension Facade { ...@@ -65,6 +65,8 @@ extension Facade {
botNode.text = n["text"].string botNode.text = n["text"].string
botNode.expanded = n["expanded"].int botNode.expanded = n["expanded"].int
botNode.isLink = n["isLink"].int botNode.isLink = n["isLink"].int
botNode.entityId = n["entity_id"].string
botNode.type = n["type"].string
botNodes.append(botNode) botNodes.append(botNode)
} }
let res = BotResult() let res = BotResult()
......
...@@ -24,6 +24,13 @@ class BotNode: NSObject, NSCoding { ...@@ -24,6 +24,13 @@ class BotNode: NSObject, NSCoding {
super.init() super.init()
} }
func compare(botNode:BotNode) -> Bool {
if botNode.id!.compare(self.id!) == .OrderedSame {
return true
}
return false
}
required init?(coder aDecoder: NSCoder) { required init?(coder aDecoder: NSCoder) {
id = aDecoder.decodeObjectForKey("id") as! String? id = aDecoder.decodeObjectForKey("id") as! String?
parentId = aDecoder.decodeObjectForKey("parentId") as! String? parentId = aDecoder.decodeObjectForKey("parentId") as! String?
...@@ -32,13 +39,9 @@ class BotNode: NSObject, NSCoding { ...@@ -32,13 +39,9 @@ class BotNode: NSObject, NSCoding {
text = aDecoder.decodeObjectForKey("text") as! String? text = aDecoder.decodeObjectForKey("text") as! String?
expanded = aDecoder.decodeObjectForKey("expanded") as! Int? expanded = aDecoder.decodeObjectForKey("expanded") as! Int?
isLink = aDecoder.decodeObjectForKey("isLink") as! Int? isLink = aDecoder.decodeObjectForKey("isLink") as! Int?
if ( aDecoder.containsValueForKey("entityId") ) {
entityId = aDecoder.decodeObjectForKey("entityId") as! String? entityId = aDecoder.decodeObjectForKey("entityId") as! String?
}
if ( aDecoder.containsValueForKey("type") ) {
type = aDecoder.decodeObjectForKey("type") as! String? type = aDecoder.decodeObjectForKey("type") as! String?
} }
}
func encodeWithCoder(aCoder: NSCoder) { func encodeWithCoder(aCoder: NSCoder) {
aCoder.encodeObject(id, forKey: "id") aCoder.encodeObject(id, forKey: "id")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment