mirror of
https://github.com/flarum/core.git
synced 2025-08-05 07:57:46 +02:00
Make discussion "hidden" state more explicit
Previously a discussion was classified on the front-end as "hidden" if it had zero posts. This was technically a correct statement as the discussion would not be visible to the public... but it also meant that a discussion with zero posts (like one awaiting approval) was impossible for the OP to delete/hide (i.e. indicate that they made a mistake and they don't want the discussion to be approved).
This commit is contained in:
4
js/admin/dist/app.js
vendored
4
js/admin/dist/app.js
vendored
@@ -21583,8 +21583,8 @@ System.register('flarum/models/Discussion', ['flarum/Model', 'flarum/utils/compu
|
||||
|
||||
hideTime: Model.attribute('hideTime', Model.transformDate),
|
||||
hideUser: Model.hasOne('hideUser'),
|
||||
isHidden: computed('hideTime', 'commentsCount', function (hideTime, commentsCount) {
|
||||
return !!hideTime || commentsCount === 0;
|
||||
isHidden: computed('hideTime', function (hideTime) {
|
||||
return !!hideTime;
|
||||
}),
|
||||
|
||||
canReply: Model.attribute('canReply'),
|
||||
|
Reference in New Issue
Block a user