feat: Add FeedFilter model and begin feed filtering integration
This commit is contained in:
parent
961aa02eac
commit
62233d5892
13
sojorn_app/lib/models/feed_filter.dart
Normal file
13
sojorn_app/lib/models/feed_filter.dart
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
/// Filter options for the home feed
|
||||
enum FeedFilter {
|
||||
all('All Posts', null),
|
||||
posts('Posts Only', 'post'),
|
||||
quips('Quips Only', 'quip'),
|
||||
chains('Chains Only', 'chain'),
|
||||
beacons('Beacons Only', 'beacon');
|
||||
|
||||
final String label;
|
||||
final String? typeValue;
|
||||
|
||||
const FeedFilter(this.label, this.typeValue);
|
||||
}
|
||||
|
|
@ -3,6 +3,7 @@ import 'package:flutter_riverpod/flutter_riverpod.dart';
|
|||
import '../../providers/api_provider.dart';
|
||||
import '../../providers/feed_refresh_provider.dart';
|
||||
import '../../models/post.dart';
|
||||
import '../../models/feed_filter.dart';
|
||||
import '../../theme/app_theme.dart';
|
||||
import '../../widgets/sojorn_post_card.dart';
|
||||
import '../../widgets/app_scaffold.dart';
|
||||
|
|
@ -23,6 +24,7 @@ class _FeedPersonalScreenState extends ConsumerState<FeedPersonalScreen> {
|
|||
bool _isLoading = false;
|
||||
bool _hasMore = true;
|
||||
String? _error;
|
||||
FeedFilter _currentFilter = FeedFilter.all;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
|
|
|
|||
Loading…
Reference in a new issue