mirror of
https://github.com/SideStore/SideStore.git
synced 2026-02-09 06:43:25 +01:00
[AltStore] Skips choose team/certificate UI when there is only 1
This commit is contained in:
@@ -242,6 +242,11 @@ private extension AuthenticationOperation
|
|||||||
{
|
{
|
||||||
func selectTeam(from teams: [ALTTeam])
|
func selectTeam(from teams: [ALTTeam])
|
||||||
{
|
{
|
||||||
|
if let team = teams.first, teams.count == 1
|
||||||
|
{
|
||||||
|
return completionHandler(.success(team))
|
||||||
|
}
|
||||||
|
|
||||||
DispatchQueue.main.async {
|
DispatchQueue.main.async {
|
||||||
let selectTeamViewController = self.storyboard.instantiateViewController(withIdentifier: "selectTeamViewController") as! SelectTeamViewController
|
let selectTeamViewController = self.storyboard.instantiateViewController(withIdentifier: "selectTeamViewController") as! SelectTeamViewController
|
||||||
selectTeamViewController.teams = teams
|
selectTeamViewController.teams = teams
|
||||||
@@ -321,6 +326,22 @@ private extension AuthenticationOperation
|
|||||||
|
|
||||||
func replaceCertificate(from certificates: [ALTCertificate])
|
func replaceCertificate(from certificates: [ALTCertificate])
|
||||||
{
|
{
|
||||||
|
if let certificate = certificates.first, certificates.count == 1
|
||||||
|
{
|
||||||
|
ALTAppleAPI.shared.revoke(certificate, for: team) { (success, error) in
|
||||||
|
if let error = error, !success
|
||||||
|
{
|
||||||
|
completionHandler(.failure(error))
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
requestCertificate()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
DispatchQueue.main.async {
|
DispatchQueue.main.async {
|
||||||
let replaceCertificateViewController = self.storyboard.instantiateViewController(withIdentifier: "replaceCertificateViewController") as! ReplaceCertificateViewController
|
let replaceCertificateViewController = self.storyboard.instantiateViewController(withIdentifier: "replaceCertificateViewController") as! ReplaceCertificateViewController
|
||||||
replaceCertificateViewController.team = team
|
replaceCertificateViewController.team = team
|
||||||
|
|||||||
Reference in New Issue
Block a user