Commit d4aba130 authored by Ignamarte's avatar Ignamarte

Move bloquant operations when displaying some panels to a dedicated thread

parent 9bd4be85
Pipeline #106616280 passed with stage
in 2 minutes and 42 seconds
......@@ -23,8 +23,8 @@ class FollowedPanel(title:String)
new Thread {
override def run(): Unit = {
val follows = Follows.getSubscriptions()
Platform.runLater(displayObjects(follows.getUsers()))
val follows = Follows.getSubscriptions().getUsers()
Platform.runLater(displayObjects(follows))
}
}.start()
}
......
......@@ -23,8 +23,8 @@ class FollowsPanel(title:String)
new Thread {
override def run(): Unit = {
val follows = Follows.getSubscriptions()
Platform.runLater(displayObjects(follows.getStreams().withUser()))
val follows = Follows.getSubscriptions().getStreams().withUser()
Platform.runLater(displayObjects(follows))
}
}.start()
}
......
......@@ -18,6 +18,12 @@ class GamesPanel (title: String)
override def initialize(): Unit = {
super.initialize()
Platform.runLater(displayObjects(Games.topGames()))
new Thread {
override def run(): Unit = {
val games = Games.topGames()
Platform.runLater(displayObjects(games))
}
}.start()
}
}
......@@ -29,8 +29,8 @@ class StreamsPanel(
new Thread {
override def run(): Unit = {
val streams = Streams.topStreams(gameID = gameID)
Platform.runLater(displayObjects(streams.withUser()))
val streams = Streams.topStreams(gameID = gameID).withUser()
Platform.runLater(displayObjects(streams))
}
}.start()
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment