Skip to content

Can not clear tray title on macOS #322

@Tommatheussen

Description

@Tommatheussen

The set_title function accepts Option as a parameter. Using None should clear the tray title, right now this is being ignored. Only sending and empty string clears the title.

Original code (not working):

// function returns Option<String> 
let title = format_now_playing(now_playing)
tray.set_title(title.as_deref());

Current workaround:

// function returns Option<String> 
let title = format_now_playing(now_playing)
tray.set_title(Some(title.as_deref().unwrap_or("")));

Original discussion post: https://github.com/orgs/tauri-apps/discussions/15445

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions