这是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
8 changes: 7 additions & 1 deletion lib/view/dialog/post_confirmation_dialog.dart
Original file line number Diff line number Diff line change
Expand Up @@ -85,13 +85,19 @@ class PostConfirmationDialog extends ConsumerWidget {
),
),
if (request.isRenote)
NoteWidget(account: account, noteId: request.renoteId!)
NoteWidget(
account: account,
noteId: request.renoteId!,
showFooter: false,
backgroundColor: Colors.transparent,
)
else
NoteWidget(
account: account,
noteId: '',
note: note.copyWith(files: files),
showFooter: false,
backgroundColor: Colors.transparent,
),
Align(
alignment: Alignment.centerRight,
Expand Down
25 changes: 14 additions & 11 deletions lib/view/widget/note_widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ class NoteWidget extends HookConsumerWidget {
this.tapAction,
this.doubleTapAction,
this.longPressAction,
this.backgroundColor,
});

final Account account;
Expand All @@ -68,6 +69,7 @@ class NoteWidget extends HookConsumerWidget {
final NoteActionType? tapAction;
final NoteActionType? doubleTapAction;
final NoteActionType? longPressAction;
final Color? backgroundColor;

@override
Widget build(BuildContext context, WidgetRef ref) {
Expand Down Expand Up @@ -203,17 +205,18 @@ class NoteWidget extends HookConsumerWidget {
isRenote &&
(isMyRenote || isMyNote || appearNote.myReaction != null),
);
final backgroundColor = ref.watch(
generalSettingsNotifierProvider.select(
(settings) => switch (note.visibility) {
NoteVisibility.public => settings.publicNoteBackgroundColor,
NoteVisibility.home => settings.homeNoteBackgroundColor,
NoteVisibility.followers => settings.followersNoteBackgroundColor,
NoteVisibility.specified => settings.specifiedNoteBackgroundColor,
null => null,
},
),
);
final backgroundColor = this.backgroundColor ??
ref.watch(
generalSettingsNotifierProvider.select(
(settings) => switch (note.visibility) {
NoteVisibility.public => settings.publicNoteBackgroundColor,
NoteVisibility.home => settings.homeNoteBackgroundColor,
NoteVisibility.followers => settings.followersNoteBackgroundColor,
NoteVisibility.specified => settings.specifiedNoteBackgroundColor,
null => null,
},
),
);
final colors =
ref.watch(misskeyColorsProvider(Theme.of(context).brightness));
final style = DefaultTextStyle.of(context).style;
Expand Down