Skip to content

Commit

Permalink
fix: add renote as detailed at NotesNotifier (#271)
Browse files Browse the repository at this point in the history
This fixes an issue where polls contained in renotes are not visible.
  • Loading branch information
poppingmoon authored Jun 30, 2024
1 parent f767ed4 commit ac6ea7d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion lib/provider/notes_notifier_provider.dart
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class NotesNotifier extends _$NotesNotifier {
Note? add(Note note, {bool detail = true}) {
final renote = note.renote;
if (renote != null) {
add(renote, detail: false);
add(renote);
}
final reply = note.reply;
if (reply != null) {
Expand All @@ -38,6 +38,7 @@ class NotesNotifier extends _$NotesNotifier {
renote: renote ?? state[note.renoteId],
reply: reply ?? state[note.replyId],
poll: detail ? note.poll : cachedNote?.poll,
myReaction: detail ? note.myReaction : cachedNote?.myReaction,
),
};
return cachedNote;
Expand Down
2 changes: 1 addition & 1 deletion lib/provider/notes_notifier_provider.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit ac6ea7d

Please sign in to comment.