Commit Graph

67 Commits

Author SHA1 Message Date
Barış Soner Uşaklı
5607e5bccb fix: #10594, move counter code (#11529)
instead of updating counters one by one on each topic move, update them once after all topics are moved, use zcard instead of incr/decr
2023-04-27 20:27:42 -04:00
Barış Soner Uşaklı
7ee4e4e004 fix: #10357 2022-03-02 15:00:27 -05:00
Barış Soner Uşaklı
6399b42826 feat: closes #9845, sort by views 2021-09-28 11:13:56 -04:00
Barış Soner Uşaklı
edf80cfb3b fix: hide titleRaw for deleted topics as well 2021-03-25 18:32:11 -04:00
gasoved
077330b764 feat: scheduled topics (#9399)
* feat: scheduled topics

* refactor: linting fixes

* fix: tests

* fix(test): race condition

* fix: make a single request
2021-03-24 14:28:02 -04:00
Barış Soner Uşaklı
e42b152f16 fix: #9414, use posts:view_deleted 2021-03-21 21:38:08 -04:00
Barış Soner Uşaklı
75553b246c fix: sorting when filtering by uid 2021-03-17 13:14:55 -04:00
Peter Jaszkowiak
23f212a4c0 chore: eslint prefer-destructuring 2021-02-08 18:06:44 -05:00
Peter Jaszkowiak
b56d9e12b5 chore: eslint prefer-arrow-callback 2021-02-08 18:06:44 -05:00
Peter Jaszkowiak
707b55b6a5 chore: eslint prefer-template 2021-02-08 18:06:44 -05:00
Julian Lam
6e2da9966e refactor: move plugin hook methods to plugin.hooks.* 2020-11-20 16:32:39 -05:00
Barış Soner Uşaklı
ef3df47a6d refactor: remove breaking change in pin expiry 2020-11-20 14:05:02 -05:00
Julian Lam
046d0b1637 feat: allow pins to expire (if set) (#8908)
* fix: add back topic assert middleware for pin route

* feat: server-side handling of pin expiries

* refactor: togglePin to not require uid parameter [breaking]

* feat: automatic unpinning if pin has expiration set

* feat: client-side modal for setting pin expiration

* refactor: categories.getPinnedTids to accept multiple cids

... in preparation for pin expiry logic, direct access to *:pinned zsets is discouraged

* fix: remove references to since-removed jobs file for topics

* feat: expire pins when getPinnedTids is called

* refactor: make the togglePin change non-breaking

The 'action:topic.pin' hook now sends uid again, as before. However, if it is a system action (that is, a pin that expired), 'system' will be sent in instead of a valid uid
2020-11-20 11:31:14 -05:00
Barış Soner Uşaklı
a05905f196 performance improvements (#8795)
* perf: nconf/winston/render

cache nconf.get calls
modify middleware.pageView to call next earlier
don't call winston.verbose on every hook see https://github.com/winstonjs/winston/issues/1669
translate header/footer separately and cache results for guests

* fix: copy paste fail

* refactor: style and fire hook only log in dev mode

* fix: cache key, header changes based on template

* perf: change replace

* fix: add missing await

* perf: category

* perf: lodash clone

* perf: remove escapeRegexChars
2020-10-26 10:43:18 -04:00
Barış Soner Uşaklı
bbf6889ecc fix: topic count on category page if filter is author 2020-09-21 22:24:38 -04:00
Barış Soner Uşaklı
69333f59af refactor: remove vars 2019-08-22 21:16:37 -04:00
Barış Soner Uşaklı
f2912e9fe0 fix: pinned tids showing on page > 1 2019-08-22 21:14:18 -04:00
Baris Usakli
8bf40d04c9 fix: #7788, fix on topic move and new post 2019-07-26 14:23:10 -04:00
Barış Soner Uşaklı
fcf3e0770b feat: #7743 categories 2019-07-16 00:41:42 -04:00
Barış Soner Uşaklı
bd640a1107 Topic await errors (#7727)
* feat: derp await

* feat: restore user.getSettings

* feat: cleanup

* feat: make tid const

* feat: cleanup

* fix: tests

* feat: deprecate filter:controllers.topic.get

* feat: rewrite post-index logic

* feat: change calculation to match others

* fix: use .async

* feat: remove try/catch wrapper
2019-07-03 12:48:26 -04:00
Barış Soner Uşaklı
cb51c239f2 feat: remove duped zadds, these are already in topics.onNewPostMade 2019-06-24 23:05:56 -04:00
Barış Soner Uşaklı
198d05875f feat: cleanup, use bulk 2019-06-24 21:36:20 -04:00
Barış Soner Uşaklı
c27be9db5a Recent refactor (#6879)
* wip

* fix inf scroll

* remove duplicated code

* remove dupe code in /unread

* use topicList

* update tag page to use topicList

* fix tests

* combine ifs

* remove more dupe code

* disable timeout
2018-10-27 06:26:50 -04:00
Barış Soner Uşaklı
c738dc7d3e remove some more parseInts 2018-10-22 21:58:34 -04:00
Barış Soner Uşaklı
26d4e0852f use includes instead of indexOf
use _.uniq instead of filter&indexOf
2018-10-20 14:40:48 -04:00
Barış Soner Uşaklı
e8d7a23e2e remove deprecated methods 2018-06-16 05:32:17 -04:00
Barış Soner Uşaklı
2fd2accf8c add tests for top topics
fix popular page displaying 18 topics per page
2018-06-15 15:23:30 -04:00
Julian Lam
bfee23adee basic methods and initial integration for #6463 2018-04-20 12:20:48 -04:00
Barış Soner Uşaklı
2bf275fe29 #6158 2017-12-10 11:02:48 -05:00
Baris Usakli
5604c62776 use the first set for sorting 2017-11-08 16:32:34 -05:00
Baris Usakli
6778cce265 add new zset 2017-10-30 17:07:51 -04:00
Baris Usakli
72cafd55cf 2 new hooks for changing direction and set name 2017-07-13 16:09:01 -04:00
Barış Soner Uşaklı
e0dc47f883 closes #5779 2017-06-26 16:51:45 -04:00
Baris Usakli
037a0e5239 closes #5742
also fix reverse infinite scroll when sorting is changed
2017-06-06 16:40:32 -04:00
Baris Usakli
1d26fc0d89 closes #5741 2017-06-06 12:55:43 -04:00
Barış Soner Uşaklı
f1b8492164 remove unnecessary checks 2017-05-27 00:30:07 -04:00
Peter Jaszkowiak
c18808fdeb ESlint no-useless-concat, no-mixed-spaces-and-tabs 2017-02-18 14:42:15 -07:00
Peter Jaszkowiak
896c8c7343 ESlint object-curly-spacing 2017-02-18 12:30:49 -07:00
Peter Jaszkowiak
3b0dd2d1ef ESlint padded-blocks 2017-02-18 02:32:24 -07:00
Peter Jaszkowiak
3361a72725 ESlint no-plusplus
and no-empty, space-unary-ops
2017-02-18 01:12:18 -07:00
Peter Jaszkowiak
bc1d70c126 ESlint comma-dangle 2017-02-17 19:31:21 -07:00
Julian Lam
c99321a518 always setting app.previousUrl now, and passing cid into filter:category.topics.get hook 2017-01-13 15:01:14 -05:00
barisusakli
c0a8fd7395 allow multiple tags 2017-01-05 21:14:21 +03:00
Barış Soner Uşaklı
805cacb2af dont add tid to :tids:posts if its pinned 2016-12-21 23:50:06 +03:00
barisusakli
c33d3e874a store pinned topics in new zset
keep pinned topics on top on different sort types
2016-11-25 17:46:29 +03:00
Sergii Paryzhskyi
e515b791da Fix eslint rules (#5117)
* Fix semi linter rule

* Fix semi-spacing linter rule

* Fix no-undef-init linter rule

* Fix space-before-blocks linter rule
2016-10-25 15:34:47 -04:00
HeeL
4a3c31b2dc Fix space-before-function-paren linter rule 2016-10-13 11:43:39 +02:00
HeeL
3fa1c1f927 Fix space-infix-ops linter rule 2016-10-13 11:42:29 +02:00
barisusakli
a6c3be0bb1 store category recent tids for faster retrieval 2016-09-22 18:21:54 +03:00
barisusakli
958fe3e72f closes #3762 2016-09-19 13:08:31 +03:00