Skip to content

Commit

Permalink
refactor: Change condition and remove unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthieu-dgl committed Feb 25, 2025
1 parent e943af4 commit 8b703d6
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ struct AboutPrivacyView: View {
)
.onChange(of: matomoAuthorized) { newValue in
@InjectService var matomo: InfomaniakCoreCommonUI.MatomoUtils
#if DEBUG && !TEST
#if DEBUG || TEST
matomo.optOut(true)
#else
matomo.optOut(!newValue)
Expand Down
2 changes: 0 additions & 2 deletions kDriveCore/Utils/DriveUserDefaults+Extension.swift
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,6 @@ public extension UserDefaults {

var isMatomoAuthorized: Bool {
get {
bool(forKey: key(.matomoAuthorized))
if object(forKey: key(.matomoAuthorized)) == nil {
set(DefaultPreferences.matomoAuthorized, forKey: key(.matomoAuthorized))
}
Expand All @@ -354,7 +353,6 @@ public extension UserDefaults {

var isSentryAuthorized: Bool {
get {
bool(forKey: key(.sentryAuthorized))
if object(forKey: key(.sentryAuthorized)) == nil {
set(DefaultPreferences.sentryAuthorized, forKey: key(.sentryAuthorized))
}
Expand Down

0 comments on commit 8b703d6

Please sign in to comment.