This commit is contained in:
Daniil Gentili 2017-06-08 13:30:02 +01:00
parent 8c288f78ac
commit 3cab74f7d5
2 changed files with 11 additions and 2 deletions

View File

@ -71,6 +71,13 @@ class API extends APIFactory
return $this->storage[$name] = $value;
}
public function __isset($name) {
return isset($this->storage[$name]);
}
public function __unset($name) {
unset($this->storage[$name]);
}
public function APIFactory()
{

View File

@ -218,7 +218,8 @@ trait UpdateHandler
$this->updates_state['qts'] = 0;
}
if (!$this->got_state) {
$this->get_updates_state();
$this->got_state = true;
$this->set_update_state($this->get_updates_state());
}
return $this->updates_state;
@ -280,8 +281,9 @@ trait UpdateHandler
{
$last = $this->updates_state['sync_loading'];
$this->updates_state['sync_loading'] = true;
$this->set_update_state($this->method_call('updates.getState', [], ['datacenter' => $this->datacenter->curdc]));
$data = $this->method_call('updates.getState', [], ['datacenter' => $this->datacenter->curdc]);
$this->updates_state['sync_loading'] = $last;
return $data;
}
public function handle_update($update, $options = [])