Class Redwood::ThreadViewMode
In: lib/sup/modes/thread-view-mode.rb
Parent: LineCursorMode

Methods

Included Modules

CanAliasContacts

Classes and Modules

Class Redwood::ThreadViewMode::ChunkLayout
Class Redwood::ThreadViewMode::MessageLayout

Constants

DATE_FORMAT = "%B %e %Y %l:%M%p"
INDENT_SPACES = 2

Public Class methods

there are a couple important instance variables we hold to format the thread and to provide line-based functionality. @layout is a map from Messages to MessageLayouts, and @chunk_layout from Chunks to ChunkLayouts. @message_lines is a map from row s to Message objects. @chunk_lines is a map from row s to Chunk objects. @person_lines is a map from row s to Person objects.

Public Instance methods

called when someone presses enter when the cursor is highlighting a chunk. for expandable chunks (including messages) we toggle open/closed state; for viewable chunks (like attachments) we view.

a little hacky—since regen_text can depend on buffer features like the content_width, we don‘t call it in the constructor, and instead call it here, which is set before we‘re responsible for drawing ourself.

[Validate]