Skip to content

Commit 1f39334

Browse files
committed
fix
1 parent 7b6f25b commit 1f39334

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

apps/app/src/api/ads.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use std::sync::Arc;
33
use std::sync::atomic::{AtomicBool, Ordering};
44
use std::time::{Duration, Instant};
55
use tauri::plugin::TauriPlugin;
6-
use tauri::{Emitter, Manager, PhysicalPosition, PhysicalSize, Runtime};
6+
use tauri::{Manager, PhysicalPosition, PhysicalSize, Runtime};
77
use tauri_plugin_opener::OpenerExt;
88
use theseus::settings;
99
use tokio::sync::RwLock;
@@ -23,6 +23,7 @@ struct ComputedAdsOcclusion {
2323
}
2424

2525
const AD_LINK: &str = "https://modrinth.com/wrapper/app-ads-cookie";
26+
#[cfg(any(windows, target_os = "macos"))]
2627
pub(super) const OCCLUDED_AREA_THRESHOLD: f64 = 1.0;
2728
#[cfg(not(target_os = "linux"))]
2829
const ADS_USER_AGENT: &str = concat!(
@@ -141,7 +142,8 @@ fn notify_ads_occlusion<R: Runtime>(
141142
app: &tauri::AppHandle<R>,
142143
message: String,
143144
) {
144-
let _ = app.emit(
145+
let _ = tauri::Emitter::emit(
146+
app,
145147
"warning",
146148
serde_json::json!({
147149
"message": message,

0 commit comments

Comments
 (0)