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);
if (widget.filterEnabled && filterWord != null) {
if (service is TimelineFilterService?) {
posts =
(service as TimelineFilterService).filterPosts(filterWord!, {});
if (service.postService is TimelineFilterService) {
posts = (service.postService as TimelineFilterService)
.filterPosts(filterWord!, {});
} else {
debugPrint('Timeline service needs to mixin'
' with TimelineFilterService');