lib/volt/models/persistors/store_state.rb in volt-0.8.18 vs lib/volt/models/persistors/store_state.rb in volt-0.8.19
- old
+ new
@@ -8,29 +8,29 @@
end
def state
@state_dep ||= Dependency.new
@state_dep.depend
+
@state
end
# Called from the QueryListener when the data is loaded
- def change_state_to(new_state, skip_trigger = false)
+ def change_state_to(new_state)
old_state = @state
@state = new_state
# Trigger changed on the 'state' method
- unless skip_trigger
- if old_state != @state
- @state_dep.changed! if @state_dep
- end
+ if old_state != @state
+ @state_dep.changed! if @state_dep
end
if @state == :loaded && @fetch_promises
# Trigger each waiting fetch
@fetch_promises.compact.each { |fp| fp.resolve(@model) }
@fetch_promises = nil
+ # puts "STOP LIST---------"
stop_listening
end
end
end
end