Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ By default, the application creates the `hn-tui.log` log file inside the [user's
- [x] front-page stories like the official site
- [ ] real-time updating
- [x] implement smarter lazy-loading comment functionality
- add crediential support to allow
- add credential support to allow
- [x] authentication
- [x] upvote/downvote
- [ ] add comment
Expand Down
4 changes: 2 additions & 2 deletions hackernews_tui/src/client/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ impl HNClient {
/// Reorder a list of stories to follow the same order as another list of story IDs.
///
/// Needs to do this because stories returned by Algolia APIs are sorted by `points`,
/// reoder those stories to match the list shown up in the HackerNews website,
/// reorder those stories to match the list shown up in the HackerNews website,
/// which has the same order as the list of IDs returned from the official API.
fn reorder_stories_based_on_ids(&self, stories: Vec<Story>, ids: &[u32]) -> Vec<Story> {
let mut stories = stories;
Expand Down Expand Up @@ -326,7 +326,7 @@ impl HNClient {

/// Get a list of stories filtering on a specific tag.
///
/// Depending on the specifed `sort_mode`, stories are retrieved based on
/// Depending on the specified `sort_mode`, stories are retrieved based on
/// the Algolia API or a combination of Algolia API and the Official API.
pub fn get_stories_by_tag(
&self,
Expand Down
2 changes: 1 addition & 1 deletion hackernews_tui/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ fn init_app_dirs() -> (std::path::PathBuf, std::path::PathBuf) {
let home_dir = dirs_next::home_dir().expect("failed to get user's home dir");

// Try to find application's config file in the user's config dir.
// If not found, fallback to use `$HOME/.config` (for backward compability reason)
// If not found, fallback to use `$HOME/.config` (for backward compatibility reason)
if !config_dir.join(DEFAULT_CONFIG_FILE).exists() {
config_dir = home_dir.join(".config");
}
Expand Down
2 changes: 1 addition & 1 deletion hackernews_tui/src/model.rs
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ impl Story {
}

impl HnItem {
/// gets the dispay text of the item, which depends on the item's states
/// gets the display text of the item, which depends on the item's states
/// (e.g `vote_status`, `display_state`, etc)
pub fn text(&self, vote_status: Option<bool>) -> StyledString {
let theme = config::get_config_theme();
Expand Down
2 changes: 1 addition & 1 deletion hackernews_tui/src/parser/article.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ impl Article {
content.replace('\n', &format!("\n{}", args.prefix))
} else {
// Otherwise, consecutive whitespaces are ignored for non-pre elements.
// This is to prevent reader-mode engine from adding unneccesary line wraps/indents in a paragraph.
// This is to prevent reader-mode engine from adding unnecessary line wraps/indents in a paragraph.
WS_RE.replace_all(&content, " ").to_string()
};
let text = decode_html(&text);
Expand Down
4 changes: 2 additions & 2 deletions hackernews_tui/src/view/help_view.rs
Original file line number Diff line number Diff line change
Expand Up @@ -394,11 +394,11 @@ impl HasHelpView for comment_view::CommentView {
vec![
Command::new(
comment_view_keymap.open_article_in_browser.to_string(),
"Open in browser the dicussed article",
"Open in browser the discussed article",
),
Command::new(
comment_view_keymap.open_article_in_article_view.to_string(),
"Open in article view the dicussed article",
"Open in article view the discussed article",
),
Command::new(
comment_view_keymap.open_story_in_browser.to_string(),
Expand Down