Skip to content

Conversation

@Kuehnelt
Copy link
Contributor

I noticed that the categories filter was hardcoded (see code below) to only include 'science,' 'tech,' and 'news,' ignoring any user-created categories. I have changed the logic to use the categories created by the user instead. I also had to make some changes to related functions to ensure everything loads correctly.

                KeyCode::Char('c') => {
                    // Toggle category filter
                    if app.filter_options.category.is_none() {
                        // Cycle through available categories (tech, news, etc.)
                        app.filter_options.category = Some("tech".to_string());
                    } else if app.filter_options.category.as_deref() == Some("tech") {
                        app.filter_options.category = Some("news".to_string());
                    } else if app.filter_options.category.as_deref() == Some("news") {
                        app.filter_options.category = Some("science".to_string());
                    } else {
                        app.filter_options.category = None;
                    }
                    app.apply_filters();
                }

@bahdotsh
Copy link
Owner

bahdotsh commented Nov 6, 2025

@Kuehnelt please format the code using cargo fmt to fix the issues!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants