+373
lib/providers/comments_provider.dart
···
···
feat: implement CommentsProvider for comment state management
- Add comprehensive state management for comments with pagination
- Implement sort options (hot/top/new) with pending refresh mechanism
- Support optimistic vote integration via VoteProvider
- Add time update mechanism with ValueNotifier for efficient rebuilds
- Handle auth state changes and automatic vote state loading
- Implement error recovery with rollback on sort change failures
Features:
- Cursor-based pagination for infinite scroll
- Automatic refresh scheduling when sort changes during loading
- Clean separation of concerns with proper provider lifecycle
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
···
···