Skip to content
This repository has been archived by the owner on Dec 6, 2024. It is now read-only.

Commit

Permalink
define standard values for pocketModel
Browse files Browse the repository at this point in the history
  • Loading branch information
JuanJakobo committed Jul 25, 2022
1 parent 60fd226 commit dd1f7b6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/api/pocketModel.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ struct PocketItem : Entry
std::string url;
std::string excerpt;
std::string path;
int reading_time; //in min
bool starred;
int reading_time = 0; //in min
bool starred = false;
PIsDownloaded downloaded = PIsDownloaded::PNOTDOWNLOADED;
};

Expand Down
1 change: 1 addition & 0 deletions src/ui/pocketViewEntry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ void PocketViewEntry::draw(const ifont *entryFont, const ifont *entryFontBold, i
else
textLeft = "archived";
DrawTextRect(_position.x, _position.y + heightOfTitle, _position.w, fontHeight, textLeft.c_str(), ALIGN_RIGHT);

if (_entry.reading_time > 0)
DrawTextRect(_position.x, _position.y + heightOfTitle + fontHeight, _position.w, fontHeight, (std::to_string(_entry.reading_time) + " min").c_str(), ALIGN_RIGHT);

Expand Down

0 comments on commit dd1f7b6

Please sign in to comment.