     }
   end
 
-  # TODO: n+1 query! Refactor using eager loading of unread_entries association instead
-  defp unread?(entry, current_user) do
-    unread_entries = UnreadEntry |> UnreadEntry.for_entry(entry.id) |> UnreadEntry.for_user(current_user.id) |> Repo.all
-    Enum.any?(unread_entries, fn(e) -> e.entry_id == entry.id end)
-  end
-
 end

          summary: entry.summary,
          content: entry.content,
          url: entry.url,
          unread: unread?(entry, current_user),
          feed: %{
            id: entry.feed.id,
            title: entry.feed.title

      summary: entry.summary,
      content: entry.content,
      url: entry.url,
      unread: false,
      feed: %{
        id: entry.feed.id,
        title: entry.feed.title
