Update Models\Topic\Model

Do not use a database query for unvisited topics.
This commit is contained in:
Visman 2021-04-06 16:10:22 +07:00
parent 7400f4abe7
commit fa0aa815ce

View file

@ -238,6 +238,8 @@ class Model extends DataModel
{
if (false === $this->hasNew) {
return 0;
} elseif ($this->posted > $this->hasNew) {
return $this->first_post_id;
}
$vars = [
@ -260,6 +262,8 @@ class Model extends DataModel
{
if (false === $this->hasUnread) {
return 0;
} elseif ($this->posted > $this->hasUnread) {
return $this->first_post_id;
}
$vars = [