Skip to content

Commit

Permalink
Update code for dependency changes
Browse files Browse the repository at this point in the history
  • Loading branch information
alexcurylo committed Jul 29, 2019
1 parent f2cd324 commit 11a98dd
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 19 deletions.
4 changes: 2 additions & 2 deletions .swiftlint.yml
@@ -1,7 +1,7 @@
# references:
# https://github.com/realm/SwiftLint#configuration
#
# `swiftlint rules` last updated version 0.33.0
# `swiftlint rules` last updated version 0.34.0
#
# Disable an individual warning with [next|previous]:
# // swiftlint:disable:previous line_length
Expand Down Expand Up @@ -98,8 +98,8 @@ opt_in_rules:
- unneeded_parentheses_in_closure_argument
- unowned_variable_capture
- untyped_error_in_catch
- unused_declaration
- unused_import
- unused_private_declaration
- vertical_parameter_alignment_on_call
#- vertical_whitespace_between_cases
- vertical_whitespace_closing_braces
Expand Down
30 changes: 15 additions & 15 deletions MTP/application/services/NotificationService.swift
Expand Up @@ -417,14 +417,14 @@ private extension NotificationServiceImpl {
// No
let buttonFont = Avenir.heavy.of(size: 16)
let noColor = UIColor(rgb: 0xD0021B)
let noButtonLabelStyle = EKProperty.LabelStyle(font: buttonFont, color: noColor)
let noButtonLabelStyle = EKProperty.LabelStyle(font: buttonFont, color: EKColor(noColor))
let noButtonLabel = EKProperty.LabelContent(
text: L.no(),
style: noButtonLabelStyle)
let noButton = EKProperty.ButtonContent(
label: noButtonLabel,
backgroundColor: .clear,
highlightedBackgroundColor: noColor.withAlphaComponent(0.05)) {
highlightedBackgroundColor: EKColor(noColor.withAlphaComponent(0.05))) {
SwiftEntryKit.dismiss {
self.asking = false
then(false)
Expand All @@ -433,14 +433,14 @@ private extension NotificationServiceImpl {

// Yes
let yesColor = UIColor(rgb: 0x028DFF)
let yesButtonLabelStyle = EKProperty.LabelStyle(font: buttonFont, color: yesColor)
let yesButtonLabelStyle = EKProperty.LabelStyle(font: buttonFont, color: EKColor(yesColor))
let yesButtonLabel = EKProperty.LabelContent(
text: L.yes(),
style: yesButtonLabelStyle)
let yesButton = EKProperty.ButtonContent(
label: yesButtonLabel,
backgroundColor: .clear,
highlightedBackgroundColor: yesColor.withAlphaComponent(0.05)) {
highlightedBackgroundColor: EKColor(yesColor.withAlphaComponent(0.05))) {
SwiftEntryKit.dismiss {
self.asking = false
then(true)
Expand All @@ -450,7 +450,7 @@ private extension NotificationServiceImpl {
let buttonsBarContent = EKProperty.ButtonBarContent(
// swiftlint:disable:next multiline_arguments
with: noButton, yesButton,
separatorColor: grayLight,
separatorColor: EKColor(grayLight),
buttonHeight: 60,
expandAnimatedly: true)

Expand Down Expand Up @@ -479,14 +479,14 @@ private extension NotificationServiceImpl {
// Dismiss
let buttonFont = Avenir.heavy.of(size: 16)
let dismissColor = UIColor(rgb: 0xD0021B)
let closeButtonLabelStyle = EKProperty.LabelStyle(font: buttonFont, color: dismissColor)
let closeButtonLabelStyle = EKProperty.LabelStyle(font: buttonFont, color: EKColor(dismissColor))
let closeButtonLabel = EKProperty.LabelContent(
text: L.dismissAction(),
style: closeButtonLabelStyle)
let closeButton = EKProperty.ButtonContent(
label: closeButtonLabel,
backgroundColor: .clear,
highlightedBackgroundColor: dismissColor.withAlphaComponent(0.05)) { [mappable] in
highlightedBackgroundColor: EKColor(dismissColor.withAlphaComponent(0.05))) { [mappable] in
mappable.isDismissed = true
SwiftEntryKit.dismiss {
self.notifying = nil
Expand All @@ -496,14 +496,14 @@ private extension NotificationServiceImpl {

// Checkin
let checkinColor = UIColor(rgb: 0x028DFF)
let okButtonLabelStyle = EKProperty.LabelStyle(font: buttonFont, color: checkinColor)
let okButtonLabelStyle = EKProperty.LabelStyle(font: buttonFont, color: EKColor(checkinColor))
let okButtonLabel = EKProperty.LabelContent(
text: L.checkinAction(),
style: okButtonLabelStyle)
let okButton = EKProperty.ButtonContent(
label: okButtonLabel,
backgroundColor: .clear,
highlightedBackgroundColor: checkinColor.withAlphaComponent(0.05)) { [mappable] in
highlightedBackgroundColor: EKColor(checkinColor.withAlphaComponent(0.05))) { [mappable] in
SwiftEntryKit.dismiss {
self.notifying = nil
self.set(item: mappable.item,
Expand All @@ -516,7 +516,7 @@ private extension NotificationServiceImpl {
let buttonsBarContent = EKProperty.ButtonBarContent(
// swiftlint:disable:next multiline_arguments
with: closeButton, okButton,
separatorColor: grayLight,
separatorColor: EKColor(grayLight),
buttonHeight: 60,
expandAnimatedly: true)

Expand Down Expand Up @@ -550,15 +550,15 @@ private extension NotificationServiceImpl {

// OK
let buttonFont = Avenir.heavy.of(size: 16)
let checkinColor = UIColor(rgb: 0x028DFF)
let okButtonLabelStyle = EKProperty.LabelStyle(font: buttonFont, color: checkinColor)
let okColor = UIColor(rgb: 0x028DFF)
let okButtonLabelStyle = EKProperty.LabelStyle(font: buttonFont, color: EKColor(okColor))
let okButtonLabel = EKProperty.LabelContent(
text: L.ok(),
style: okButtonLabelStyle)
let okButton = EKProperty.ButtonContent(
label: okButtonLabel,
backgroundColor: .clear,
highlightedBackgroundColor: checkinColor.withAlphaComponent(0.05)) {
highlightedBackgroundColor: EKColor(okColor.withAlphaComponent(0.05))) {
SwiftEntryKit.dismiss {
self.alerting = false
then()
Expand All @@ -567,7 +567,7 @@ private extension NotificationServiceImpl {
let grayLight = UIColor(white: 230.0 / 255.0, alpha: 1)
let buttonsBarContent = EKProperty.ButtonBarContent(
with: okButton,
separatorColor: grayLight,
separatorColor: EKColor(grayLight),
buttonHeight: 60,
expandAnimatedly: true)

Expand Down Expand Up @@ -694,7 +694,7 @@ private extension EKAttributes {
static func notifyAttributes(note category: Note.Category) -> EKAttributes {
var attributes = EKAttributes.bottomFloat

let dimmedLightBackground = UIColor(white: 100.0 / 255.0, alpha: 0.3)
let dimmedLightBackground = EKColor(UIColor(white: 100.0 / 255.0, alpha: 0.3))
attributes.screenBackground = .color(color: dimmedLightBackground)
attributes.hapticFeedbackType = .success
attributes.displayDuration = .infinity
Expand Down
2 changes: 1 addition & 1 deletion MTP/support/Date+Formatting.swift
Expand Up @@ -48,7 +48,7 @@ extension DateFormatter {
}

static var stampTime = DateFormatter {
$0.dateFormat = "yy.MM.dd HH:mm:ss:SSS"
$0.dateFormat = "yy.MM.dd HH:mm:ss.SSS"
$0.calendar = Calendar(identifier: .iso8601)
$0.timeZone = TimeZone.current
$0.locale = Locale(identifier: "en_US_POSIX")
Expand Down
8 changes: 7 additions & 1 deletion fastlane/Fastfile
Expand Up @@ -9,6 +9,8 @@
#
# https://docs.fastlane.tools/plugins/available-plugins
#
# update metadata: fastlane deliver download_metadata
#

fastlane_version "2.128.1"
#update_fastlane
Expand Down Expand Up @@ -59,7 +61,11 @@ platform :ios do
build_app(export_method: "app-store")
# screenshots

# upload_to_app_store(skip_metadata: true, skip_screenshots: true)
upload_to_app_store(skip_metadata: true,
skip_screenshots: true,
demo_account_required: true,
# https://github.com/fastlane/fastlane/issues/13512
force: true)

stamp_changelog(section_identifier: "Version #{version_number}, Build #{build_number}")
clean_build_artifacts
Expand Down
Binary file modified fastlane/screenshots/en-US/keyword.strings
Binary file not shown.

0 comments on commit 11a98dd

Please sign in to comment.