fix: don't read files if list empty
This commit is contained in:
parent
0b7294d4e4
commit
75fe043e73
2 changed files with 13 additions and 4 deletions
|
|
@ -3840,10 +3840,10 @@ impl Application for App {
|
|||
// Check if clipboard has any paste-able content and cache it
|
||||
return clipboard::read_data::<ClipboardPaste>().map(|contents_opt| {
|
||||
match contents_opt {
|
||||
Some(contents) => cosmic::action::app(Message::ClipboardCached(
|
||||
ClipboardCache::Files(contents),
|
||||
)),
|
||||
None => cosmic::action::app(Message::CheckClipboardImage),
|
||||
Some(contents) if !contents.paths.is_empty() => cosmic::action::app(
|
||||
Message::ClipboardCached(ClipboardCache::Files(contents)),
|
||||
),
|
||||
_ => cosmic::action::app(Message::CheckClipboardImage),
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue