Skins shouldn't apply to fallback flavours

remotes/1727458204337373841/tmp_refs/heads/signup-info-prompt
kibigo! 2017-12-07 14:49:54 -08:00
parent 753535c3c7
commit 717b7d555c
1 changed files with 3 additions and 3 deletions

View File

@ -103,15 +103,15 @@ class ApplicationController < ActionController::Base
if data['fallback'].nil? if data['fallback'].nil?
return nil_pack(data, pack_name, skin) return nil_pack(data, pack_name, skin)
elsif data['fallback'].is_a?(String) && Themes.instance.flavour(data['fallback']) elsif data['fallback'].is_a?(String) && Themes.instance.flavour(data['fallback'])
return resolve_pack(Themes.instance.flavour(data['fallback']), pack_name, skin) return resolve_pack(Themes.instance.flavour(data['fallback']), pack_name)
elsif data['fallback'].is_a?(Array) elsif data['fallback'].is_a?(Array)
data['fallback'].each do |fallback| data['fallback'].each do |fallback|
return resolve_pack(Themes.instance.flavour(fallback), pack_name, skin) if Themes.instance.flavour(fallback) return resolve_pack(Themes.instance.flavour(fallback), pack_name) if Themes.instance.flavour(fallback)
end end
end end
return nil_pack(data, pack_name, skin) return nil_pack(data, pack_name, skin)
end end
return data.key?('name') && data['name'] != Setting.default_settings['flavour'] ? resolve_pack(Themes.instance.flavour(Setting.default_settings['flavour']), pack_name, skin) : nil_pack(data, pack_name, skin) return data.key?('name') && data['name'] != Setting.default_settings['flavour'] ? resolve_pack(Themes.instance.flavour(Setting.default_settings['flavour']), pack_name) : nil_pack(data, pack_name, skin)
end end
result result
end end