From a774c879d4cf08a76fc404771883807d27465265 Mon Sep 17 00:00:00 2001
From: MCMXC <16797721+mcmxcdev@users.noreply.github.com>
Date: Thu, 7 Dec 2023 22:37:37 -0700
Subject: refactor: code cleanup (#1476)

- auto update `settings.json` due to new vscode version
- replace deprecated `e.keyCode` with `e.key`
- fix various code snippets with sonarlint and other lint plugins
---
 src/containers/settings/EditServiceScreen.tsx | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

(limited to 'src/containers/settings/EditServiceScreen.tsx')

diff --git a/src/containers/settings/EditServiceScreen.tsx b/src/containers/settings/EditServiceScreen.tsx
index ff2076fed..946ec09d3 100644
--- a/src/containers/settings/EditServiceScreen.tsx
+++ b/src/containers/settings/EditServiceScreen.tsx
@@ -261,7 +261,7 @@ class EditServiceScreen extends Component<IProps> {
         },
         customIcon: {
           label: intl.formatMessage(messages.icon),
-          value: service?.hasCustomUploadedIcon ? service?.icon : null,
+          value: service?.hasCustomUploadedIcon ? service.icon : null,
           type: 'file',
         },
         isDarkModeEnabled: {
@@ -276,21 +276,21 @@ class EditServiceScreen extends Component<IProps> {
         darkReaderBrightness: {
           label: intl.formatMessage(messages.darkReaderBrightness),
           value: service?.darkReaderSettings
-            ? service?.darkReaderSettings.brightness
+            ? service.darkReaderSettings.brightness
             : DEFAULT_SERVICE_SETTINGS.darkReaderBrightness,
           default: DEFAULT_SERVICE_SETTINGS.darkReaderBrightness,
         },
         darkReaderContrast: {
           label: intl.formatMessage(messages.darkReaderContrast),
           value: service?.darkReaderSettings
-            ? service?.darkReaderSettings.contrast
+            ? service.darkReaderSettings.contrast
             : DEFAULT_SERVICE_SETTINGS.darkReaderContrast,
           default: DEFAULT_SERVICE_SETTINGS.darkReaderContrast,
         },
         darkReaderSepia: {
           label: intl.formatMessage(messages.darkReaderSepia),
           value: service?.darkReaderSettings
-            ? service?.darkReaderSettings.sepia
+            ? service.darkReaderSettings.sepia
             : DEFAULT_SERVICE_SETTINGS.darkReaderSepia,
           default: DEFAULT_SERVICE_SETTINGS.darkReaderSepia,
         },
-- 
cgit v1.2.3-70-g09d2

