Skip to content

Commit

Permalink
Merge pull request #1025 from StepicOrg/release/1.184
Browse files Browse the repository at this point in the history
Release 1.184
  • Loading branch information
ivan-magda authored Aug 11, 2021
2 parents c5337f0 + 56bd949 commit 8575830
Show file tree
Hide file tree
Showing 191 changed files with 2,105 additions and 4,308 deletions.
4 changes: 2 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
source "https://rubygems.org"
ruby "2.6.5"

gem "fastlane", "2.188.0"
gem "cocoapods", "1.10.1"
gem "fastlane", "2.191.0"
gem "cocoapods", "1.10.2"
gem "generamba", "1.5.0"

eval_gemfile("fastlane/Pluginfile")
42 changes: 22 additions & 20 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -15,27 +15,27 @@ GEM
artifactory (3.0.15)
atomos (0.1.3)
aws-eventstream (1.1.1)
aws-partitions (1.479.0)
aws-sdk-core (3.117.0)
aws-partitions (1.484.0)
aws-sdk-core (3.119.0)
aws-eventstream (~> 1, >= 1.0.2)
aws-partitions (~> 1, >= 1.239.0)
aws-sigv4 (~> 1.1)
jmespath (~> 1.0)
aws-sdk-kms (1.44.0)
aws-sdk-core (~> 3, >= 3.112.0)
aws-sdk-kms (1.46.0)
aws-sdk-core (~> 3, >= 3.119.0)
aws-sigv4 (~> 1.1)
aws-sdk-s3 (1.96.2)
aws-sdk-core (~> 3, >= 3.112.0)
aws-sdk-s3 (1.98.0)
aws-sdk-core (~> 3, >= 3.119.0)
aws-sdk-kms (~> 1)
aws-sigv4 (~> 1.1)
aws-sigv4 (1.2.4)
aws-eventstream (~> 1, >= 1.0.2)
babosa (1.0.4)
claide (1.0.3)
cocoapods (1.10.1)
cocoapods (1.10.2)
addressable (~> 2.6)
claide (>= 1.0.2, < 2.0)
cocoapods-core (= 1.10.1)
cocoapods-core (= 1.10.2)
cocoapods-deintegrate (>= 1.0.3, < 2.0)
cocoapods-downloader (>= 1.4.0, < 2.0)
cocoapods-plugins (>= 1.0.0, < 2.0)
Expand All @@ -50,7 +50,7 @@ GEM
nap (~> 1.0)
ruby-macho (~> 1.4)
xcodeproj (>= 1.19.0, < 2.0)
cocoapods-core (1.10.1)
cocoapods-core (1.10.2)
activesupport (> 5.0, < 6)
addressable (~> 2.6)
algoliasearch (~> 1.0)
Expand All @@ -75,7 +75,7 @@ GEM
highline (~> 2.0.0)
concurrent-ruby (1.1.9)
declarative (0.0.20)
digest-crc (0.6.3)
digest-crc (0.6.4)
rake (>= 12.0.0, < 14.0.0)
domain_name (0.5.20190701)
unf (>= 0.0.5, < 1.0.0)
Expand All @@ -85,14 +85,15 @@ GEM
ethon (0.14.0)
ffi (>= 1.15.0)
excon (0.85.0)
faraday (1.5.1)
faraday (1.7.0)
faraday-em_http (~> 1.0)
faraday-em_synchrony (~> 1.0)
faraday-excon (~> 1.1)
faraday-httpclient (~> 1.0.1)
faraday-net_http (~> 1.0)
faraday-net_http_persistent (~> 1.1)
faraday-patron (~> 1.0)
faraday-rack (~> 1.0)
multipart-post (>= 1.2, < 3)
ruby2_keywords (>= 0.0.4)
faraday-cookie_jar (0.0.7)
Expand All @@ -105,10 +106,11 @@ GEM
faraday-net_http (1.0.1)
faraday-net_http_persistent (1.2.0)
faraday-patron (1.0.0)
faraday_middleware (1.0.0)
faraday-rack (1.0.0)
faraday_middleware (1.1.0)
faraday (~> 1.0)
fastimage (2.2.4)
fastlane (2.188.0)
fastimage (2.2.5)
fastlane (2.191.0)
CFPropertyList (>= 2.3, < 4.0.0)
addressable (>= 2.8, < 3.0.0)
artifactory (~> 3.0)
Expand All @@ -125,7 +127,7 @@ GEM
faraday_middleware (~> 1.0)
fastimage (>= 2.1.0, < 3.0.0)
gh_inspector (>= 1.1.2, < 2.0.0)
google-apis-androidpublisher_v3 (~> 0.1)
google-apis-androidpublisher_v3 (~> 0.3)
google-apis-playcustomapp_v1 (~> 0.1)
google-cloud-storage (~> 1.31)
highline (~> 2.0)
Expand Down Expand Up @@ -159,7 +161,7 @@ GEM
xcodeproj (>= 1.5.0, < 2.0.0)
gh_inspector (1.1.3)
git (1.2.9.1)
google-apis-androidpublisher_v3 (0.8.0)
google-apis-androidpublisher_v3 (0.10.0)
google-apis-core (>= 0.4, < 2.a)
google-apis-core (0.4.1)
addressable (~> 2.5, >= 2.5.1)
Expand Down Expand Up @@ -190,7 +192,7 @@ GEM
google-cloud-core (~> 1.6)
googleauth (>= 0.16.2, < 2.a)
mini_mime (~> 1.0)
googleauth (0.16.2)
googleauth (0.17.0)
faraday (>= 0.17.3, < 2.0)
jwt (>= 1.4, < 3.0)
memoist (~> 0.16)
Expand Down Expand Up @@ -260,7 +262,7 @@ GEM
unf_ext (0.0.7.7)
webrick (1.7.0)
word_wrap (1.0.0)
xcodeproj (1.20.0)
xcodeproj (1.21.0)
CFPropertyList (>= 2.3.3, < 4.0)
atomos (~> 0.1.3)
claide (>= 1.0.2, < 2.0)
Expand All @@ -276,8 +278,8 @@ PLATFORMS
ruby

DEPENDENCIES
cocoapods (= 1.10.1)
fastlane (= 2.188.0)
cocoapods (= 1.10.2)
fastlane (= 2.191.0)
fastlane-plugin-firebase_app_distribution
generamba (= 1.5.0)

Expand Down
2 changes: 1 addition & 1 deletion Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -420,4 +420,4 @@ SPEC CHECKSUMS:

PODFILE CHECKSUM: 884a825519c822848da4d21e49dfa5f0e573ccb5

COCOAPODS: 1.10.1
COCOAPODS: 1.10.2
56 changes: 31 additions & 25 deletions Stepic.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions Stepic/Info-Develop.plist
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.183-develop</string>
<string>1.184-develop</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleURLTypes</key>
Expand Down Expand Up @@ -62,7 +62,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>356</string>
<string>357</string>
<key>FacebookAppID</key>
<string>171127739724012</string>
<key>FacebookDisplayName</key>
Expand Down
4 changes: 2 additions & 2 deletions Stepic/Info-Production.plist
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.183</string>
<string>1.184</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleURLTypes</key>
Expand Down Expand Up @@ -62,7 +62,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>356</string>
<string>357</string>
<key>FacebookAppID</key>
<string>171127739724012</string>
<key>FacebookDisplayName</key>
Expand Down
4 changes: 2 additions & 2 deletions Stepic/Info-Release.plist
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.183-release</string>
<string>1.184-release</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleURLTypes</key>
Expand Down Expand Up @@ -62,7 +62,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>356</string>
<string>357</string>
<key>FacebookAppID</key>
<string>171127739724012</string>
<key>FacebookDisplayName</key>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ extension AnalyticsEvent {
title: String,
isWishlisted: Bool? = nil
) -> AmplitudeAnalyticsEvent {
var parameters: [String : Any] = [
var parameters: [String: Any] = [
"source": source.rawValue,
"course": id,
"title": title
Expand Down
8 changes: 7 additions & 1 deletion Stepic/Legacy/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
return true
}

// MARK: - Responding to App State Changes and System Events
// MARK: - Responding to App Life-Cycle Events

func applicationWillEnterForeground(_ application: UIApplication) {
self.notificationsRegistrationService.renewDeviceToken()
Expand Down Expand Up @@ -189,6 +189,12 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
IAPService.shared.stopObservingPayments()
}

// MARK: - Responding to Environment Changes

func applicationDidReceiveMemoryWarning(_ application: UIApplication) {
CoreDataHelper.shared.context.refreshAllObjects()
}

// MARK: - Downloading Data in the Background

func application(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,12 @@ protocol CardStepDelegate: AnyObject {

extension CardStepDelegate {
func stepSubmissionDidCorrect() {}

func stepSubmissionDidWrong() {}

func stepSubmissionDidRetry() {}

func contentLoadingDidFail() {}

func contentLoadingDidComplete() {}
}
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@ final class CardOverlayView: OverlayView {
override var overlayState: SwipeResultDirection? {
didSet {
switch overlayState {
case .left :
case .left:
overlayImageView.image = UIImage(named: overlayLeftImageName)

leadingConstraint.deactivate()
trailingConstraint.activate()
case .right :
case .right:
overlayImageView.image = UIImage(named: overlayRightImageName)

leadingConstraint.activate()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ protocol StepCardViewDelegate: AnyObject {

extension StepCardViewDelegate {
func onControlButtonClick() {}

func onTitleButtonClick() {}
}

Expand Down
24 changes: 15 additions & 9 deletions Stepic/Legacy/Controllers/Certificates/CertificatesPresenter.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ final class CertificatesPresenter {
private let coursesAPI: CoursesAPI
private let presentationContainer: CertificatesPresentationContainer

private let certificatesPersistenceService: CertificatesPersistenceServiceProtocol

private var certificates: [Certificate] = [] {
didSet {
self.updatePersistentPresentationData()
Expand All @@ -30,29 +32,33 @@ final class CertificatesPresenter {
certificatesAPI: CertificatesAPI,
coursesAPI: CoursesAPI,
presentationContainer: CertificatesPresentationContainer,
certificatesPersistenceService: CertificatesPersistenceServiceProtocol,
view: CertificatesView?
) {
self.userID = userID
self.certificatesAPI = certificatesAPI
self.coursesAPI = coursesAPI
self.presentationContainer = presentationContainer
self.certificatesPersistenceService = certificatesPersistenceService
self.view = view
}

func getCachedCertificates() {
let localIds = self.presentationContainer.certificatesIds

let localCertificates = Certificate.fetch(localIds, user: self.userID).sorted(by: {
guard let index1 = localIds.firstIndex(of: $0.id),
let index2 = localIds.firstIndex(of: $1.id) else {
return false
self.certificatesPersistenceService.fetch(ids: localIds, userID: self.userID).done { cachedCertificates in
let localCertificates = cachedCertificates.sorted(by: {
guard let index1 = localIds.firstIndex(of: $0.id),
let index2 = localIds.firstIndex(of: $1.id) else {
return false
}
return index1 < index2
}).compactMap { [weak self] in
self?.makeViewData(from: $0)
}
return index1 < index2
}).compactMap { [weak self] in
self?.makeViewData(from: $0)
}

self.view?.setCertificates(certificates: localCertificates, hasNextPage: false)
self.view?.setCertificates(certificates: localCertificates, hasNextPage: false)
}
}

private func updatePersistentPresentationData() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ final class CertificatesLegacyAssembly: Assembly {
certificatesAPI: ApiDataDownloader.certificates,
coursesAPI: ApiDataDownloader.courses,
presentationContainer: PresentationContainer.certificates,
certificatesPersistenceService: CertificatesPersistenceService(),
view: certificatesVC
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ final class SearchQueriesPersistentManager {
key.indexOf(query.lowercased()) != nil
})
let arr = [String](filteredQueries.sorted(by: {
(first: (key: String, value: Int), second: (key: String, value: Int)) in
(first: (key: String, value: Int), second: (key: String, value: Int)) in
if first.value == second.value {
return first.key.count < second.key.count
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ extension SearchQueriesViewController: SearchQueriesView {
case .updating:
self.updatingView.setLoading()
self.tableView.tableFooterView = self.updatingView
case.ok:
case .ok:
self.tableView.tableFooterView = UIView()
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,11 @@ protocol QuizControllerDelegate: AnyObject {

extension QuizControllerDelegate {
func submissionDidCorrect() {}

func submissionDidWrong() {}

func submissionDidRetry() {}

func didWarningPlaceholderShow() {}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ struct CodeSnippetSymbols {

static func snippets(language: CodeLanguage) -> [String] {
switch language {
case .python :
case .python:
return python
case .java, .java8, .java9, .java11:
return java
Expand Down
2 changes: 1 addition & 1 deletion Stepic/Legacy/Extensions/StandardsExtensions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ func ??? <T>(optional: T?, defaultValue: @autoclosure () -> String) -> String {
}
}

func ==<T: Equatable>(lhs: T?, rhs: T?) -> Bool {
func == <T: Equatable>(lhs: T?, rhs: T?) -> Bool {
switch (lhs, rhs) {
case (.some(let lhs), .some(let rhs)):
return lhs == rhs
Expand Down
2 changes: 1 addition & 1 deletion Stepic/Legacy/Extensions/UIButtonExtensions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import UIKit

extension UIButton {
func setRoundedCorners(cornerRadius radius: CGFloat, borderWidth: CGFloat, borderColor: UIColor ) {
func setRoundedCorners(cornerRadius radius: CGFloat, borderWidth: CGFloat, borderColor: UIColor) {
self.layer.cornerRadius = radius
self.layer.borderWidth = borderWidth
self.layer.borderColor = borderColor.cgColor
Expand Down
2 changes: 1 addition & 1 deletion Stepic/Legacy/Extensions/UIViewExtensions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ extension UIView {
self.clipsToBounds = true
}

func setRoundedCorners(cornerRadius radius: CGFloat, borderWidth: CGFloat? = nil, borderColor: UIColor? = nil ) {
func setRoundedCorners(cornerRadius radius: CGFloat, borderWidth: CGFloat? = nil, borderColor: UIColor? = nil) {
self.layer.cornerRadius = radius
if let bw = borderWidth {
self.layer.borderWidth = bw
Expand Down
Loading

0 comments on commit 8575830

Please sign in to comment.