implement clipboard history filtering based on text length limits

This commit is contained in:
segemun 2025-01-15 11:21:59 +01:00
parent 93440fe841
commit 2b83bb9e18
19 changed files with 187 additions and 14 deletions

View File

@ -134,8 +134,11 @@ Make Enabled: Make Enabled
Make Inactive: Make Inactive
Manage: Manage
Maximum height: Maximum height
Maximum length: Maximum length
Maximum width: Maximum width
Menu: Menu
Minimum length: Minimum length
Minimum text length: Minimum text length
Move Down: Move Down
Move Up: Move Up
Multi Select: Multi Select

View File

@ -35,6 +35,7 @@ Change the application user interface font size scale: Change the application us
Change the application user interface language: Change the application user interface language
Clip Notes Popup Maximum Dimensions: Clip Notes Popup Maximum Dimensions
Clipboard History Settings: Clipboard History Settings
Clipboard History Text Length Limits: Clipboard History Text Length Limits
'Complete details:': 'Complete details:'
Configure settings to automatically delete clipboard history items after a specified duration.: Configure settings to automatically delete clipboard history items after a specified duration.
Create a preview card on link hover in the clipboard history. This allows you to preview the link before opening or pasting it.: Create a preview card on link hover in the clipboard history. This allows you to preview the link before opening or pasting it.
@ -157,6 +158,8 @@ Thank you again for using PasteBar.: Thank you again for using PasteBar.
Thank you for testing! 🙌: Thank you for testing! 🙌
? This option lets you control the display and timing of hover notes on clips. You can choose to show notes instantly or with a delay to prevent unintended popups.
: This option lets you control the display and timing of hover notes on clips. You can choose to show notes instantly or with a delay to prevent unintended popups.
? This option lets you customize the limits for the length of text stored in the clipboard history. Setting the value to 0 makes it unlimited.
: This option lets you customize the limits for the length of text stored in the clipboard history. Setting the value to 0 makes it unlimited.
? This option lets you customize the maximum width and height of the popup that displays clip notes, ensuring it fits comfortably within your desired size.
: This option lets you customize the maximum width and height of the popup that displays clip notes, ensuring it fits comfortably within your desired size.
To downgrade your current version, please visit: To downgrade your current version, please visit

View File

@ -134,8 +134,11 @@ Make Enabled: Hacer Habilitado
Make Inactive: Hacer Inactivo
Manage: Gestionar
Maximum height: Altura máxima
Maximum length: Longitud máxima
Maximum width: Ancho máximo
Menu: Menú
Minimum length: Longitud mínima
Minimum text length: Longitud mínima del texto
Move Down: Mover Abajo
Move Up: Mover Arriba
Multi Select: Selección Múltiple

View File

@ -35,6 +35,7 @@ Change the application user interface font size scale: Cambiar la escala de tama
Change the application user interface language: Cambiar el idioma de la interfaz de usuario
Clip Notes Popup Maximum Dimensions: Dimensiones Máximas de Ventana Emergente de Notas
Clipboard History Settings: Ajustes del Historial del Portapapeles
Clipboard History Text Length Limits: Límites de Longitud del Texto del Historial del Portapapeles
'Complete details:': 'Detalles completos:'
Configure settings to automatically delete clipboard history items after a specified duration.: Configura ajustes para borrar automáticamente elementos del historial después de un tiempo específico.
Create a preview card on link hover in the clipboard history. This allows you to preview the link before opening or pasting it.: Crea una tarjeta de vista previa al pasar sobre enlaces en el historial. Esto te permite previsualizar el enlace antes de abrirlo o pegarlo.
@ -154,6 +155,8 @@ Thank you again for using PasteBar.: Gracias de nuevo por usar PasteBar.
Thank you for testing! 🙌: ¡Gracias por probar! 🙌
? This option lets you control the display and timing of hover notes on clips. You can choose to show notes instantly or with a delay to prevent unintended popups.
: Esta opción te permite controlar la visualización y el tiempo de las notas emergentes en los clips. Puedes elegir mostrar notas instantáneamente o con un retraso para evitar ventanas emergentes no deseadas.
? This option lets you customize the limits for the length of text stored in the clipboard history. Setting the value to 0 makes it unlimited.
: Esta opción te permite personalizar los límites para la longitud del texto almacenado en el historial del portapapeles. Establecer el valor en 0 lo hace ilimitado.
? This option lets you customize the maximum width and height of the popup that displays clip notes, ensuring it fits comfortably within your desired size.
: Esta opción te permite personalizar el ancho y alto máximos de la ventana emergente que muestra las notas de los clips, asegurando que se ajuste cómodamente dentro del tamaño deseado.
To downgrade your current version, please visit: Para degradar tu versión actual, por favor visita

View File

@ -135,7 +135,10 @@ Make Inactive: Rendre inactif
Manage: Gérer
Maximum height: Hauteur maximale
Maximum width: Largeur maximale
Maximum length: Longitud máxima
Menu: Menu
Minimum length: Longitud mínima
Minimum text length: Longueur minimale du texte
Move Down: Déplacer vers le bas
Move Up: Déplacer vers le haut
Multi Select: Sélection multiple

View File

@ -35,6 +35,7 @@ Change the application user interface font size scale: Changer l'échelle de tai
Change the application user interface language: Changer la langue de l'interface utilisateur
Clip Notes Popup Maximum Dimensions: Dimensions popup notes clip maximales
Clipboard History Settings: Paramètres de l'historique du presse-papier
Clipboard History Text Length Limits: Limites de longueur du texte de l'historique du presse-papiers
'Complete details:': 'Détails complets :'
Configure settings to automatically delete clipboard history items after a specified duration.: Configurez les paramètres pour supprimer automatiquement les éléments de l'historique du presse-papiers après une durée spécifiée.
Create a preview card on link hover in the clipboard history. This allows you to preview the link before opening or pasting it.: Créer une carte de prévisualisation au survol d'un lien dans l'historique du presse-papiers. Cela vous permet de prévisualiser le lien avant de l'ouvrir ou de le coller. de l'ouvrir ou de le coller.
@ -157,6 +158,8 @@ Thank you again for using PasteBar.: Merci encore d'utiliser PasteBar.
Thank you for testing! 🙌: Merci pour le test ! 🙌
? This option lets you control the display and timing of hover notes on clips. You can choose to show notes instantly or with a delay to prevent unintended popups.
: Cette option vous permet de contrôler l'affichage et la durée des notes au survol des clips. Vous pouvez choisir d'afficher les notes instantanément ou avec un délai pour éviter les popups involontaires.
? This option lets you customize the limits for the length of text stored in the clipboard history. Setting the value to 0 makes it unlimited.
: Cette option vous permet de personnaliser les limites de la longueur du texte stocké dans l'historique du presse-papiers. Définir la valeur à 0 la rend illimitée.
? This option lets you customize the maximum width and height of the popup that displays clip notes, ensuring it fits comfortably within your desired size.
: Cette option vous permet de personnaliser la largeur et la hauteur maximales de la fenêtre contextuelle qui affiche les notes de clip, afin qu'elle s'adapte confortablement à la taille souhaitée.
To downgrade your current version, please visit: Pour rétrograder votre version actuelle, visitez

View File

@ -127,8 +127,11 @@ Make Enabled: Rendi Abilitato
Make Inactive: Rendi Inattivo
Manage: Gestisci
Maximum height: Altezza massima
Maximum length: Lunghezza massima
Maximum width: Larghezza massima
Menu: Menu
Minimum length: Lunghezza minima
Minimum text length: Lunghezza minima del testo
Move Down: Sposta Giù
Move Up: Sposta Su
Multi Select: Selezione Multipla

View File

