Permalink
Browse files

voting comments feature

  • Loading branch information...
1 parent c740448 commit 69a1503cb2dcaf304a7614fc55a3e7936834d321 @casparwylie committed May 3, 2017

Large diffs are not rendered by default.

Oops, something went wrong.
File renamed without changes.
File renamed without changes.
File renamed without changes.

Large diffs are not rendered by default.

Oops, something went wrong.
View
@@ -28,6 +28,7 @@ import SwiftyJSON
@objc optional func focalCommentsResponse(_ responseStr: String);
@objc optional func postedCommentResponse(_ responseStr: String);
@objc optional func updatedUserDataResponse(_ responseStr: String);
+ @objc optional func votedCommentResponse(_ responseStr: String);
}
@@ -86,6 +87,8 @@ class NetworkSocketHandler{
self.networkResponseDelegate?.postedCommentResponse!(responseString);
case "updatedUserData":
self.networkResponseDelegate?.updatedUserDataResponse!(responseString);
+ case "votedComment":
+ self.networkResponseDelegate?.votedCommentResponse!(responseString);
default:
print("failed");
@@ -165,4 +168,9 @@ class NetworkRequestHandler{
}
+ func newVoteComment(_ socket: WebSocket, vote: Int, cID: Int, uID: Int){
+ let organisedRelevantData = ["commentID": String(cID), "userID": String(uID), "vote": String(vote)];
+ NetworkSocketHandler().sendRelevantJsonRequest(socket,requestName: "newVoteCommentRequest", relevantData: organisedRelevantData);
+ }
+
}
View
@@ -135,13 +135,13 @@ class Scene{
//initiate focals
if(tempFocal == false){
let focal = DAEtoSCNNodeWithText("focalpost.dae", focalDisplayInfo: focalDisplayInfo);
- focal.name = "s_" + String(renderID);
+ focal.name = "f_" + String(renderID);
focal.position = SCNVector3(x: Float(focalCoord.x), y: 0, z: Float(focalCoord.y));
focals.append(focal);
self.scene.rootNode.addChildNode(focals.last!);
}else{
tempFocalNode = DAEtoSCNNodeWithText("focalpost.dae", focalDisplayInfo: focalDisplayInfo);
- tempFocalNode.name = "s_" + String(renderID);
+ tempFocalNode.name = "f_" + String(renderID);
tempFocalNode.position = SCNVector3(x: Float(focalCoord.x), y: 0, z: Float(focalCoord.y));
self.scene.rootNode.addChildNode(tempFocalNode);
}

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
@@ -10,7 +10,7 @@
"DVTSourceControlWorkspaceBlueprintIdentifierKey" : "218D7884-8F4E-419F-B5E6-D3EEB123C3A7",
"DVTSourceControlWorkspaceBlueprintWorkingCopyPathsKey" : {
"C86D95FCAEB1FEA0694B5D4AC7241D7E5F42F31D" : "..\/startest\/Starscream",
- "E21098224036A3BEF7D8C72B51F8239D224C53F3" : "Strands\/"
+ "E21098224036A3BEF7D8C72B51F8239D224C53F3" : "Astral\/"
},
"DVTSourceControlWorkspaceBlueprintNameKey" : "Strands",
"DVTSourceControlWorkspaceBlueprintVersion" : 204,
Oops, something went wrong.

0 comments on commit 69a1503

Please sign in to comment.