mirror of
https://github.com/danog/MadelineProto.git
synced 2025-01-23 08:11:19 +01:00
Avoid certain yield issues
This commit is contained in:
parent
db08a8c167
commit
00150a1045
2
docs
2
docs
@ -1 +1 @@
|
|||||||
Subproject commit 2afa14cd21754fbbcbc8bd25cecfeb3592662eca
|
Subproject commit e83c3ea026fc2142b6558378d0c9636c8c29f248
|
2
schemas
2
schemas
@ -1 +1 @@
|
|||||||
Subproject commit d0b2b612cbece1fd3dc971634326f7470dc0099b
|
Subproject commit 8fd40f0a4170769465e4943e4a5da37bd58f7e88
|
@ -85,7 +85,7 @@ abstract class SqlArray extends DriverArray
|
|||||||
*/
|
*/
|
||||||
public function isset($key): Promise
|
public function isset($key): Promise
|
||||||
{
|
{
|
||||||
return call(fn () => yield $this->offsetGet($key) !== null);
|
return call(fn () => null !== yield $this->offsetGet($key));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -746,7 +746,7 @@ class MTProto extends AsyncConstruct implements TLCallback
|
|||||||
yield $this->usernames->clear();
|
yield $this->usernames->clear();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (yield $this->usernames->count() === 0) {
|
if (!yield $this->usernames->count()) {
|
||||||
$this->logger('Filling database cache. This can take few minutes.', Logger::WARNING);
|
$this->logger('Filling database cache. This can take few minutes.', Logger::WARNING);
|
||||||
$iterator = $this->chats->getIterator();
|
$iterator = $this->chats->getIterator();
|
||||||
while (yield $iterator->advance()) {
|
while (yield $iterator->advance()) {
|
||||||
|
@ -84,7 +84,7 @@ class MinDatabase implements TLCallback
|
|||||||
if (!$this->API->getSettings()->getDb()->getEnableMinDb()) {
|
if (!$this->API->getSettings()->getDb()->getEnableMinDb()) {
|
||||||
yield $this->db->clear();
|
yield $this->db->clear();
|
||||||
}
|
}
|
||||||
if ($this->clean || yield $this->db->count() === 0) {
|
if ($this->clean || 0 === yield $this->db->count()) {
|
||||||
$this->clean = true;
|
$this->clean = true;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user