Is the order guaranteed? Are the newest news at the top?
Is the order guaranteed? Are the newest news at the top?
So I am having an issue with my news timestamps not matching up even close to what my game retrieves. The oldest timestamp gets displayed as result.News[0] then result.News[1] is the newest news item. I thought result.News[0] was supposed to be the newest. I even have my 3 news items' timestamps set correctly with the oldest timestamp for April 10th, then April 15th, then today. Yet the first item displayed is April 10th, then today's, then April 15th's. I attached my code for displaying the news data. Maybe I'm missing something horrendously obvious, but I can't see anything wrong? Help me out? :)
for(int i = 0; i < result.News.Count; i++) { gameObject.GetComponent<Text>().text += result.News[i].Timestamp + "\n" + "* " + result.News[i].Title + "\n" + "\n" + result.News[i].Body; gameObject.GetComponent<Text>().text += "\n" + "\n" + "\n" + "\n"; }
News items are ordered by most to least recent (so, element 0 of the array is the most recent), using the Timestamp set on them.
My order is not. Can you please take a look at my question here Brendan?
https://community.playfab.com/questions/29809/title-news-not-displaying-in-proper-order.html
2 People are following this question.