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

DiscussionListItem

Extends:

flarum/Component~Component → DiscussionListItem

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

Props

  • discussion
  • params

Member Summary

Public Members
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

attrs(): {"className": *}

public

config(isInitialized: *)

public

Build an item list of info for a discussion listing.

public

init()

public

Mark the discussion as read.

public

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

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

view(): *

Public Members

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 attrs(): {"className": *} source

Return:

{"className": *}

public config(isInitialized: *) source

Params:

NameTypeAttributeDescription
isInitialized *

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 init() source

public markAsRead() source

Mark the discussion as read.

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 showStartPost(): 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 view(): * source

Return:

*