Reference Source
import DiscussionListItem from 'flarum/forum/components/DiscussionListItem'
public class | source

DiscussionListItem

Extends:

src/common/Component.js~Component → DiscussionListItem

The DiscussionListItem component shows a single discussion in the discussion list.

Attrs

  • discussion
  • params

Member Summary

Public Members
public
public

Set up a subtree retainer so that the discussion will not be redrawn unless new data comes in.

Method Summary

Public Methods
public

Determine whether or not the discussion is currently being viewed.

public

elementAttrs(): {"className": *}

public

Build an item list of info for a discussion listing.

public

Mark the discussion as read.

public

onbeforeupdate(vnode: *, old: *): *

public

oncreate(vnode: *)

public

oninit(vnode: *)

public

Determine whether or not information about who started the discussion should be displayed instead of information about the most recent reply to the discussion.

public

Determine whether or not the number of replies should be shown instead of the number of unread posts.

public

view(): *

Public Members

public highlightRegExp: * source

public subtree: SubtreeRetainer source

Set up a subtree retainer so that the discussion will not be redrawn unless new data comes in.

Public Methods

public active(): Boolean source

Determine whether or not the discussion is currently being viewed.

Return:

Boolean

public elementAttrs(): {"className": *} source

Return:

{"className": *}

public infoItems(): ItemList source

Build an item list of info for a discussion listing. By default this is just the first/last post indicator.

Return:

ItemList

public markAsRead() source

Mark the discussion as read.

public onbeforeupdate(vnode: *, old: *): * source

Params:

NameTypeAttributeDescription
vnode *
old *

Return:

*

public oncreate(vnode: *) source

Params:

NameTypeAttributeDescription
vnode *

public oninit(vnode: *) source

Params:

NameTypeAttributeDescription
vnode *

public showFirstPost(): Boolean source

Determine whether or not information about who started the discussion should be displayed instead of information about the most recent reply to the discussion.

Return:

Boolean

public showRepliesCount(): Boolean source

Determine whether or not the number of replies should be shown instead of the number of unread posts.

Return:

Boolean

public view(): * source

Return:

*