Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 15 additions & 10 deletions src/settings_ui.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1183,17 +1183,22 @@ fn insert_at_cursor(ctx: &egui::Context, id: egui::Id, text: &mut String, token:

/// Whether `msg` is about a permission snapr is missing, which
/// [`permission_card`] explains.
#[cfg(target_os = "macos")]
pub(crate) fn is_missing_permission(msg: &str) -> bool {
#[cfg(target_os = "macos")]
if crate::macos::missing_permission(msg).is_some() {
return true;
}
#[cfg(target_os = "linux")]
if msg.ends_with(crate::portal::SCREENSHOTS_OFF) {
return true;
}
#[cfg(windows)]
let _ = msg;
crate::macos::missing_permission(msg).is_some()
}

/// Whether `msg` is about a permission snapr is missing, which
/// [`permission_card`] explains.
#[cfg(target_os = "linux")]
pub(crate) fn is_missing_permission(msg: &str) -> bool {
msg.ends_with(crate::portal::SCREENSHOTS_OFF)
}

/// Whether `msg` is about a permission snapr is missing, which
/// [`permission_card`] explains. Windows has none of these.
#[cfg(windows)]
pub(crate) fn is_missing_permission(_msg: &str) -> bool {
false
}

Expand Down
Loading