Skip to content

Commit

Permalink
fix news not appearing first time
Browse files Browse the repository at this point in the history
  • Loading branch information
Paprikadobi committed Jul 16, 2022
1 parent e42cc18 commit ea5a9ca
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/components/home/news_section.dart
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,10 @@ class _NewsSectionState extends State<NewsSection> {
),
const SizedBox(height: kDefaultPadding),
if (newsItems.isEmpty)
Text('Žádné novinky', style: textTheme.bodyMedium)
Container(
padding: const EdgeInsets.only(bottom: kDefaultPadding / 2),
child: Text('Žádné novinky', style: textTheme.bodyMedium),
)
else
SizedBox(
height: _newsItemHeight,
Expand Down
2 changes: 2 additions & 0 deletions lib/providers/data.dart
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,8 @@ class DataProvider extends ChangeNotifier {
// ignore: empty_catches
} catch (e) {}
}

notifyListeners();
}

void _addLanguagesToTags() {
Expand Down

0 comments on commit ea5a9ca

Please sign in to comment.