Move generateMenu method to async background task.
This commit is contained in:
@@ -52,9 +52,11 @@ class MatchesAPI {
|
||||
newMatch.team1score = leftscore
|
||||
newMatch.team2name = try match.getElementsByClass("team-right").text()
|
||||
newMatch.team2score = rightscore
|
||||
print(newMatch)
|
||||
matches.append(newMatch)
|
||||
}
|
||||
if matches.count == 0 {
|
||||
return nil
|
||||
}
|
||||
return matches
|
||||
} catch Exception.Error(_, _) {
|
||||
print("")
|
||||
|
||||
Reference in New Issue
Block a user