Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tabs still change color for join/part even if /ignore is enabled #291

Closed
trevarj opened this issue Dec 23, 2020 · 1 comment · Fixed by #293
Closed

Tabs still change color for join/part even if /ignore is enabled #291

trevarj opened this issue Dec 23, 2020 · 1 comment · Fixed by #293
Labels

Comments

@trevarj
Copy link
Contributor

trevarj commented Dec 23, 2020

Problem: when /ignore is enabled, tabs should not change color on the joining or parting of a user

This is my fault, I think. When I added the JoinOrPart tab style I didn't check this scenario.

It comes from these two identical lines in conn.rs :

ui.set_tab_style(TabStyle::JoinOrPart, &MsgTarget::Chan { serv, chan: &chan })

Doesn't look like there's a way to get the ignore from there without adding another function on ui, so you could probably change it here in tui.rs:

    pub(crate) fn set_tab_style(&mut self, style: TabStyle, target: &MsgTarget) {
        self.apply_to_target(target, &|tab: &mut Tab, is_active: bool| {
            if !is_active && tab.style < style {
                tab.set_style(style);
            }
        });
    }
@osa1 osa1 added the bug label Dec 23, 2020
@osa1
Copy link
Owner

osa1 commented Dec 23, 2020

Good catch @trevarj . I think you're right that set_tab_style is where we fix this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants