Skip to content

Commit 09ce6b7

Browse files
committed
fix: Make tags view actually list articles tagged with that tag
1 parent a7a7148 commit 09ce6b7

1 file changed

Lines changed: 6 additions & 10 deletions

File tree

lib/features/queue/queue_screen.dart

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,20 +21,16 @@ class QueueScreen extends ConsumerStatefulWidget {
2121
class _QueueScreenState extends ConsumerState<QueueScreen> {
2222
String _searchQuery = '';
2323
String? _selectedTag;
24-
bool _initialFilterApplied = false;
2524

2625
@override
2726
void didChangeDependencies() {
2827
super.didChangeDependencies();
29-
if (!_initialFilterApplied) {
30-
_initialFilterApplied = true;
31-
final routeTag =
32-
GoRouterState.of(context).uri.queryParameters['tag'];
33-
if (routeTag != null) {
34-
_selectedTag = routeTag;
35-
WidgetsBinding.instance
36-
.addPostFrameCallback((_) => _applyFilter());
37-
}
28+
final routeTag =
29+
GoRouterState.of(context).uri.queryParameters['tag'];
30+
if (routeTag != null && routeTag != _selectedTag) {
31+
setState(() => _selectedTag = routeTag);
32+
WidgetsBinding.instance
33+
.addPostFrameCallback((_) => _applyFilter());
3834
}
3935
}
4036

0 commit comments

Comments
 (0)