Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changed OAuth Google logo inline with new compliance #548

Merged
merged 1 commit into from
May 2, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
7 changes: 1 addition & 6 deletions Lock/AuthPresenter.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ import Foundation

class AuthPresenter: Presentable, Loggable {

let compactModeThreshold = 3
let connections: [OAuth2Connection]
let interactor: OAuth2Authenticatable
let customStyle: [String: AuthStyle]
Expand All @@ -43,11 +42,7 @@ class AuthPresenter: Presentable, Loggable {

func newViewToEmbed(withInsets insets: UIEdgeInsets, isLogin: Bool = true) -> AuthCollectionView {
let mode: AuthCollectionView.Mode
if self.connections.count < compactModeThreshold {
mode = .expanded(isLogin: isLogin)
} else {
mode = .compact
}
mode = .expanded(isLogin: isLogin)
return self.newView(withInsets: insets, mode: mode)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"author" : "xcode"
},
"properties" : {
"template-rendering-intent" : "template"
"template-rendering-intent" : "original",
"preserves-vector-representation" : true
}
}
Binary file not shown.
6 changes: 0 additions & 6 deletions LockTests/Presenters/AuthPresenterSpec.swift
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,6 @@ class AuthPresenterSpec: QuickSpec {
expect(presenter.newViewToEmbed(withInsets: UIEdgeInsets.zero).mode).to(beExpandedMode())
}

it("should return view with compact mode for more than three connecitons") {
let connections = OfflineConnections(databases: [], oauth2: mockConnections(count: Int(arc4random_uniform(10)) + 3), enterprise: [], passwordless: [])
presenter = AuthPresenter(connections: connections.oauth2, interactor: interactor, customStyle: [:])
expect(presenter.newViewToEmbed(withInsets: UIEdgeInsets.zero).mode).to(beCompactMode())
}

}

describe("action") {
Expand Down