remove the forum topic view counter
because of course it made some players mass-reload pages to get counters uppull/7384/head
parent
504bc92279
commit
e3c0ea2b09
|
@ -56,7 +56,6 @@ object categ {
|
|||
td(cls := "subject")(
|
||||
a(href := routes.ForumTopic.show(categ.slug, topic.slug))(topic.name)
|
||||
),
|
||||
td(cls := "right")(topic.views.localize),
|
||||
td(cls := "right")(topic.nbReplies.localize),
|
||||
td(
|
||||
topic.lastPost.map { post =>
|
||||
|
@ -100,7 +99,6 @@ object categ {
|
|||
thead(
|
||||
tr(
|
||||
th,
|
||||
th(cls := "right")(trans.views()),
|
||||
th(cls := "right")(trans.replies()),
|
||||
th(trans.lastPost())
|
||||
)
|
||||
|
|
|
@ -11,7 +11,6 @@ case class Topic(
|
|||
categId: String,
|
||||
slug: String,
|
||||
name: String,
|
||||
views: Int,
|
||||
createdAt: DateTime,
|
||||
updatedAt: DateTime,
|
||||
nbPosts: Int,
|
||||
|
@ -82,7 +81,6 @@ object Topic {
|
|||
categId = categId,
|
||||
slug = slug,
|
||||
name = name,
|
||||
views = 0,
|
||||
createdAt = DateTime.now,
|
||||
updatedAt = DateTime.now,
|
||||
nbPosts = 0,
|
||||
|
|
|
@ -40,7 +40,6 @@ final private[forum] class TopicApi(
|
|||
}
|
||||
res <- data ?? { case (categ, topic) =>
|
||||
lila.mon.forum.topic.view.increment()
|
||||
env.topicRepo incViews topic
|
||||
env.postApi.paginator(topic, page, forUser) map { (categ, topic, _).some }
|
||||
}
|
||||
} yield res
|
||||
|
|
|
@ -60,9 +60,6 @@ final class TopicRepo(val coll: Coll, filter: Filter = Safe)(implicit
|
|||
}
|
||||
}
|
||||
|
||||
def incViews(topic: Topic) =
|
||||
coll.incFieldUnchecked($id(topic.id), "views")
|
||||
|
||||
def byCategQuery(categ: Categ) = $doc("categId" -> categ.slug) ++ trollFilter
|
||||
def byCategNotStickyQuery(categ: Categ) = byCategQuery(categ) ++ notStickyQuery
|
||||
}
|
||||
|
|
|
@ -37,7 +37,6 @@ case class TopicView(
|
|||
def id = topic.id
|
||||
def slug = topic.slug
|
||||
def name = topic.name
|
||||
def views = topic.views
|
||||
def createdAt = topic.createdAt
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue