From f647ab67d377bff31c024c36b15f75a6a1bea4e0 Mon Sep 17 00:00:00 2001 From: AHQ Miness Date: Mon, 4 Nov 2024 19:14:26 +0530 Subject: [PATCH] fix: Fix typos with the code that somehow crept into the pr --- src/event_loop.rs | 4 ++-- src/platform_impl/linux/event_loop.rs | 3 ++- src/platform_impl/macos/badge.rs | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/event_loop.rs b/src/event_loop.rs index cc4dc5055..c4127c9fa 100644 --- a/src/event_loop.rs +++ b/src/event_loop.rs @@ -309,9 +309,9 @@ impl EventLoopWindowTarget { /// - **Linux:** Only supported desktop environments with `libunity` (e.g. GNOME). /// - **iOS / Android:** Unsupported. #[inline] - pub fn set_badge_count(&self, _badge: Option, _desktop_filename: Option) { + pub fn set_badge_count(&self, _count: Option, _desktop_filename: Option) { #[cfg(any(target_os = "linux", target_os = "macos"))] - self.p.set_bage_count(_progress, _desktop_filename) + self.p.set_badge_count(_badge, _desktop_filename) } /// Sets the theme for the application. diff --git a/src/platform_impl/linux/event_loop.rs b/src/platform_impl/linux/event_loop.rs index 350acb8f9..ba79a5d1b 100644 --- a/src/platform_impl/linux/event_loop.rs +++ b/src/platform_impl/linux/event_loop.rs @@ -271,7 +271,7 @@ impl EventLoop { None }; - let mut taskbar = TaskbarIndicator::new(); + let taskbar = TaskbarIndicator::new(); let is_wayland = window_target.is_wayland(); // Window Request @@ -442,6 +442,7 @@ impl EventLoop { }; } WindowRequest::ProgressBarState(_) => unreachable!(), + WindowRequest::BadgeCount(_, _) => unreachable!(), WindowRequest::SetTheme(_) => unreachable!(), WindowRequest::WireUpEvents { transparent, diff --git a/src/platform_impl/macos/badge.rs b/src/platform_impl/macos/badge.rs index 9cb46c0ec..815aeb4b0 100644 --- a/src/platform_impl/macos/badge.rs +++ b/src/platform_impl/macos/badge.rs @@ -1,6 +1,6 @@ use cocoa::{appkit::NSApp, base::nil, foundation::NSString}; -pub fn set_badge_label(&self, label: Option) { +pub fn set_badge_label(label: Option) { unsafe { let label = match label { None => nil,