Skip to content

Commit

Permalink
fix: addres pr feedback for read icon
Browse files Browse the repository at this point in the history
  • Loading branch information
coolsloth55 committed Jan 6, 2025
1 parent 7772d60 commit 358fd60
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
3 changes: 1 addition & 2 deletions internal/commands/commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -292,9 +292,8 @@ func glamouriseItem(item store.Item, theme config.Theme) (string, error) {
var mdown string

title := item.Title
// check mark indication post has been read
if item.Read() {
title = fmt.Sprintf("\u2713 - %s", item.Title)
title = fmt.Sprintf("%s - %s", item.Title, theme.ReadIcon)
}

mdown += "# " + title
Expand Down
6 changes: 6 additions & 0 deletions internal/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ type Theme struct {
TitleColor string `yaml:"titleColor,omitempty"`
FilterColor string `yaml:"filterColor,omitempty"`
SelectedItemColor string `yaml:"selectedItemColor,omitempty"`
ReadIcon string `yaml:"readIcon,omitempty"`
}

// need to add to Load() below if loading from config file
Expand Down Expand Up @@ -111,6 +112,7 @@ func New(configPath string, pager string, previewFeeds []string, version string)
SelectedItemColor: "170",
TitleColor: "62",
FilterColor: "62",
ReadIcon: "\u2713",
},
Ordering: constants.DefaultOrdering,
HTTPOptions: &HTTPOptions{
Expand Down Expand Up @@ -157,6 +159,10 @@ func (c *Config) Load() error {
c.Ordering = fileConfig.Ordering
}

if len(fileConfig.Theme.ReadIcon) > 0 {
c.Theme.ReadIcon = fileConfig.Theme.ReadIcon
}

if fileConfig.Theme.Glamour != "" {
c.Theme.Glamour = fileConfig.Theme.Glamour
}
Expand Down

0 comments on commit 358fd60

Please sign in to comment.