Update Models\Topic\Model
Do not use a database query for unvisited topics.
This commit is contained in:
parent
7400f4abe7
commit
fa0aa815ce
1 changed files with 4 additions and 0 deletions
|
@ -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 = [
|
||||
|
|
Loading…
Reference in a new issue