From: Alexis Laferrière Date: Thu, 7 Apr 2016 17:45:22 +0000 (-0400) Subject: contrib/tnitter: use the new `clear` for a cleaner behavior X-Git-Url: http://nitlanguage.org contrib/tnitter: use the new `clear` for a cleaner behavior Signed-off-by: Alexis Laferrière --- diff --git a/contrib/tnitter/src/tnitter_app.nit b/contrib/tnitter/src/tnitter_app.nit index b8a955a..fccad93 100644 --- a/contrib/tnitter/src/tnitter_app.nit +++ b/contrib/tnitter/src/tnitter_app.nit @@ -73,8 +73,7 @@ class TnitterWindow # Update the screen to show the new `posts` fun apply_update(posts: Array[Post]) do - layout.remove list_posts - list_posts = new ListLayout(parent=layout) + list_posts.clear for post in posts do var line = new VerticalLayout(parent=list_posts) var author = new LabelAuthor(parent=line, text="@"+post.user)