Skip to content

Commit

Permalink
feat: error checking
Browse files Browse the repository at this point in the history
  • Loading branch information
isabelroses committed May 27, 2024
1 parent 8541343 commit 883660d
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions cmd/keys.go
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,10 @@ func (m Model) handleKeys(msg tea.KeyMsg) (Model, tea.Cmd) {
lib.ToggleRead(m.feeds, m.feed.ID, m.table.Cursor())
m = m.loadContent(m.feed.ID)
}
m.feeds.WriteTracking()
err := m.feeds.WriteTracking()
if err != nil {
log.Fatalf("Could not write tracking data: %s", err)
}

case key.Matches(msg, m.keys.ReadAll):
switch m.context {
Expand All @@ -197,7 +200,10 @@ func (m Model) handleKeys(msg tea.KeyMsg) (Model, tea.Cmd) {
m = m.loadHome()
}

m.feeds.WriteTracking()
err := m.feeds.WriteTracking()
if err != nil {
log.Fatalf("Could not write tracking data: %s", err)
}
}

return m, nil
Expand Down

0 comments on commit 883660d

Please sign in to comment.