add check if only fallback push and skip full refresh (Framework::refresh_opener) for push and supporting apps

This commit is contained in:
Ralf Becker
2020-07-24 09:07:13 +02:00
parent 56dbbf406f
commit b60a9ffff4
3 changed files with 30 additions and 7 deletions

View File

@@ -88,8 +88,9 @@ class notifications_ajax {
private $response;
/**
* Do we have a real push server, or only a fallback
*
* @var type
* @var bool
*/
private $isPushServer;
@@ -108,12 +109,10 @@ class notifications_ajax {
$this->db = $GLOBALS['egw']->db;
if (empty(($isPushServer = Api\Cache::getCache(Api\Cache::INSTANCE, 'notifications', 'isPushServer'))))
$this->isPushServer = Api\Cache::getInstance('notifications', 'isPushServer', function ()
{
$isPushServer = (!((New Api\Json\Push ()) instanceof notifications_push));
Api\Cache::setCache(Api\Cache::INSTANCE, 'notifications','isPushServer', $isPushServer, 86400);
}
$this->isPushServer = $isPushServer;
return !Api\Json\Push::onlyFallback();
}, [], 900);
}
/**