Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
schubi2 committed Nov 21, 2019
1 parent 053bff6 commit 2ca010c
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/include/add-on/add-on-workflow.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1450,9 +1450,10 @@ def RedrawAddOnsOverviewTable
log.info("Currently used add-ons: #{product_infos}")

products = product_infos.map do |index, product_desc|
product_name = product_desc["product"].display_name
product_name = product_desc["product"].name if product_name.empty?
product_name = _("Unknown product") if product_name.empty?
product_name = [ product_desc["product"].display_name,
product_desc["product"].name,
_("Unknown product") ].reject(&:empty?).first

Item(Id("product_#{index}"),
product_name,
product_desc["info"]["URLs"].first || _("Unknown URL")
Expand Down Expand Up @@ -1495,9 +1496,9 @@ def RemoveProductWithDependencies
return nil
end

product_name = pi["product"].display_name
product_name = pi["product"].name if product_name.empty?
product_name = _("Unknown product") if product_name.empty?
product_name = [ pi["product"].display_name,
pi["product"].name,
_("Unknown product") ].reject(&:empty?).first

if !Popup.AnyQuestion(
Label.WarningMsg,
Expand Down

0 comments on commit 2ca010c

Please sign in to comment.