@ -34,6 +34,7 @@ Change the application user interface font size scale: Cambia la scala della dim
Change the application user interface language: Cambia la lingua dell'interfaccia utente
Clip Notes Popup Maximum Dimensions: Dimensioni Massime del Popup delle Note dei Clip
Clipboard History Settings: Impostazioni della Cronologia degli Appunti
Clipboard History Text Length Limits: Limiti di Lunghezza del Testo della Cronologia degli Appunti
'Complete details:': 'Dettagli completi:'
Configure settings to automatically delete clipboard history items after a specified duration.: Configura le impostazioni per eliminare automaticamente gli elementi della cronologia degli appunti dopo una durata specificata.
Create a preview card on link hover in the clipboard history. This allows you to preview the link before opening or pasting it.: Crea una scheda di anteprima al passaggio del mouse sul link nella cronologia degli appunti. Questo ti permette di visualizzare l'anteprima del link prima di aprirlo o incollarlo.
@ -156,6 +157,8 @@ Thank you again for using PasteBar.: Grazie ancora per utilizzare PasteBar.
Thank you for testing! 🙌: Grazie per il test! 🙌
? This option lets you control the display and timing of hover notes on clips. You can choose to show notes instantly or with a delay to prevent unintended popups.
: Questa opzione ti permette di controllare la visualizzazione e la tempistica delle note al passaggio del mouse sui clip. Puoi scegliere di mostrare le note istantaneamente o con un ritardo per prevenire popup indesiderati.
? This option lets you customize the limits for the length of text stored in the clipboard history. Setting the value to 0 makes it unlimited.
: Questa opzione ti permette di personalizzare i limiti per la lunghezza del testo memorizzato nella cronologia degli appunti. Impostare il valore a 0 lo rende illimitato.
? This option lets you customize the maximum width and height of the popup that displays clip notes, ensuring it fits comfortably within your desired size.
: Questa opzione ti permette di personalizzare la larghezza e l'altezza massima del popup che mostra le note dei clip, assicurando che si adatti comodamente alla dimensione desiderata.
To downgrade your current version, please visit: Per tornare a una versione precedente, visita

View File

@ -127,8 +127,11 @@ Make Enabled: Сделать включенным
Make Inactive: Сделать неактивным
Manage: Управление
Maximum height: Высота максимум
Maximum length: Длина максимум
Maximum width: Ширина максимум
Menu: Меню
Minimum length: Длина минимум
Minimum text length: Минимальная длина текста
Move Down: Переместить вниз
Move Up: Переместить вверх
Multi Select: Множественный выбор

View File

@ -35,6 +35,7 @@ Change the application user interface font size scale: Изменить масш
Change the application user interface language: Изменить язык интерфейса приложения
Clip Notes Popup Maximum Dimensions: Максимальные размеры всплывающего окна заметок к клипам
Clipboard History Settings: Настройки истории буфера
Clipboard History Text Length Limits: Ограничения длины текста в истории буфера обмена
'Complete details:': 'Полные детали:'
Configure settings to automatically delete clipboard history items after a specified duration.: Настройте параметры для автоматического удаления элементов истории буфера обмена по истечении указанного времени.
Create a preview card on link hover in the clipboard history. This allows you to preview the link before opening or pasting it.: Создавайте карточку предварительного просмотра при наведении на ссылку в истории буфера обмена. Это позволяет просматривать ссылку перед открытием или вставкой.
@ -142,6 +143,8 @@ Thank you again for using PasteBar.: Спасибо Вам еще раз за и
Thank you for testing! 🙌: Спасибо за тестирование! 🙌
? This option lets you control the display and timing of hover notes on clips. You can choose to show notes instantly or with a delay to prevent unintended popups.
: Эта настройка позволяет управлять отображением и временем задержки всплывающих заметок при наведении на имя клипа. Выберите быстрый показ заметок или с задержкой.
? This option lets you customize the limits for the length of text stored in the clipboard history. Setting the value to 0 makes it unlimited.
: Эта настройка позволяет вам задать ограничения на длину текста, сохраняемого в истории буфера обмена. Установка значения 0 делает его неограниченным.
? This option lets you customize the maximum width and height of the popup that displays clip notes, ensuring it fits comfortably within your desired size.
: Эта настройка дает возможность задать максимальные размеры всплывающего окна с заметками к клипам, чтобы оно лучше соответствовало вашим требованиям.
'To downgrade, please visit: ': 'Чтобы найти предыдущие версии, посетите следующую страницу: '

View File

@ -133,7 +133,10 @@ Make Enabled: Etkin hale getir
Make Inactive: Etkisiz yap
Manage: Yönet
Maximum height: Maksimum yükseklik
Maximum length: Maksimum uzunluk
Maximum width: Maksimum genişlik
Minimum length: Minimum uzunluk
Minimum text length: Minimum metin uzunluğu
Menu: Menü
Move Down: Aşağı kaydır
Move Up: Yukarı kaydır

View File

@ -35,6 +35,7 @@ Change the application user interface font size scale: Uygulama arayüzü yazı
Change the application user interface language: Uygulama arayüzü dilini değiştirin
Clip Notes Popup Maximum Dimensions: Klip Notlarıılır Penceresi Maksimum Boyutla
Clipboard History Settings: Pano Geçmiş Ayarları
Clipboard History Text Length Limits: Panoya Geçmiş Metin Uzunluğu Sınırları
'Complete details:': 'Tüm detaylar:'
Configure settings to automatically delete clipboard history items after a specified duration.: Belirli bir sürenin sonunda panoya kaydedilen geçmiş öğelerinin otomatik olarak silinmesi için ayarları yapılandırın.
Create a preview card on link hover in the clipboard history. This allows you to preview the link before opening or pasting it.: Panonun geçmişinde bağlantı üzerine gelindiğinde önizleme kartı oluşturun. Bu, bağlantıyı açmadan veya yapıştırmadan önce önizlemenizi sağlar.
@ -157,6 +158,8 @@ Thank you again for using PasteBar.: PasteBar'ı kullandığınız için tekrar
Thank you for testing! 🙌: Test ettiğiniz için teşekkür ederiz! 🙌
? This option lets you control the display and timing of hover notes on clips. You can choose to show notes instantly or with a delay to prevent unintended popups.
: Bu seçenek, kliplerdeki gezinme notlarının görüntülenmesini ve zamanlamasını kontrol etmenizi sağlar. Notları anında veya istenmeyen açılır pencereleri önlemek için gecikmeli olarak göstermeyi seçebilirsiniz.
? This option lets you customize the limits for the length of text stored in the clipboard history. Setting the value to 0 makes it unlimited.
: Bu seçenek, panoya kaydedilen metnin uzunluğu için sınırları özelleştirmenize olanak tanır. Değeri 0 olarak ayarlamak, sınırı sınırsız yapar.
? This option lets you customize the maximum width and height of the popup that displays clip notes, ensuring it fits comfortably within your desired size.
: Bu seçenek, klip notlarını görüntüleyen açılır pencerenin maksimum genişliğini ve yüksekliğini özelleştirmenize olanak tanır ve böylece pencerenin istediğiniz boyuta rahatça sığmasını sağlar.
To downgrade your current version, please visit: Mevcut sürümünüzü düşürmek için lütfen şu adresi ziyaret edin

View File

@ -127,8 +127,11 @@ Make Enabled: Зробити увімкненим
Make Inactive: Зробити неактивним
Manage: Керування
Maximum height: Висота максимум
Maximum length: Довжина максимум
Maximum width: Ширина максимум
Menu: Меню
Minimum length: Довжина мінімум
Minimum text length: Мінімальна довжина тексту
Move Down: Перемістити вниз
Move Up: Перемістити вгору
Multi Select: Множинний вибір

View File

@ -35,6 +35,7 @@ Change the application user interface font size scale: Змінити масшт
Change the application user interface language: Змінити мову інтерфейсу додатку
Clip Notes Popup Maximum Dimensions: Максимальні розміри спливаючого вікна нотаток до кліпів
Clipboard History Settings: Налаштування історії буфера обміну
Clipboard History Text Length Limits: Обмеження довжини тексту в історії буфера обміну
'Complete details:': 'Повні деталі:'
Configure settings to automatically delete clipboard history items after a specified duration.: Налаштуйте параметри для автоматичного видалення елементів історії буфера обміну після вказаного часу.
Create a preview card on link hover in the clipboard history. This allows you to preview the link before opening or pasting it.: Створюйте картку попереднього перегляду при наведенні на посилання в історії буфера обміну. Це дозволяє переглядати посилання перед відкриттям або вставкою.
@ -142,6 +143,8 @@ Thank you again for using PasteBar.: Дякуємо Вам ще раз за ви
Thank you for testing! 🙌: Дякуємо за тестування! 🙌
? This option lets you control the display and timing of hover notes on clips. You can choose to show notes instantly or with a delay to prevent unintended popups.
: Це налаштування дозволяє керувати відображенням та часом затримки спливаючих нотаток при наведенні на ім'я кліпу. Виберіть швидкий показ нотаток або з затримкою.
? This option lets you customize the limits for the length of text stored in the clipboard history. Setting the value to 0 makes it unlimited.
: Це налаштування дозволяє налаштувати обмеження на довжину тексту, що зберігається в історії буфера обміну. Встановлення значення 0 робить його необмеженим.
? This option lets you customize the maximum width and height of the popup that displays clip notes, ensuring it fits comfortably within your desired size.
: Це налаштування дає можливість задати максимальні розміри спливаючого вікна з нотатками до кліпів, щоб воно краще відповідало вашим вимогам.
'To downgrade, please visit: ': 'Щоб знайти попередні версії, відвідайте наступну сторінку: '

View File

@ -132,8 +132,11 @@ Make Enabled: 设为启用
Make Inactive: 设为非活动
Manage: 管理
Maximum height: 最大高度
Maximum length: 最大长度
Maximum width: 最大宽度
Menu: 菜单
Minimum length: 最小长度
Minimum text length: 最小文本长度
Move Down: 向下移动
Move Up: 向上移动
Multi Select: 多选

View File

@ -35,6 +35,7 @@ Change the application user interface font size scale: 更改应用程序用户
Change the application user interface language: 更改应用程序用户界面语言
Clip Notes Popup Maximum Dimensions: 剪辑注释弹出窗口最大尺寸
Clipboard History Settings: 剪贴板历史设置
Clipboard History Text Length Limits: 剪贴板历史文本长度限制
'Complete details:': '完整详情:'
Configure settings to automatically delete clipboard history items after a specified duration.: 配置设置以在指定时间后自动删除剪贴板历史项目。
Create a preview card on link hover in the clipboard history. This allows you to preview the link before opening or pasting it.: 在剪贴板历史中悬停链接时创建预览卡片。这允许您在打开或粘贴链接前预览它。
@ -157,6 +158,8 @@ Thank you again for using PasteBar.: 再次感谢您使用 PasteBar。
Thank you for testing! 🙌: 感谢您的测试!🙌
? This option lets you control the display and timing of hover notes on clips. You can choose to show notes instantly or with a delay to prevent unintended popups.
: 此选项让您控制剪辑悬停注释的显示和时间。您可以选择立即显示注释或延迟显示,以防止意外弹出。
? This option lets you customize the limits for the length of text stored in the clipboard history. Setting the value to 0 makes it unlimited.
: 此选项让您自定义存储在剪贴板历史中的文本长度限制。将值设置为 0 表示无限制。
? This option lets you customize the maximum width and height of the popup that displays clip notes, ensuring it fits comfortably within your desired size.
: 此选项让您自定义显示剪辑注释的弹出窗口的最大宽度和高度,确保它舒适地适应您所需的尺寸。
To downgrade your current version, please visit: 要降级您的当前版本,请访问

View File

