Added comments about tentative changes.

This commit is contained in:
Snowyfox 2021-07-29 04:22:14 -04:00
parent 467e168557
commit b47a97e8ad

View File

@ -57,7 +57,36 @@ implements ActionListener {
postDisplay.setTime(post.date);
postDisplay.setText(post.text);
// And, reply display too, later.
/*
* We also have to display the replies for that post.
* Are we supposed to request those replies ourselves?
* Shouldn't the caller of setPost also give us the
* reply posts?
*/
if (post == null)
{
List<String> authors = new ArrayList<>();
List<String> texts = new ArrayList<>();
authors.add("Black tea");
authors.add("Green tea");
authors.add("White tea");
texts.add("Rich..");
texts.add("Clean!");
texts.add("Myu..");
repliesDisplay.setReplies(authors, texts);
/*
* THe replies display contains a reduction of every
* reply post. Rather than repeatedly loop through the
* replies to assemble lists of individual information,
* we should loop once and assemble a list of structs.
* Then repliesDisplay should support that struct..
*
* Alternatively, repliesDisplay can accept (reply) posts
* directly, avoiding a new struct. But that goes against
* our communication model here.
*/
}
}
// - -%- -
@ -99,17 +128,6 @@ implements ActionListener {
postDisplay = new PostComponent();
repliesDisplay = new RepliesComponent();
{
List<String> authors = new ArrayList<>();
List<String> texts = new ArrayList<>();
authors.add("Black tea");
authors.add("Green tea");
authors.add("White tea");
texts.add("Rich..");
texts.add("Clean!");
texts.add("Myu..");
repliesDisplay.setReplies(authors, texts);
}
setPost(null);