Sitemap query now fully asynchronous

Sitemap generation is now independent from the navbar generation, and
it will be added to the navbar only once the navbar has been created.

Also, better style for code.
This commit is contained in:
2020-05-10 12:00:47 +02:00
parent 2f297b6374
commit aa4600b588
3 changed files with 33 additions and 22 deletions

View File

@@ -1,9 +1,9 @@
import './reorganize_html.dart' show reorganizeHtml;
import './theme.dart' show enableThemeChanger, setTheme;
import './parse_sitemap.dart' show getSitemap;
Future<void> main() async {
await setTheme();
await reorganizeHtml().then((_) {
enableThemeChanger();
});
await reorganizeHtml().then((_) => enableThemeChanger());
await getSitemap();
}