Merge pull request #16 from Iconica-Development/bugfix/filter

fix: Proper service is being used for filtering
This commit is contained in:
Gorter-dev 2024-01-30 11:00:26 +01:00 committed by GitHub
commit 98c0c8d45b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -94,9 +94,9 @@ class _TimelineScreenState extends State<TimelineScreen> {
var posts = widget.posts ?? service.postService.getPosts(category); var posts = widget.posts ?? service.postService.getPosts(category);
if (widget.filterEnabled && filterWord != null) { if (widget.filterEnabled && filterWord != null) {
if (service is TimelineFilterService?) { if (service.postService is TimelineFilterService) {
posts = posts = (service.postService as TimelineFilterService)
(service as TimelineFilterService).filterPosts(filterWord!, {}); .filterPosts(filterWord!, {});
} else { } else {
debugPrint('Timeline service needs to mixin' debugPrint('Timeline service needs to mixin'
' with TimelineFilterService'); ' with TimelineFilterService');