Documentation
¶
Index ¶
- type AddOptimisticRantMsg
- type AddOptimisticReplyMsg
- type BlockResultMsg
- type BlockUserMsg
- type BlockedUsersLoadedMsg
- type DeleteOptimisticRantMsg
- type DeleteRantMsg
- type DeleteResultMsg
- type EditProfileMsg
- type EditRantMsg
- type FeedPrefsChangedMsg
- type FollowToggleMsg
- type FollowToggleResultMsg
- type HideAuthorPostsMsg
- type LikeRantMsg
- type LikeResultMsg
- type MediaPreviewLoadedMsg
- type Model
- func (m Model) Init() tea.Cmd
- func (m Model) IsDialogOpen() bool
- func (m Model) IsInDetailView() bool
- func (m Model) Rants() []domain.Rant
- func (m Model) Refresh() tea.Cmd
- func (m Model) SelectedRant() (domain.Rant, bool)
- func (m Model) Update(msg tea.Msg) (Model, tea.Cmd)
- func (m Model) View() string
- type OpenDetailWithoutRepliesMsg
- type OpenProfileMsg
- type PrefsSavedMsg
- type ProfileLoadedMsg
- type RantItem
- type RantStatus
- type RantsErrorMsg
- type RantsLoadedMsg
- type RantsPageErrorMsg
- type RantsPageLoadedMsg
- type RelationshipsLoadedMsg
- type ReplyRantMsg
- type RequestBlockedUsersMsg
- type ResetFeedStateMsg
- type ResultMsg
- type SwitchToTerminalRantMsg
- type ThreadErrorMsg
- type ThreadLoadedMsg
- type UnblockResultMsg
- type UnblockUserMsg
- type UpdateOptimisticRantMsg
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddOptimisticRantMsg ¶
type AddOptimisticRantMsg struct {
Content string
}
type AddOptimisticReplyMsg ¶
type BlockResultMsg ¶
type BlockUserMsg ¶
type BlockedUsersLoadedMsg ¶
type BlockedUsersLoadedMsg struct {
Users []app.BlockedUser
Err error
}
type DeleteOptimisticRantMsg ¶
type DeleteOptimisticRantMsg struct {
ID string
}
type DeleteRantMsg ¶
type DeleteRantMsg struct {
ID string
}
type DeleteResultMsg ¶
DeleteResultMsg is sent after a rant deletion attempt.
type EditProfileMsg ¶ added in v0.4.0
type EditProfileMsg struct {
UseInline bool
}
type EditRantMsg ¶
EditRantMsg is sent when the user selects 'Edit' from the action menu.
type FeedPrefsChangedMsg ¶
type FollowToggleMsg ¶
type FollowToggleResultMsg ¶
type HideAuthorPostsMsg ¶
type HideAuthorPostsMsg struct {
AccountID string
}
type LikeRantMsg ¶
LikeRantMsg is sent when the user wants to like a rant.
type LikeResultMsg ¶
LikeResultMsg is sent after a like attempt.
type MediaPreviewLoadedMsg ¶
type Model ¶
type Model struct {
// contains filtered or unexported fields
}
Model holds the state for the feed (timeline) view.
func New ¶
func New(timeline app.TimelineService, account app.AccountService, hashtag, initialSource string) Model
New creates a feed model with injected dependencies.
func (Model) IsDialogOpen ¶
IsDialogOpen reports whether a modal/overlay should capture quit/back keys.
func (Model) IsInDetailView ¶
IsInDetailView returns true if the detail view is active.
func (Model) SelectedRant ¶
SelectedRant returns the currently highlighted rant, if any.
type OpenDetailWithoutRepliesMsg ¶
type OpenDetailWithoutRepliesMsg struct {
ID string
}
type OpenProfileMsg ¶
type OpenProfileMsg struct {
AccountID string
}
type PrefsSavedMsg ¶
type PrefsSavedMsg struct {
Err error
}
type ProfileLoadedMsg ¶
type RantItem ¶
type RantItem struct {
Rant domain.Rant
Status RantStatus
Err error
OldContent string // For rollback
}
type RantStatus ¶
type RantStatus int
const ( StatusNormal RantStatus = iota StatusPendingCreate StatusPendingUpdate StatusPendingDelete StatusFailed )
type RantsErrorMsg ¶
RantsErrorMsg is sent when the timeline fetch fails.
type RantsLoadedMsg ¶
RantsLoadedMsg is sent when the timeline fetch completes successfully.
type RantsPageErrorMsg ¶
RantsPageErrorMsg is sent when loading an older feed page fails.
type RantsPageLoadedMsg ¶
RantsPageLoadedMsg is sent when an older feed page is loaded.
type RelationshipsLoadedMsg ¶
type ReplyRantMsg ¶
ReplyRantMsg is sent when the user wants to reply to a rant.
type RequestBlockedUsersMsg ¶
type RequestBlockedUsersMsg struct{}
type ResetFeedStateMsg ¶
type ResetFeedStateMsg struct {
ForceReset bool
}
type ResultMsg ¶
type ResultMsg struct {
ID string // Local or Server ID
Rant domain.Rant
IsEdit bool
Err error
OldContent string
}
ResultMsg is a generic success/fail result for creation or update.
type SwitchToTerminalRantMsg ¶ added in v0.4.0
type SwitchToTerminalRantMsg struct{}
type ThreadErrorMsg ¶
ThreadErrorMsg is sent when a thread fetch fails.
type ThreadLoadedMsg ¶
ThreadLoadedMsg is sent when a thread (ancestors and replies) is loaded.