cleanup
This commit is contained in:
parent
1ee02dfcb0
commit
43f03c1c9c
|
@ -120,7 +120,7 @@ final class SessionManager {
|
||||||
|
|
||||||
return (editServer, transaction)
|
return (editServer, transaction)
|
||||||
}
|
}
|
||||||
.handleEvents(receiveOutput: { (server, transaction) in
|
.handleEvents(receiveOutput: { (_, transaction) in
|
||||||
try? transaction.commitAndWait()
|
try? transaction.commitAndWait()
|
||||||
})
|
})
|
||||||
.map({ (server, _) in
|
.map({ (server, _) in
|
||||||
|
@ -149,7 +149,7 @@ final class SessionManager {
|
||||||
|
|
||||||
return (editServer, transaction)
|
return (editServer, transaction)
|
||||||
}
|
}
|
||||||
.handleEvents(receiveOutput: { (server, transaction) in
|
.handleEvents(receiveOutput: { (_, transaction) in
|
||||||
try? transaction.commitAndWait()
|
try? transaction.commitAndWait()
|
||||||
})
|
})
|
||||||
.map({ (server, _) in
|
.map({ (server, _) in
|
||||||
|
|
|
@ -180,9 +180,9 @@ extension SwiftfinStore.Errors: LocalizedError {
|
||||||
|
|
||||||
var title: String {
|
var title: String {
|
||||||
switch self {
|
switch self {
|
||||||
case .existingServer(_):
|
case .existingServer:
|
||||||
return "Existing Server"
|
return "Existing Server"
|
||||||
case .existingUser(_):
|
case .existingUser:
|
||||||
return "Existing User"
|
return "Existing User"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -106,7 +106,7 @@ final class ConnectToServerViewModel: ViewModel {
|
||||||
.sink { completion in
|
.sink { completion in
|
||||||
self.handleAPIRequestError(displayMessage: "Unable to connect to server.", logLevel: .critical, tag: "connectToServer",
|
self.handleAPIRequestError(displayMessage: "Unable to connect to server.", logLevel: .critical, tag: "connectToServer",
|
||||||
completion: completion)
|
completion: completion)
|
||||||
} receiveValue: { server in
|
} receiveValue: { _ in
|
||||||
self.router?.dismissCoordinator()
|
self.router?.dismissCoordinator()
|
||||||
}
|
}
|
||||||
.store(in: &self.cancellables)
|
.store(in: &self.cancellables)
|
||||||
|
|
|
@ -62,7 +62,7 @@ final class HomeViewModel: ViewModel {
|
||||||
.sink(receiveCompletion: { completion in
|
.sink(receiveCompletion: { completion in
|
||||||
switch completion {
|
switch completion {
|
||||||
case .finished: ()
|
case .finished: ()
|
||||||
case .failure(_):
|
case .failure:
|
||||||
self.libraries = []
|
self.libraries = []
|
||||||
self.handleAPIRequestError(completion: completion)
|
self.handleAPIRequestError(completion: completion)
|
||||||
}
|
}
|
||||||
|
@ -82,7 +82,7 @@ final class HomeViewModel: ViewModel {
|
||||||
.sink(receiveCompletion: { completion in
|
.sink(receiveCompletion: { completion in
|
||||||
switch completion {
|
switch completion {
|
||||||
case .finished: ()
|
case .finished: ()
|
||||||
case .failure(_):
|
case .failure:
|
||||||
self.libraries = []
|
self.libraries = []
|
||||||
self.handleAPIRequestError(completion: completion)
|
self.handleAPIRequestError(completion: completion)
|
||||||
}
|
}
|
||||||
|
@ -110,7 +110,7 @@ final class HomeViewModel: ViewModel {
|
||||||
.sink(receiveCompletion: { completion in
|
.sink(receiveCompletion: { completion in
|
||||||
switch completion {
|
switch completion {
|
||||||
case .finished: ()
|
case .finished: ()
|
||||||
case .failure(_):
|
case .failure:
|
||||||
self.resumeItems = []
|
self.resumeItems = []
|
||||||
self.handleAPIRequestError(completion: completion)
|
self.handleAPIRequestError(completion: completion)
|
||||||
}
|
}
|
||||||
|
@ -127,7 +127,7 @@ final class HomeViewModel: ViewModel {
|
||||||
.sink(receiveCompletion: { completion in
|
.sink(receiveCompletion: { completion in
|
||||||
switch completion {
|
switch completion {
|
||||||
case .finished: ()
|
case .finished: ()
|
||||||
case .failure(_):
|
case .failure:
|
||||||
self.nextUpItems = []
|
self.nextUpItems = []
|
||||||
self.handleAPIRequestError(completion: completion)
|
self.handleAPIRequestError(completion: completion)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue