mirror of
https://github.com/zhigang1992/fir-cli.git
synced 2026-04-28 09:35:28 +08:00
add icons.reverse
This commit is contained in:
@@ -96,7 +96,6 @@ module Parser
|
||||
icons << get_image("#{name}@2x")
|
||||
end
|
||||
icons.delete_if { |i| !i }
|
||||
icons.reverse
|
||||
rescue NoMethodError
|
||||
[]
|
||||
end
|
||||
|
||||
@@ -35,7 +35,7 @@ module FIR
|
||||
}
|
||||
|
||||
if is_all
|
||||
app.icons.each_with_index do |icon, index|
|
||||
app.icons.reverse.each_with_index do |icon, index|
|
||||
tmp_icon_path = "#{Dir.tmpdir}/icon-#{SecureRandom.hex[4..9]}.png"
|
||||
FileUtils.cp(icon, tmp_icon_path)
|
||||
info["icon_#{index}".to_sym] = tmp_icon_path
|
||||
@@ -63,7 +63,7 @@ module FIR
|
||||
|
||||
# apk.icon is a hash, { icon_name: icon_data }
|
||||
if is_all
|
||||
apk.icon.each_with_index do |name_with_data, index|
|
||||
apk.icon.to_a.reverse.each_with_index do |name_with_data, index|
|
||||
tmp_icon_path = "#{Dir.tmpdir}/icon-#{SecureRandom.hex[4..9]}.png"
|
||||
File.open(tmp_icon_path, 'w+') { |f| f << name_with_data[1] }
|
||||
info["icon_#{index}".to_sym] = tmp_icon_path
|
||||
|
||||
Reference in New Issue
Block a user