-
-
Save anupamchugh/d26788b88dd081d9d24d650857557a94 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct CommentView : View{ | |
@ObservedObject var commentFeed = HNCommentFeed() | |
var body: some View { | |
List(commentFeed.comments){ item in | |
Text(item.sentimentScore) | |
.background(((item.sentimentScore as NSString).floatValue >= 0.0) ? Color.green : Color.red) | |
.frame(alignment: .trailing) | |
Text(item.text ?? "") | |
} | |
.navigationBarTitle("Comment Score \(commentFeed.sentimentAvg)") | |
.navigationBarItems(trailing: (((commentFeed.sentimentAvg as NSString).floatValue >= 0.0) ? Image(systemName: "smiley.fill").foregroundColor(Color.green) : Image(systemName: "smiley.fill").foregroundColor(Color.red))) | |
} | |
init(commentIds: [Int]) { | |
commentFeed.getIds(ids: commentIds) | |
} | |
} |
I went through your article and really disappointed to see the different files being shared instead of one github project. Can you please make it one github project, so that things are easy for everyone?
Thanks for your effort !
The different code snippets shared here are for the article purposes only.
It’s done in order to break down the implementation for readability
purposes. I’d appreciate if you would check out my GitHub profile which
contains the full project. Gists are meant for little code snippets,
generally!
On Sun, 12 Jul 2020 at 8:12 AM, abrahamali5 ***@***.***> wrote:
***@***.**** commented on this gist.
------------------------------
I went through your article and really disappointed to see the different
files being shared instead of one github project. Can you please make it
one github project, so that things are easy for everyone?
Thanks for your effort !
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<https://gist.github.com/d26788b88dd081d9d24d650857557a94#gistcomment-3373003>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACAGYMTMQFKPSI3OG5GLACTR3EPKRANCNFSM4OXSYLWA>
.
--
Sent from Anupam’s iPhone
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Why have you shared the code in bits and pieces and not in the form of project?