mirror of
https://github.com/openvk/openvk
synced 2024-11-11 01:19:53 +03:00
Notifications: Fix code style + little bit of performance
This commit is contained in:
parent
b3e597959c
commit
39c85451fc
1 changed files with 2 additions and 2 deletions
|
@ -8,7 +8,7 @@ final class NotificationPresenter extends OpenVKPresenter
|
|||
$this->assertUserLoggedIn();
|
||||
|
||||
$archive = $this->queryParam("act") === "archived";
|
||||
$count = $this->user->identity->getNotificationsCount($archive);
|
||||
$count = $this->user->identity->getNotificationsCount($archive);
|
||||
|
||||
if($count == 0 && $this->queryParam("act") == NULL) {
|
||||
$mode = "archived";
|
||||
|
@ -20,7 +20,7 @@ final class NotificationPresenter extends OpenVKPresenter
|
|||
$this->template->mode = $mode;
|
||||
$this->template->page = (int) ($this->queryParam("p") ?? 1);
|
||||
$this->template->iterator = iterator_to_array($this->user->identity->getNotifications($this->template->page, $archive));
|
||||
$this->template->count = $this->user->identity->getNotificationsCount($archive);
|
||||
$this->template->count = $count;
|
||||
|
||||
$this->user->identity->updateNotificationOffset();
|
||||
$this->user->identity->save();
|
||||
|
|
Loading…
Reference in a new issue