这是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
41 changes: 17 additions & 24 deletions lib/view/widget/note_detailed_widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ class NoteDetailedWidget extends HookConsumerWidget {
? ref.watch(conversationNotesProvider(account, noteId))
: null;
final isRenote = note.isRenote;
final theme = Theme.of(context);
final style = DefaultTextStyle.of(context).style;

return InkWell(
Expand Down Expand Up @@ -221,16 +222,15 @@ class NoteDetailedWidget extends HookConsumerWidget {
decoration: BoxDecoration(
border: BorderDirectional(
start: BorderSide(
color:
Theme.of(
context,
).colorScheme.outlineVariant,
color: theme.colorScheme.outlineVariant,
width: 2.0,
),
),
),
padding: const EdgeInsetsDirectional.only(
start: 4.0,
top: 4.0,
bottom: 4.0,
),
child: NoteSubWidget(
account: account,
Expand All @@ -254,25 +254,19 @@ class NoteDetailedWidget extends HookConsumerWidget {
separatorBuilder:
(context, index) =>
index < notes.length - 1
? ChannelColorBarBox(
note: note,
child: Container(
margin: EdgeInsetsDirectional.only(
start: horizontalPadding - 4.0,
),
decoration: BoxDecoration(
border: BorderDirectional(
start: BorderSide(
color:
Theme.of(
context,
).colorScheme.outlineVariant,
width: 2.0,
),
? Container(
margin: EdgeInsetsDirectional.only(
start: horizontalPadding - 4.0,
),
decoration: BoxDecoration(
border: BorderDirectional(
start: BorderSide(
color: theme.colorScheme.outlineVariant,
width: 2.0,
),
),
child: const Divider(),
),
child: const Divider(height: 0.0),
)
: const SizedBox.shrink(),
itemCount: notes.length + 1,
Expand Down Expand Up @@ -337,9 +331,8 @@ class _NoteDetailedContent extends HookConsumerWidget {
),
),
);
final colors = ref.watch(
misskeyColorsProvider(Theme.of(context).brightness),
);
final theme = Theme.of(context);
final colors = ref.watch(misskeyColorsProvider(theme.brightness));

return Column(
crossAxisAlignment: CrossAxisAlignment.start,
Expand Down Expand Up @@ -470,7 +463,7 @@ class _NoteDetailedContent extends HookConsumerWidget {
padding: const EdgeInsetsDirectional.only(end: 4.0),
child: Icon(
Icons.reply,
color: Theme.of(context).colorScheme.primary,
color: theme.colorScheme.primary,
),
),
),
Expand Down
7 changes: 7 additions & 0 deletions lib/view/widget/post_form.dart
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import '../../provider/account_settings_notifier_provider.dart';
import '../../provider/accounts_notifier_provider.dart';
import '../../provider/api/attaches_notifier_provider.dart';
import '../../provider/api/channel_notifier_provider.dart';
import '../../provider/api/children_notes_notifier_provider.dart';
import '../../provider/api/i_notifier_provider.dart';
import '../../provider/api/misskey_provider.dart';
import '../../provider/api/user_notifier_provider.dart';
Expand Down Expand Up @@ -165,6 +166,12 @@ class PostForm extends HookConsumerWidget {
unawaited(
ref.read(postFormHashtagsNotifierProvider(account).notifier).save(),
);
if (note.replyId case final replyId?) {
ref.invalidate(childrenNotesNotifierProvider(account, replyId));
}
if (note.renoteId case final renoteId?) {
ref.invalidate(childrenNotesNotifierProvider(account, renoteId));
}
ref.invalidate(attachesNotifierProvider(account, noteId: noteId));
ref.context.pop();
}
Expand Down
Loading