Skip to content

Commit 07dd3af

Browse files
committed
fixes: stuff
1 parent ae750d6 commit 07dd3af

File tree

1 file changed

+11
-2
lines changed
  • plugins/notification/src

1 file changed

+11
-2
lines changed

plugins/notification/src/ext.rs

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,17 @@ impl<R: tauri::Runtime, T: tauri::Manager<R>> NotificationPluginExt<R> for T {
143143

144144
// Process mic detection signal
145145
let signal = crate::meeting_detection::MeetingSignal::MicrophoneActive;
146+
let score = meeting_detector.process_signal(signal);
146147

147-
if let Some(score) = meeting_detector.process_signal(signal) {
148+
handle_meeting_notification(score, auto_record_enabled, &bundle_id);
149+
});
150+
151+
fn handle_meeting_notification(
152+
score: Option<crate::meeting_detection::MeetingScore>,
153+
auto_record_enabled: bool,
154+
bundle_id: &str,
155+
) {
156+
if let Some(score) = score {
148157
// Auto-recording was triggered
149158
let notif = hypr_notification2::Notification {
150159
title: "Meeting detected".to_string(),
@@ -181,7 +190,7 @@ impl<R: tauri::Runtime, T: tauri::Manager<R>> NotificationPluginExt<R> for T {
181190
bundle_id,
182191
auto_record_enabled
183192
);
184-
});
193+
}
185194

186195
{
187196
let mut guard = state.lock().unwrap();

0 commit comments

Comments
 (0)