Remove old ReactionStrip to avoid duplication

- Remove old ReactionStrip component from PostActions
- Remove unused top reactions calculation
- Remove ReactionStrip import
- Keep only SmartReactionButton for clean interface
- Eliminate redundant reaction display
- Simplify action row layout
This commit is contained in:
Patrick Britton 2026-02-01 14:22:35 -06:00
parent 94ffb419ae
commit a6c7834b3b

View file

@ -7,7 +7,6 @@ import '../../models/post.dart';
import '../../providers/api_provider.dart';
import '../../theme/app_theme.dart';
import '../sojorn_snackbar.dart';
import '../reactions/reaction_strip.dart';
import '../reactions/reaction_picker.dart';
import '../reactions/smart_reaction_button.dart';
@ -200,25 +199,9 @@ class _PostActionsState extends ConsumerState<PostActions> {
Widget build(BuildContext context) {
final allowChain = widget.post.allowChain && widget.post.visibility != 'private' && widget.onChain != null;
// Get top 3 reactions by count
final sortedReactions = _reactionCounts.entries.toList()
..sort((a, b) => b.value.compareTo(a.value));
final topReactions = Map.fromEntries(
sortedReactions.take(3)
);
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
// Reactions section - full width, but only top 3
ReactionStrip(
reactions: topReactions,
myReactions: _myReactions,
reactionUsers: {},
onToggle: (emoji) => _toggleReaction(emoji),
onAdd: _showReactionPicker, // Show picker instead of default heart
),
const SizedBox(height: 16),
// Actions row - left aligned
Row(
children: [