Skip to content

Commit

Permalink
fix: address feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
IvanStepanok committed Dec 11, 2024
1 parent fc9dedf commit 4cbed7c
Show file tree
Hide file tree
Showing 12 changed files with 54 additions and 79 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@ final class DismissKeyboardTapHandler: NSObject {
let recognizer = makeTapGestureRecognizer()
UIApplication
.shared
.connectedScenes
.compactMap { ($0 as? UIWindowScene)?.keyWindow }
.last?
.oexKeyWindow?
.addGestureRecognizer(recognizer)
tapRecognizer = recognizer
return
Expand All @@ -29,9 +27,7 @@ final class DismissKeyboardTapHandler: NSObject {
if let recognizer = tapRecognizer {
UIApplication
.shared
.connectedScenes
.compactMap { ($0 as? UIWindowScene)?.keyWindow }
.last?
.oexKeyWindow?
.removeGestureRecognizer(recognizer)
tapRecognizer = nil
}
Expand Down
3 changes: 1 addition & 2 deletions Core/Core/Network/DownloadManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,7 @@ public class DownloadManager: DownloadManagerProtocol {
private let connectivity: ConnectivityProtocol
private var downloadRequest: DownloadRequest?
private var isDownloadingInProgress: Bool = false
private nonisolated(unsafe) var currentDownloadEventPublisher:
PassthroughSubject<DownloadManagerEvent, Never> = .init()
private nonisolated(unsafe) var currentDownloadEventPublisher = PassthroughSubject<DownloadManagerEvent, Never>()
private let backgroundTaskProvider = BackgroundTaskProvider()
private var cancellables = Set<AnyCancellable>()
private nonisolated(unsafe) var failedDownloads: [DownloadDataTask] = []
Expand Down
12 changes: 6 additions & 6 deletions Core/Core/Network/RequestInterceptor.swift
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,12 @@ final public class RequestInterceptor: Alamofire.RequestInterceptor {

let userAgent: String = {
if let info = Bundle.main.infoDictionary {
let executable: AnyObject = info[kCFBundleExecutableKey as String]
as AnyObject? ?? "Unknown" as AnyObject
let bundle: AnyObject = info[kCFBundleIdentifierKey as String]
as AnyObject? ?? "Unknown" as AnyObject
let version: AnyObject = info["CFBundleShortVersionString"]
as AnyObject? ?? "Unknown" as AnyObject
let executable: AnyObject = info[kCFBundleExecutableKey as String] as AnyObject?
?? "Unknown" as AnyObject
let bundle: AnyObject = info[kCFBundleIdentifierKey as String] as AnyObject?
?? "Unknown" as AnyObject
let version: AnyObject = info["CFBundleShortVersionString"] as AnyObject?
?? "Unknown" as AnyObject
let os: AnyObject = ProcessInfo.processInfo.operatingSystemVersionString as AnyObject
let mutableUserAgent = NSMutableString(
string: "\(executable)/\(bundle) (\(version); OS \(os))"
Expand Down
47 changes: 26 additions & 21 deletions Core/Core/View/Base/AppReview/Elements/AppReviewButton.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,33 +26,38 @@ struct AppReviewButton: View {
Group {
HStack(spacing: 4) {
Text(
type == .submit ? CoreLocalization.Review.Button.submit
type == .submit
? CoreLocalization.Review.Button.submit
: (
type == .shareFeedback
? CoreLocalization.Review.Button.shareFeedback
: CoreLocalization.Review.Button.rateUs
)
)
.foregroundColor(isActive ? Color.white : Color.black.opacity(0.6))
.font(Theme.Fonts.labelLarge)
.padding(3)

}.padding(.horizontal, 20)
.padding(.vertical, 9)
}.fixedSize()
.background(isActive
.foregroundColor(isActive ? Color.white : Color.black.opacity(0.6))
.font(Theme.Fonts.labelLarge)
.padding(3)

}.padding(.horizontal, 20)
.padding(.vertical, 9)
}.fixedSize()
.background(
isActive
? Theme.Colors.accentColor
: Theme.Colors.cardViewStroke)
.accessibilityElement(children: .ignore)
.accessibilityLabel(
type == .submit ? CoreLocalization.Review.Button.submit
: (
type == .shareFeedback
? CoreLocalization.Review.Button.shareFeedback
: CoreLocalization.Review.Button.rateUs
)
)
.cornerRadius(8)
})
: Theme.Colors.cardViewStroke
)
.accessibilityElement(children: .ignore)
.accessibilityLabel(
type == .submit
? CoreLocalization.Review.Button.submit
: (
type == .shareFeedback
? CoreLocalization.Review.Button.shareFeedback
: CoreLocalization.Review.Button.rateUs
)
)
.cornerRadius(8)
}
)
}
}
11 changes: 5 additions & 6 deletions Core/Core/View/Base/CourseCellView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -99,17 +99,17 @@ public struct CourseCellView: View {
.padding(.vertical, type == .discovery ? 10 : 0)
Spacer()
}

}.frame(height: 105)
.background(Theme.Colors.background)
.opacity(showView ? 1 : 0)
.offset(y: showView ? 0 : 20)
.accessibilityElement(children: .ignore)
.accessibilityLabel(
courseName + " " + (
type == .dashboard ? (
courseEnd == "" ? courseStart : courseEnd
) : ""
type == .dashboard
? (courseEnd == "" ? courseStart : courseEnd)
: ""
)
)
.onAppear {
Expand All @@ -120,7 +120,7 @@ public struct CourseCellView: View {
}
}
}

VStack {
if Int(index) != cellsCount {
Divider()
Expand Down Expand Up @@ -169,7 +169,6 @@ struct CourseCellView_Previews: PreviewProvider {
// Divider()
}
}

}
}
// swiftlint:enable all
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,4 @@ struct BlockStatusView: View {
.padding(.top, 0.2)
}
}

func applyStyle(string: String, forgroundColor: Color, backgroundColor: Color) -> AttributedString {
var attributedString = AttributedString(string)
attributedString.font = Theme.Fonts.bodySmall
attributedString.foregroundColor = forgroundColor
attributedString.backgroundColor = backgroundColor
return attributedString
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ struct CompletedBlocks: View {
Image(systemName: "chevron.right")
.resizable()
.flipsForRightToLeftLayoutDirection(true)

.scaledToFit()
.frame(width: 6.55, height: 11.15)
.labelStyle(.iconOnly)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,7 @@ public class BaseResponsesViewModel {
}

func addNewPost(_ post: Post) {
let newPostWithAvatar = post
postComments?.comments.append(newPostWithAvatar)
postComments?.comments.append(post)
itemsCount += 1
}

Expand Down
3 changes: 2 additions & 1 deletion OpenEdX/DI/ContainerMainActor.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import Foundation
@preconcurrency import Swinject

//swiftlint:disable line_length
// MARK: - MainActor registration
@available(iOS 13.0, macOS 10.15, *)
extension Container {
Expand Down Expand Up @@ -275,5 +276,5 @@ extension Container {
}
}
}

}
//swiftlint:enable line_length
15 changes: 0 additions & 15 deletions OpenEdX/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,6 @@
<array>
<string>openEdx.offlineProgressSync</string>
</array>
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleTypeRole</key>
<string>Viewer</string>
<key>CFBundleURLIconFile</key>
<string></string>
<key>CFBundleURLName</key>
<string>test</string>
<key>CFBundleURLSchemes</key>
<array>
<string>test</string>
</array>
</dict>
</array>
<key>Configuration</key>
<string>$(CONFIGURATION)</string>
<key>FirebaseAppDelegateProxyEnabled</key>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,9 @@ public struct CoursesToSyncView: View {
course.synced == viewModel.synced && (
!viewModel.hideInactiveCourses || course.recentlyActive
)
})
.sorted { $0.recentlyActive && !$1.recentlyActive
}
}
)
.sorted { $0.recentlyActive && !$1.recentlyActive }
.enumerated()
),
id: \.offset
Expand Down Expand Up @@ -140,11 +140,11 @@ public struct CoursesToSyncView: View {
Text(ProfileLocalization.Sync.noSynced)
.foregroundStyle(Theme.Colors.textPrimary)
.font(Theme.Fonts.titleMedium)
Text(ProfileLocalization.Sync.noSyncedDescription)
.multilineTextAlignment(.center)
.foregroundStyle(Theme.Colors.textPrimary)
.font(Theme.Fonts.labelMedium)
.frame(width: 245)
Text(ProfileLocalization.Sync.noSyncedDescription)
.multilineTextAlignment(.center)
.foregroundStyle(Theme.Colors.textPrimary)
.font(Theme.Fonts.labelMedium)
.frame(width: 245)
}
}
}
Expand Down
6 changes: 3 additions & 3 deletions default_config/dev/config.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
API_HOST_URL: 'https://axim-mobile.raccoongang.net'
API_HOST_URL: 'http://localhost:8000'
SSO_URL: 'http://localhost:8000'
SSO_FINISHED_URL: 'http://localhost:8000'
ENVIRONMENT_DISPLAY_NAME: 'lms-axim-stage'
ENVIRONMENT_DISPLAY_NAME: 'Localhost'
FEEDBACK_EMAIL_ADDRESS: '[email protected]'
OAUTH_CLIENT_ID: 'zP3vPz00c8fTRpYjNbVSlA1fxt9LnCxTM4JK1KQ0'
OAUTH_CLIENT_ID: ''

DISCOVERY:
TYPE: "native"
Expand Down

0 comments on commit 4cbed7c

Please sign in to comment.