запуск sync только при обновлении списка

This commit is contained in:
kirillius 2025-01-12 01:25:40 +03:00
parent d5af5028ba
commit 093115bd53
1 changed files with 7 additions and 6 deletions

View File

@ -58,14 +58,15 @@ class Netsync extends Plugin
if (count($diff) > 0) { if (count($diff) > 0) {
$wrapper["networks"] = array_values($remote_enabled); $wrapper["networks"] = array_values($remote_enabled);
$wrapper->save(); $wrapper->save();
} foreach ($this->context->getRPC()->getPlugins() as $plugin) {
foreach ($this->context->getRPC()->getPlugins() as $plugin) { /**
/** * @var IPluggable $plugin
* @var IPluggable $plugin */
*/
$plugin->onSync(); $plugin->onSync();
}
} }
return $diff; return $diff;
} }
} }