这是indexloc提供的服务,不要输入任何密码
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions lib/view/widget/note_footer.dart
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,10 @@ class _AddReactionButton extends ConsumerWidget {

return GestureDetector(
onLongPress: (note.reactionCount ?? 0) > 0
? () => showModalBottomSheet<void>(
? () {
if (note.id.isEmpty) return;
HapticFeedback.lightImpact();
showModalBottomSheet<void>(
context: context,
builder: (context) => ReactionUsersSheet(
account: account,
Expand All @@ -474,7 +477,8 @@ class _AddReactionButton extends ConsumerWidget {
),
clipBehavior: Clip.antiAlias,
isScrollControlled: true,
)
);
}
: null,
child: IconButton(
tooltip: (note.reactionCount ?? 0) <= 0
Expand Down Expand Up @@ -561,6 +565,7 @@ class _RemoveReactionButton extends ConsumerWidget {
return GestureDetector(
onLongPress: () {
if (note.id.isEmpty) return;
HapticFeedback.lightImpact();
showModalBottomSheet<void>(
context: context,
builder: (context) => ReactionUsersSheet(
Expand Down
16 changes: 10 additions & 6 deletions lib/view/widget/reaction_users_sheet.dart
Original file line number Diff line number Diff line change
Expand Up @@ -68,22 +68,26 @@ class ReactionUsersSheet extends HookConsumerWidget {
const SizedBox(width: 12.0),
...?reactions?.map(
(emoji) => Padding(
padding: const EdgeInsets.all(2.0),
padding: const EdgeInsets.symmetric(
vertical: 2.0,
horizontal: 4.0,
),
child: ElevatedButton(
onPressed: () => reaction.value = emoji,
style: ElevatedButton.styleFrom(
padding: const EdgeInsets.symmetric(
vertical: 2.0,
horizontal: 4.0,
vertical: 4.0,
horizontal: 6.0,
),
minimumSize: Size.zero,
tapTargetSize: MaterialTapTargetSize.shrinkWrap,
shape: RoundedRectangleBorder(
side: emoji == reaction.value
? BorderSide(color: colors.accent)
: BorderSide.none,
borderRadius: BorderRadius.circular(4.0),
),
backgroundColor: emoji == reaction.value
? colors.accent.withOpacity(0.5)
: colors.buttonBg,
backgroundColor: colors.buttonBg,
elevation: 0.0,
),
child: ConstrainedBox(
Expand Down
Loading