Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
15 commits
Select commit Hold shift + click to select a range
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
16 changes: 8 additions & 8 deletions SOOUM/SOOUM.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -3942,7 +3942,7 @@
CODE_SIGN_ENTITLEMENTS = "SOOUM/Resources/SOOUM-Dev.entitlements";
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 201020;
CURRENT_PROJECT_VERSION = 201050;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEVELOPMENT_TEAM = 99FRG743RX;
GENERATE_INFOPLIST_FILE = YES;
Expand All @@ -3966,7 +3966,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 2.1.2;
MARKETING_VERSION = 2.1.5;
OTHER_SWIFT_FLAGS = "$(inherited) -D DEVELOP";
PRODUCT_BUNDLE_IDENTIFIER = com.sooum.dev;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand Down Expand Up @@ -3995,7 +3995,7 @@
CODE_SIGN_ENTITLEMENTS = "SOOUM/Resources/SOOUM-Dev.entitlements";
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 201020;
CURRENT_PROJECT_VERSION = 201050;
DEVELOPMENT_TEAM = 99FRG743RX;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = "SOOUM/Resources/Develop/Info-dev.plist";
Expand All @@ -4018,7 +4018,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 2.1.2;
MARKETING_VERSION = 2.1.5;
OTHER_SWIFT_FLAGS = "$(inherited) -D DEVELOP";
PRODUCT_BUNDLE_IDENTIFIER = com.sooum.dev;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand Down Expand Up @@ -4234,7 +4234,7 @@
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_ENTITLEMENTS = "SOOUM/Resources//SOOUM.entitlements";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 201020;
CURRENT_PROJECT_VERSION = 201040;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEVELOPMENT_TEAM = 99FRG743RX;
GENERATE_INFOPLIST_FILE = YES;
Expand All @@ -4257,7 +4257,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 2.1.2;
MARKETING_VERSION = 2.1.4;
OTHER_SWIFT_FLAGS = "$(inherited) -D PRODUCTION";
PRODUCT_BUNDLE_IDENTIFIER = com.sooum.prod;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand All @@ -4284,7 +4284,7 @@
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_ENTITLEMENTS = "SOOUM/Resources//SOOUM.entitlements";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 201020;
CURRENT_PROJECT_VERSION = 201040;
DEVELOPMENT_TEAM = 99FRG743RX;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = "SOOUM/Resources/Production/Info-prod.plist";
Expand All @@ -4306,7 +4306,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 2.1.2;
MARKETING_VERSION = 2.1.4;
OTHER_SWIFT_FLAGS = "$(inherited) -D PRODUCTION";
PRODUCT_BUNDLE_IDENTIFIER = com.sooum.prod;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand Down
13 changes: 6 additions & 7 deletions SOOUM/SOOUM/Base/BaseViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@

import UIKit

import Network

import RxKeyboard
import RxSwift

Expand All @@ -26,10 +24,6 @@ class BaseViewController: UIViewController {

var disposeBag = DisposeBag()

private let monitor = NWPathMonitor()

private let instabilityNetworkToastView = SOMBottomToastView(title: Text.instabilityNetworkToastTitle, actions: nil)

let activityIndicatorView = SOMActivityIndicatorView()
let loadingIndicatorView = SOMLoadingIndicatorView()

Expand Down Expand Up @@ -94,7 +88,12 @@ class BaseViewController: UIViewController {
.subscribe(with: self) { object, _ in
guard object.isViewLoaded, object.view.window != nil else { return }

var wrapper: SwiftEntryKitViewWrapper = object.instabilityNetworkToastView.sek
let instabilityNetworkToastView = SOMBottomToastView(
title: Text.instabilityNetworkToastTitle,
actions: nil
)

var wrapper: SwiftEntryKitViewWrapper = instabilityNetworkToastView.sek
wrapper.entryName = Text.bottomToastEntryName
wrapper.showBottomToast(verticalOffset: object.bottomToastMessageOffset, displayDuration: 4)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ final class CompositeInterceptor: RequestInterceptor {

private let interceptors: [RequestInterceptor]

private let timeoutInterval: TimeInterval = 20.0
private let timeoutInterval: TimeInterval = 10.0

init(provider: ManagerTypeDelegate) {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ final class ErrorInterceptor: RequestInterceptor {
URLError.cannotConnectToHost
]
if networkErrors.contains(urlError.code) {
self.showNetworkErrorDialog()
completion(.doNotRetry)
session.cancelAllRequests { [weak self] in self?.showNetworkErrorDialog() }
completion(.doNotRetryWithError(error))
return
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ struct NetworkManagerConfiguration: ManagerConfiguration {
) {

self.sessionConfiguration = sessionConfiguration
self.sessionConfiguration.timeoutIntervalForRequest = 20.0
self.sessionConfiguration.timeoutIntervalForResource = 20.0
self.sessionConfiguration.timeoutIntervalForRequest = 10.0
self.sessionConfiguration.timeoutIntervalForResource = 10.0

self.sessionDelegate = sessionDelegate
self.sessionDelegateQueue = sessionDelegateQueue
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ class SOMPageView: UICollectionViewCell {
contentsContainer.snp.makeConstraints {
$0.centerY.equalToSuperview()
$0.leading.equalTo(iconBackgroundView.snp.trailing).offset(10)
$0.trailing.greaterThanOrEqualToSuperview().offset(-16)
$0.trailing.equalToSuperview().offset(-16)
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -197,15 +197,17 @@ class SOMPageViews: UIView {
func setModels(_ models: [SOMPageModel]) {

self.indicatorContainer.arrangedSubviews.forEach { $0.removeFromSuperview() }
for index in 0..<models.count {
let indicator = UIView().then {
$0.backgroundColor = index == 0 ? .som.v2.gray600 : .som.v2.gray300
$0.layer.cornerRadius = 4 * 0.5
}
self.indicatorContainer.addArrangedSubview(indicator)
indicator.snp.makeConstraints {
$0.width.equalTo(index == 0 ? 8 : 4)
$0.height.equalTo(4)
if models.count > 1 {
for index in 0..<models.count {
let indicator = UIView().then {
$0.backgroundColor = index == 0 ? .som.v2.gray600 : .som.v2.gray300
$0.layer.cornerRadius = 4 * 0.5
}
self.indicatorContainer.addArrangedSubview(indicator)
indicator.snp.makeConstraints {
$0.width.equalTo(index == 0 ? 8 : 4)
$0.height.equalTo(4)
}
}
}

Expand Down Expand Up @@ -310,6 +312,8 @@ extension SOMPageViews: UICollectionViewDelegateFlowLayout {

private func infiniteScroll(_ scrollView: UIScrollView) {

guard self.models.count > 1 else { return }

let cellWidth: CGFloat = scrollView.bounds.width
let currentIndex: Int = Int(round(scrollView.contentOffset.x / cellWidth))

Expand Down
13 changes: 1 addition & 12 deletions SOOUM/SOOUM/Domain/Models/NoticeInfo.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import UIKit

struct NoticeInfo {
struct NoticeInfo: Hashable {

let id: String
let noticeType: NoticeType
Expand Down Expand Up @@ -69,17 +69,6 @@ extension NoticeInfo {
)
}

extension NoticeInfo: Hashable {

static func == (lhs: NoticeInfo, rhs: NoticeInfo) -> Bool {
return lhs.id == rhs.id
}

func hash(into hasher: inout Hasher) {
hasher.combine(self.id)
}
}

extension NoticeInfo: Decodable {

enum CodingKeys: String, CodingKey {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -634,17 +634,18 @@ extension DetailViewController: UICollectionViewDataSource {

cell.tags.tagDidTap
.throttle(.seconds(3), scheduler: MainScheduler.instance)
.do(onNext: {
GAHelper.shared.logEvent(
event: GAEvent.DetailView.cardDetailTag_btnClick(tag_name: $0.text)
)
})
.subscribe(with: self) { object, tagInfo in
let tagCollectViewController = TagCollectViewController()
tagCollectViewController.reactor = reactor.reactorForTagCollect(
with: tagInfo.id,
title: tagInfo.text
)
object.navigationPush(tagCollectViewController, animated: true) { _ in
GAHelper.shared.logEvent(
event: GAEvent.DetailView.cardDetailTag_btnClick(tag_name: tagInfo.text)
)
}
object.navigationPush(tagCollectViewController, animated: true)
}
.disposed(by: cell.disposeBag)

Expand Down Expand Up @@ -675,20 +676,20 @@ extension DetailViewController: UICollectionViewDataSource {
} else {

if prevCardInfo.isPrevCardDeleted {
reactor.action.onNext(.cleanup)

GAHelper.shared.logEvent(
event: GAEvent.DetailView.cardDetail_tracePathClick(
previous_path: .detail
)
)

let detailViewController = DetailViewController()
detailViewController.reactor = reactor.reactorForPush(
prevCardInfo.prevCardId,
hasDeleted: true
)
object.navigationPush(detailViewController, animated: true) { _ in
reactor.action.onNext(.cleanup)

GAHelper.shared.logEvent(
event: GAEvent.DetailView.cardDetail_tracePathClick(
previous_path: .detail
)
)
}
object.navigationPush(detailViewController, animated: true)
} else {
reactor.action.onNext(.willPushToDetail(prevCardInfo.prevCardId))
}
Expand Down Expand Up @@ -718,6 +719,7 @@ extension DetailViewController: UICollectionViewDataSource {
guard let reactor = self.reactor else { return footer }

footer.didTap
.throttle(.seconds(3), scheduler: MainScheduler.instance)
.subscribe(with: self) { object, selectedId in
let viewController = DetailViewController()
viewController.reactor = reactor.reactorForPush(selectedId)
Expand Down
Loading