style: apply linter suggestions

This commit is contained in:
Edouard Vanbelle
2026-04-07 22:50:42 +02:00
parent 1ce29c101d
commit a4266a6e93
33 changed files with 444 additions and 437 deletions
+3 -3
View File
@@ -104,7 +104,7 @@ const favorites = {
await this._fetchFromServer();
// Notify user
if (window.ui && window.ui.showNotification) {
if (window.ui?.showNotification) {
window.ui.showNotification(
window.i18n ? window.i18n.t('favorites.added_title') : 'Added to favorites',
`"${name}" ${window.i18n ? window.i18n.t('favorites.added_msg') : 'added to favorites'}`
@@ -139,7 +139,7 @@ const favorites = {
// Remove from local cache
this._cache.delete(this._cacheKey(id, type));
if (window.ui && window.ui.showNotification) {
if (window.ui?.showNotification) {
window.ui.showNotification(
window.i18n ? window.i18n.t('favorites.removed_title') : 'Removed from favorites',
`"${itemName}" ${window.i18n ? window.i18n.t('favorites.removed_msg') : 'removed from favorites'}`
@@ -208,7 +208,7 @@ const favorites = {
if (files.length) window.ui.renderFiles(files);
} catch (error) {
console.error('Error displaying favorites:', error);
if (window.ui && window.ui.showNotification) {
if (window.ui?.showNotification) {
window.ui.showNotification('Error', 'Error loading favorite items');
}
}