Skip to content
This repository was archived by the owner on Sep 19, 2023. It is now read-only.

redesign/onboarding #541

Draft
wants to merge 38 commits into
base: master
Choose a base branch
from
Draft
Changes from 1 commit
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
moved around
decanus committed May 27, 2021
commit 5623a2b579c0c651ffd0f702dac9314b140a3410
39 changes: 1 addition & 38 deletions Sources/Scenes/Authentication/AuthenticationInteractor.swift
Original file line number Diff line number Diff line change
@@ -130,49 +130,12 @@ class AuthenticationInteractor: NSObject, AuthenticationViewControllerOutput {
case let .success((user, expires)):
self.store(token: self.token!, expires: expires, user: user)
DispatchQueue.main.async {
self.output.present(state: .permissions)

NotificationManager.shared.delegate = self
NotificationManager.shared.requestAuthorization()
self.output.present(state: .profilePhoto)
}
}
}
}

// func register(username: String?, displayName: String?, image: UIImage?) {
// guard let usernameInput = username, isValidUsername(usernameInput) else {
// return output.present(error: .invalidUsername)
// }
//
// guard let profileImage = image else {
// return output.present(error: .missingProfileImage)
// }
//
// api.register(token: token!, username: usernameInput, displayName: displayName ?? usernameInput, image: profileImage) { result in
// switch result {
// case let .failure(error):
// switch error {
// case let .endpoint(response):
// if response.code == .usernameAlreadyExists {
// return self.output.present(error: .usernameTaken)
// }
// default:
// break
// }
//
// return self.output.present(error: .general)
// case let .success((user, expires)):
// self.store(token: self.token!, expires: expires, user: user)
// DispatchQueue.main.async {
// self.output.present(state: .permissions)
//
// NotificationManager.shared.delegate = self
// NotificationManager.shared.requestAuthorization()
// }
// }
// }
// }

func follow(users: [Int]) {
if users.count == 0 {
return registrationCompleted()