mirror of
https://github.com/Iconica-Development/flutter_timeline.git
synced 2025-05-19 10:33:44 +02:00
Merge pull request #16 from Iconica-Development/bugfix/filter
fix: Proper service is being used for filtering
This commit is contained in:
commit
98c0c8d45b
1 changed files with 3 additions and 3 deletions
|
@ -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');
|
||||
|
|
Loading…
Reference in a new issue