Skip to content

Commit

Permalink
(closes PR# 248)Singleton local storage (#297)
Browse files Browse the repository at this point in the history
* Improve UIColor extension (#157)
- Simplify the declaration of a read-only computed property by removing get keyword
- Fix incorrect import (Foundation is not enough to work with UIColor)
- Fix an incorrect data type of the parameters (the previous implementation will not work correctly if UIColor's initializer with Int type parameters appears)
- Correct the indents between operands
* Update README.md (#164)

Co-authored-by: Alexey Salangin <[email protected]>
Co-authored-by: Kanyinsola Fapohunda <[email protected]>
Co-authored-by: Shresth <[email protected]>
  • Loading branch information
4 people authored Jun 28, 2020
1 parent aa4ffb2 commit ead4c22
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 14 deletions.
2 changes: 1 addition & 1 deletion AmahiAnywhere/AmahiAnywhere/Data/Local/LocalStorage.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import Foundation

final class LocalStorage: NSObject {

override init() {
private override init() {
super.init()
}

Expand Down
18 changes: 5 additions & 13 deletions AmahiAnywhere/AmahiAnywhere/Extensions/UIColor.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,31 +6,23 @@
// Copyright © 2018 Amahi. All rights reserved.
//

import Foundation
import UIKit.UIColor

extension UIColor {

class var softYellow: UIColor {
get {
return UIColor(red:0.81, green:0.85, blue:0.26, alpha:0.7)
}
return UIColor(red: 0.81, green: 0.85, blue: 0.26, alpha: 0.7)
}

class var remoteIndicatorBrown: UIColor {
get {
return UIColor(red:152/255, green:38/255, blue:73/255, alpha:1)
}
return UIColor(red: 152 / 255.0, green: 38 / 255.0, blue: 73 / 255.0, alpha: 1)
}

class var localIndicatorBlack: UIColor {
get {
return UIColor(red:28/255, green:28/255, blue:31/255, alpha:1)
}
return UIColor(red: 28 / 255.0, green: 28 / 255.0, blue: 31 / 255.0, alpha: 1)
}

class var brokenIndicatorRed : UIColor {
get {
return UIColor(red:211/255, green:33/255, blue:45/255, alpha:1)
}
return UIColor(red: 211 / 255.0, green: 33 / 255.0, blue: 45 / 255.0, alpha: 1)
}
}
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ Please help us follow the best practice to make it easy for the reviewer as well
* Please follow the guides and code standards: [Swift Style Guide](https://github.com/linkedin/swift-style-guide)
* Please follow the good iOS development practices: [iOS Good Practices](https://github.com/futurice/ios-good-practices)
* If the PR is related to any front end change, please attach relevant screenshots in the pull request description.
* When creating PRs or commiting changes. Please ensure the sensitive contents of the ApiConfig.swift file are ignored. Such PRs will be declined.

### Pods
- [Alamofire](https://github.com/Alamofire/Alamofire): Elegant HTTP Networking in Swift
Expand Down

0 comments on commit ead4c22

Please sign in to comment.