Skip to content

Commit

Permalink
fix[Op#40437]: ensure all wp journals are updated including removals
Browse files Browse the repository at this point in the history
  • Loading branch information
akabiru committed Oct 25, 2024
1 parent 80cea6e commit 0d7d897
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions app/controllers/work_packages/activities_tab_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -330,12 +330,12 @@ def generate_time_based_update_streams(last_update_timestamp)
end

def generate_work_package_journals_emoji_reactions_update_streams
# Current limitation: Only shows added reactions, not removed ones
Journal.grouped_work_package_journals_emoji_reactions(@work_package).each do |journal_id, grouped_emoji_reactions|
wp_journal_emoji_reactions = Journal.grouped_work_package_journals_emoji_reactions(@work_package)
@work_package.journals.each do |journal|
update_via_turbo_stream(
component: WorkPackages::ActivitiesTab::Journals::ItemComponent::Reactions.new(
journal: @work_package.journals.find(journal_id),
grouped_emoji_reactions:
journal:,
grouped_emoji_reactions: wp_journal_emoji_reactions[journal.id] || {}
)
)
end
Expand Down

0 comments on commit 0d7d897

Please sign in to comment.