assets/src/ruboto/activity/reload.rb in ruboto-1.0.3 vs assets/src/ruboto/activity/reload.rb in ruboto-1.1.0
- old
+ new
@@ -41,9 +41,10 @@
def onReceive(context, reload_intent)
Log.d "Got reload intent: #{reload_intent.inspect}"
file_string = reload_intent.get_string_extra('reload')
if file_string
scripts_dir = @activity.getExternalFilesDir(nil).absolute_path + '/scripts'
+ files = file_string.split(/(?<!&);/).map { |f| f.gsub(/&(.)/) { |m| m[1] } }
files.each do |file|
Log.d "load file: #{scripts_dir}/#{file}"
load "#{scripts_dir}/#{file}"
end
Log.d 'restart activity'