Fixed UnreadContainer's comment
Prior to this commit, UnreadContainer's comments mentioned deprecated SetUnread and such methods. It now reflects the new API.
This commit is contained in:
parent
99f7224d32
commit
dd4e230e0f
7
cchat.go
7
cchat.go
|
@ -782,10 +782,9 @@ type TypingIndicator interface {
|
|||
// button or a tree node) can implement if it's capable of indicating the read
|
||||
// and mentioned status for that channel.
|
||||
//
|
||||
// Server containers that implement this has to implement both SetUnread and
|
||||
// SetMentioned, and they should also represent those statuses differently. For
|
||||
// example, a mentioned channel could have a red outline, while an unread
|
||||
// channel could appear brighter.
|
||||
// Server containers that implement this has to represent unread and mentioned
|
||||
// differently. For example, a mentioned channel could have a red outline, while
|
||||
// an unread channel could appear brighter.
|
||||
//
|
||||
// Server containers are expected to represent this information in their parent
|
||||
// nodes as well. For example, if a server is unread, then its parent servers as
|
||||
|
|
|
@ -1465,10 +1465,9 @@ var Main = Packages{
|
|||
(such as a button or a tree node) can implement if it's capable
|
||||
of indicating the read and mentioned status for that channel.
|
||||
|
||||
Server containers that implement this has to implement both
|
||||
SetUnread and SetMentioned, and they should also represent those
|
||||
statuses differently. For example, a mentioned channel could
|
||||
have a red outline, while an unread channel could appear
|
||||
Server containers that implement this has to represent unread
|
||||
and mentioned differently. For example, a mentioned channel
|
||||
could have a red outline, while an unread channel could appear
|
||||
brighter.
|
||||
|
||||
Server containers are expected to represent this information in
|
||||
|
|
|
@ -9,6 +9,33 @@ import (
|
|||
"github.com/diamondburned/cchat/text"
|
||||
)
|
||||
|
||||
// TextSegment provides no-op asserters for cchat.TextSegment.
|
||||
type TextSegment struct{}
|
||||
|
||||
// AsColorer returns nil.
|
||||
func (TextSegment) AsColorer() text.Colorer { return nil }
|
||||
|
||||
// AsLinker returns nil.
|
||||
func (TextSegment) AsLinker() text.Linker { return nil }
|
||||
|
||||
// AsImager returns nil.
|
||||
func (TextSegment) AsImager() text.Imager { return nil }
|
||||
|
||||
// AsAvatarer returns nil.
|
||||
func (TextSegment) AsAvatarer() text.Avatarer { return nil }
|
||||
|
||||
// AsMentioner returns nil.
|
||||
func (TextSegment) AsMentioner() text.Mentioner { return nil }
|
||||
|
||||
// AsAttributor returns nil.
|
||||
func (TextSegment) AsAttributor() text.Attributor { return nil }
|
||||
|
||||
// AsCodeblocker returns nil.
|
||||
func (TextSegment) AsCodeblocker() text.Codeblocker { return nil }
|
||||
|
||||
// AsQuoteblocker returns nil.
|
||||
func (TextSegment) AsQuoteblocker() text.Quoteblocker { return nil }
|
||||
|
||||
// Namer provides no-op asserters for cchat.Namer.
|
||||
type Namer struct{}
|
||||
|
||||
|
@ -113,30 +140,3 @@ func (SendableMessage) AsNoncer() cchat.Noncer { return nil }
|
|||
|
||||
// AsAttachments returns nil.
|
||||
func (SendableMessage) AsAttachments() cchat.Attachments { return nil }
|
||||
|
||||
// TextSegment provides no-op asserters for cchat.TextSegment.
|
||||
type TextSegment struct{}
|
||||
|
||||
// AsColorer returns nil.
|
||||
func (TextSegment) AsColorer() text.Colorer { return nil }
|
||||
|
||||
// AsLinker returns nil.
|
||||
func (TextSegment) AsLinker() text.Linker { return nil }
|
||||
|
||||
// AsImager returns nil.
|
||||
func (TextSegment) AsImager() text.Imager { return nil }
|
||||
|
||||
// AsAvatarer returns nil.
|
||||
func (TextSegment) AsAvatarer() text.Avatarer { return nil }
|
||||
|
||||
// AsMentioner returns nil.
|
||||
func (TextSegment) AsMentioner() text.Mentioner { return nil }
|
||||
|
||||
// AsAttributor returns nil.
|
||||
func (TextSegment) AsAttributor() text.Attributor { return nil }
|
||||
|
||||
// AsCodeblocker returns nil.
|
||||
func (TextSegment) AsCodeblocker() text.Codeblocker { return nil }
|
||||
|
||||
// AsQuoteblocker returns nil.
|
||||
func (TextSegment) AsQuoteblocker() text.Quoteblocker { return nil }
|
||||
|
|
Loading…
Reference in New Issue