Skip to content

Commit

Permalink
fix: change color of renote button
Browse files Browse the repository at this point in the history
  • Loading branch information
poppingmoon committed Nov 22, 2024
1 parent a417cbc commit c9cb002
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions lib/view/widget/note_footer.dart
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import '../../provider/api/meta_notifier_provider.dart';
import '../../provider/api/misskey_provider.dart';
import '../../provider/appear_note_provider.dart';
import '../../provider/general_settings_notifier_provider.dart';
import '../../provider/misskey_colors_provider.dart';
import '../../provider/note_provider.dart';
import '../../provider/notes_notifier_provider.dart';
import '../../provider/post_notifier_provider.dart';
Expand Down Expand Up @@ -250,6 +251,8 @@ class _RenoteButton extends HookConsumerWidget {
@override
Widget build(BuildContext context, WidgetRef ref) {
final myRenotingNoteId = useState(this.myRenotingNoteId);
final colors =
ref.watch(misskeyColorsProvider(Theme.of(context).brightness));

return GestureDetector(
onLongPress: note.renoteCount > 0
Expand Down Expand Up @@ -286,8 +289,8 @@ class _RenoteButton extends HookConsumerWidget {
leading: const Icon(Icons.delete),
title: Text(t.misskey.unrenote),
onTap: () => context.pop(true),
iconColor: Theme.of(context).colorScheme.error,
textColor: Theme.of(context).colorScheme.error,
iconColor: colors.error,
textColor: colors.error,
),
],
),
Expand Down Expand Up @@ -342,9 +345,7 @@ class _RenoteButton extends HookConsumerWidget {
children: [
Icon(
Icons.repeat_rounded,
color: myRenotingNoteId.value != null
? Theme.of(context).colorScheme.primary
: null,
color: myRenotingNoteId.value != null ? colors.renote : null,
),
if (note.renoteCount > 0)
Padding(
Expand All @@ -353,7 +354,7 @@ class _RenoteButton extends HookConsumerWidget {
NumberFormat().format(note.renoteCount),
style: style?.apply(
color: myRenotingNoteId.value != null
? Theme.of(context).colorScheme.primary.withOpacity(0.6)
? colors.renote.withOpacity(0.6)
: null,
),
),
Expand Down

0 comments on commit c9cb002

Please sign in to comment.