Skip to content

Commit

Permalink
Fix other warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
tonisevener committed Jan 7, 2025
1 parent 711882a commit 18f3c55
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -106,14 +106,9 @@ public enum RemoteNotificationsControllerError: LocalizedError {
}

@objc private func authManagerDidLogOut() {
do {
filterState = RemoteNotificationsFilterState(readStatus: .all, offTypes: [], offProjects: [])
allInboxProjects = []
modelController?.resetDatabaseAndSharedCache()
} catch let error {
DDLogError("Error resetting notifications database on logout: \(error)")
}

filterState = RemoteNotificationsFilterState(readStatus: .all, offTypes: [], offProjects: [])
allInboxProjects = []
modelController?.resetDatabaseAndSharedCache()
}

@objc private func authManagerDidLogIn() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import Foundation
import UIKit
import CoreData

@preconcurrency
@objc public class WMFYearInReviewDataController: NSObject {

public let coreDataStore: WMFCoreDataStore
Expand Down
6 changes: 0 additions & 6 deletions WMFData/Sources/WMFData/Store/WMFCoreDataStore.swift
Original file line number Diff line number Diff line change
Expand Up @@ -156,12 +156,6 @@ public final class WMFCoreDataStore {

public func performDatabaseHousekeeping() async throws {

guard let sevenDaysAgoDate = Calendar.current.date(byAdding: .day,
value: -7,
to: Date()) else {
return
}

let currentYear = Calendar.current.component(.year, from: Date())
var dateComponents = DateComponents()
dateComponents.year = currentYear - 1
Expand Down
2 changes: 1 addition & 1 deletion Wikipedia/Code/WMFAuthenticationManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ import CocoaLumberjackSwift

// App Language has changed. Fetch current user again to refresh currentUserCache.

guard let langController = notification.object, let appLanguage = (langController as AnyObject).appLanguage else {
guard let langController = notification.object as? MWKLanguageLinkController, langController.appLanguage != nil else {
assertionFailure("Could not extract app language from WMFAppLanguageDidChangeNotification")
return
}
Expand Down

0 comments on commit 18f3c55

Please sign in to comment.