Commit 1246f402 by Olzhas Aldabergenov

bot chat children node fixed

parent 77bcef1e
......@@ -195,5 +195,21 @@
landmarkType = "7">
</BreakpointContent>
</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>
</Bucket>
......@@ -65,6 +65,8 @@ extension Facade {
botNode.text = n["text"].string
botNode.expanded = n["expanded"].int
botNode.isLink = n["isLink"].int
botNode.entityId = n["entity_id"].string
botNode.type = n["type"].string
botNodes.append(botNode)
}
let res = BotResult()
......
......@@ -24,6 +24,13 @@ class BotNode: NSObject, NSCoding {
super.init()
}
func compare(botNode:BotNode) -> Bool {
if botNode.id!.compare(self.id!) == .OrderedSame {
return true
}
return false
}
required init?(coder aDecoder: NSCoder) {
id = aDecoder.decodeObjectForKey("id") as! String?
parentId = aDecoder.decodeObjectForKey("parentId") as! String?
......@@ -32,13 +39,9 @@ class BotNode: NSObject, NSCoding {
text = aDecoder.decodeObjectForKey("text") as! String?
expanded = aDecoder.decodeObjectForKey("expanded") as! Int?
isLink = aDecoder.decodeObjectForKey("isLink") as! Int?
if ( aDecoder.containsValueForKey("entityId") ) {
entityId = aDecoder.decodeObjectForKey("entityId") as! String?
}
if ( aDecoder.containsValueForKey("type") ) {
type = aDecoder.decodeObjectForKey("type") as! String?
}
}
func encodeWithCoder(aCoder: NSCoder) {
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