@ -69,6 +69,10 @@ export default function UserPreferences() {
hotKeysShowHideQuickPasteWindow,
setHotKeysShowHideMainAppWindow,
setHotKeysShowHideQuickPasteWindow,
clipTextMinLength,
clipTextMaxLength,
setClipTextMinLength,
setClipTextMaxLength
} = useAtomValue(settingsStoreAtom)
const { setFontSize, fontSize, setIsSwapPanels, isSwapPanels, returnRoute, isMacOSX } =
@ -995,6 +999,96 @@ export default function UserPreferences() {
</Card>
</Box>
<Box className="max-w-xl mt-4 animate-in fade-in">
<Card>
<CardHeader className="flex flex-row items-center justify-between space-y-0 pb-1">
<CardTitle className="animate-in fade-in text-md font-medium w-full">
{t('Clipboard History Text Length Limits', {
ns: 'settings',
})}
</CardTitle>
</CardHeader>
<CardContent>
<Text className="text-sm text-muted-foreground">
{t(
'This option lets you customize the limits for the length of text stored in the clipboard history. Setting the value to 0 makes it unlimited.',
{
ns: 'settings',
}
)}
</Text>
<Flex className="w-full gap-10 my-4 items-start justify-start">
<InputField
className="text-md !w-36"
type="number"
step="1"
min={0}
error={
false ? t('Invalid number', { ns: 'common' }) : undefined
}
small
label={t('Minimum length', { ns: 'common' })}
value={clipTextMinLength}
onBlur={() => {
if (clipTextMinLength < 0) {
setClipTextMinLength(0)
}
}}
onChange={e => {
const value = e.target.value
if (value === '') {
setClipTextMinLength(0);
} else {
const number = parseInt(value)
setClipTextMinLength(number)
}
}}
/>
<InputField
className="text-md !w-36"
type="number"
step="0"
min={0}
error={
false ? t('Invalid number', { ns: 'common' }) : undefined
}
small
label={t('Maximum length', { ns: 'common' })}
value={clipTextMaxLength}
onBlur={() => {
if (clipTextMaxLength < 0) {
setClipTextMaxLength(0)
}
}}
onChange={e => {
const value = e.target.value
if (value === '') {
setClipTextMaxLength(0);
} else {
const number = parseInt(value)
setClipTextMaxLength(number)
}
}}
/>
</Flex>
<Button
variant="secondary"
size="sm"
disabled={clipTextMinLength === 0 && clipTextMaxLength === 0}
onClick={() => {
setClipTextMinLength(0)
setClipTextMaxLength(0)
}}
className="text-sm bg-slate-200 dark:bg-slate-700 dark:text-slate-200 mt-1"
>
{t('Reset', { ns: 'common' })}
</Button>
</CardContent>
</Card>
</Box>
<Spacer h={6} />
<Link to={returnRoute} replace>
<Button

View File

@ -78,6 +78,8 @@ type Settings = {
screenLockRecoveryPasswordMasked: string | null
isAppLocked: boolean
isScreenLockPassCodeRequireOnStart: boolean
clipTextMinLength: number
clipTextMaxLength: number
}
type Constants = {
@ -161,6 +163,8 @@ export interface SettingsStoreState {
syncStateUpdate: (name: string, value: any) => void
relaunchApp: () => void
initSettings: (settings: Settings) => void
setClipTextMinLength: (width: number) => void
setClipTextMaxLength: (height: number) => void
}
const initialState: SettingsStoreState & Settings = {
@ -219,6 +223,8 @@ const initialState: SettingsStoreState & Settings = {
isAppLocked: false,
isScreenLockPassCodeRequireOnStart: false,
isFirstRunAfterUpdate: false,
clipTextMinLength: 0,
clipTextMaxLength: 0,
CONST: {
APP_DETECT_LANGUAGES_SUPPORTED: [],
},
@ -272,6 +278,8 @@ const initialState: SettingsStoreState & Settings = {
setIsKeepMainWindowClosedOnRestartEnabled: () => {},
setIsHideCollectionsOnNavBar: () => {},
setIsShowNavBarItemsOnHoverOnly: () => {},
setClipTextMinLength: () => {},
setClipTextMaxLength: () => {},
initConstants: () => {},
setAppDataDir: () => {},
updateSetting: () => {},
@ -557,6 +565,12 @@ export const settingsStore = createStore<SettingsStoreState & Settings>()((set,
hotKeysShowHideQuickPasteWindow
)
},
setClipTextMinLength: async (length: number) => {
return get().updateSetting('clipTextMinLength', length)
},
setClipTextMaxLength: async (length: number) => {
return get().updateSetting('clipTextMaxLength', length)
},
isNotTourCompletedOrSkipped: (tourName: string) => {
const { appToursCompletedList, appToursSkippedList } = get()
return (

View File

@ -105,21 +105,38 @@ where
if !text.is_empty() {
let mut is_excluded = false;
if let Some(setting) = settings_map.get("isExclusionListEnabled") {
if let Some(value_bool) = setting.value_bool {
if value_bool {
let exclusion_list: Vec<String> = settings_map
.get("historyExclusionList")
.and_then(|s| s.value_text.as_ref())
.map_or(Vec::new(), |exclusion_list_text| {
exclusion_list_text.lines().map(String::from).collect()
});
is_excluded = text.lines().any(|line| {
exclusion_list
.iter()
.any(|item| line.to_lowercase().contains(&item.to_lowercase()))
});
let text_min_length = settings_map
.get("clipTextMinLength")
.and_then(|s| s.value_int)
.unwrap_or(0) as usize;
let text_max_length = settings_map
.get("clipTextMaxLength")
.and_then(|s| s.value_int)
.unwrap_or(0) as usize;
if text.len() < text_min_length || (text.len() > text_max_length && text_max_length > 0) {
is_excluded = true;
}
if !is_excluded {
if let Some(setting) = settings_map.get("isExclusionListEnabled") {
if let Some(value_bool) = setting.value_bool {
if value_bool {
let exclusion_list: Vec<String> = settings_map
.get("historyExclusionList")
.and_then(|s| s.value_text.as_ref())
.map_or(Vec::new(), |exclusion_list_text| {
exclusion_list_text.lines().map(String::from).collect()
});
is_excluded = text.lines().any(|line| {
exclusion_list
.iter()
.any(|item| line.to_lowercase().contains(&item.to_lowercase()))
});
}
}
}
}