remove some unused variables and return values

This commit is contained in:
Sixten Otto
2023-02-17 11:21:02 -07:00
parent 28e6605b7c
commit 33d01d77c2
4 changed files with 3 additions and 4 deletions

View File

@ -25,7 +25,7 @@ struct SaveLinkToOmnivoreIntent: AppIntent {
do {
let services = Services()
let requestId = UUID().uuidString.lowercased()
let saveResult = try await services.dataService.saveURL(id: requestId, url: link.absoluteString)
_ = try await services.dataService.saveURL(id: requestId, url: link.absoluteString)
return .result(dialog: "Link saved to Omnivore")
} catch {

View File

@ -20,7 +20,7 @@ import Views
func removeToken(dataService: DataService, tokenID: String) {
if let idx = devices.firstIndex(where: { $0.id == tokenID }) {
Task {
try await dataService.syncDeviceToken(deviceTokenOperation: .deleteToken(tokenID: tokenID))
_ = try await dataService.syncDeviceToken(deviceTokenOperation: .deleteToken(tokenID: tokenID))
devices.remove(at: idx)
}
}

View File

@ -28,7 +28,7 @@ import Views
self.desiredNotificationsEnabled = granted
Task {
if let savedToken = UserDefaults.standard.string(forKey: UserDefaultKey.firebasePushToken.rawValue) {
try? await dataService.syncDeviceToken(
_ = try? await dataService.syncDeviceToken(
deviceTokenOperation: DeviceTokenOperation.addToken(token: savedToken))
}
NotificationCenter.default.post(name: Notification.Name("ReconfigurePushNotifications"), object: nil)

View File

@ -34,7 +34,6 @@ public extension DataService {
let path = appEnvironment.graphqlPath
let headers = networker.defaultHeaders
let context = backgroundContext
return try await withCheckedThrowingContinuation { continuation in
send(query, to: path, headers: headers) { queryResult in