mirror of
https://github.com/NotAShelf/stash.git
synced 2026-04-23 18:35:04 +00:00
stash: blocking persistent entries by window class
Signed-off-by: NotAShelf <raf@notashelf.dev> Change-Id: I6a6a6964061bd97b4ffc4e84d835072331a966c6
This commit is contained in:
parent
e5204c4a3a
commit
36c183742d
7 changed files with 483 additions and 19 deletions
|
|
@ -9,6 +9,7 @@ pub trait StoreCommand {
|
|||
max_dedupe_search: u64,
|
||||
max_items: u64,
|
||||
state: Option<String>,
|
||||
excluded_apps: &[String],
|
||||
) -> Result<(), crate::db::StashError>;
|
||||
}
|
||||
|
||||
|
|
@ -19,12 +20,18 @@ impl StoreCommand for SqliteClipboardDb {
|
|||
max_dedupe_search: u64,
|
||||
max_items: u64,
|
||||
state: Option<String>,
|
||||
excluded_apps: &[String],
|
||||
) -> Result<(), crate::db::StashError> {
|
||||
if let Some("sensitive" | "clear") = state.as_deref() {
|
||||
self.delete_last()?;
|
||||
log::info!("Entry deleted");
|
||||
} else {
|
||||
self.store_entry(input, max_dedupe_search, max_items)?;
|
||||
self.store_entry(
|
||||
input,
|
||||
max_dedupe_search,
|
||||
max_items,
|
||||
Some(excluded_apps),
|
||||
)?;
|
||||
log::info!("Entry stored");
|
||||
}
|
||||
Ok(())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue