Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/seoyoung qa #114

Merged
merged 6 commits into from
Aug 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
14 changes: 6 additions & 8 deletions App/Sources/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ private extension AppDelegate {
case .home:
self.deeplinkable?.routeToMOITList()

case .detail:
case .details:
guard let id = query.split(separator: "=").last else { return false }
self.deeplinkable?.routeToDetail(id: "\(id)")

Expand Down Expand Up @@ -149,14 +149,12 @@ extension AppDelegate: UNUserNotificationCenterDelegate {
didReceive response: UNNotificationResponse,
withCompletionHandler completionHandler: @escaping () -> Void
) {
print("🤖", #function)
guard let urlString = response.notification.request.content.userInfo["url"] as? String else { return }
guard let path = urlString.split(separator: "://").last?.split(separator: "?").first as? String,
let qeury = urlString.split(separator: "://").last?.split(separator: "?").last as? String else { return }

guard let type = DeepLinkType(rawValue: path) else { return }
guard let urlString = response.notification.request.content.userInfo["urlScheme"] as? String,
let path = urlString.split(separator: "://").last?.split(separator: "?").first,
let qeury = urlString.split(separator: "://").last?.split(separator: "?").last else { return }

processDeeplink(query: qeury, type: type)
guard let type = DeepLinkType(rawValue: "\(path)") else { return }
processDeeplink(query: "\(qeury)", type: type)
}

func application(
Expand Down
2 changes: 1 addition & 1 deletion App/Sources/DeepLinkType.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import Foundation
*/
enum DeepLinkType: String {
case home
case detail
case details
case fine
case attendance
case attendanceResult
Expand Down
24 changes: 15 additions & 9 deletions Features/MOITAlarm/MOITAlarm/Implement/MOITAlarmInteractor.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,23 +19,25 @@ protocol MOITAlarmRouting: ViewableRouting {
protocol MOITAlarmPresentable: Presentable {
var listener: MOITAlarmPresentableListener? { get set }

func configure(_ collectionViewCellItems: [MOITAlarmCollectionViewCellItem])
func configure(_ collectionViewCellItems: [MOITAlarmCollectionViewCellItem])
}

protocol MOITAlarmInteractorDependency {
var fetchNotificationUseCase: FetchNotificationListUseCase { get }
var fetchNotificationUseCase: FetchNotificationListUseCase { get }
}

final class MOITAlarmInteractor: PresentableInteractor<MOITAlarmPresentable>, MOITAlarmInteractable, MOITAlarmPresentableListener {

final class MOITAlarmInteractor: PresentableInteractor<MOITAlarmPresentable>,
MOITAlarmInteractable,
MOITAlarmPresentableListener {

weak var router: MOITAlarmRouting?
weak var listener: MOITAlarmListener?
private let dependency: MOITAlarmInteractorDependency

private let dependency: MOITAlarmInteractorDependency
init(
presenter: MOITAlarmPresentable,
dependency: MOITAlarmInteractorDependency
presenter: MOITAlarmPresentable,
dependency: MOITAlarmInteractorDependency
) {
self.dependency = dependency
super.init(presenter: presenter)
Expand Down Expand Up @@ -67,6 +69,10 @@ final class MOITAlarmInteractor: PresentableInteractor<MOITAlarmPresentable>, MO
func didSwipeBack() {
listener?.didSwipeBackAlarm()
}

func didTapBack() {
listener?.didTapBackAlarm()
}

private func convertToMOITAlarmViewModel(entity: NotificationEntity) -> [MOITAlarmCollectionViewCellItem] {
entity.map { item in
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import RxSwift
protocol MOITAlarmPresentableListener: AnyObject {
func didSwipeBack()
func viewDidLoad()
func didTapBack()
}

final class MOITAlarmViewController: UIViewController,
Expand Down Expand Up @@ -98,7 +99,7 @@ final class MOITAlarmViewController: UIViewController,

private func bind() {
self.navigationView.leftItems?[0].rx.tap.subscribe(onNext: { [weak self] in
self?.listener?.didSwipeBack()
self?.listener?.didTapBack()
}).disposed(by: self.disposeBag)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ import Foundation

public protocol MOITAlarmListener: AnyObject {
func didSwipeBackAlarm()
func didTapBackAlarm()
}
Original file line number Diff line number Diff line change
Expand Up @@ -304,23 +304,30 @@ extension MOITListInteractor {
// MARK: - InputParticiateCode
extension MOITListInteractor {
func inputParticiateCodeDidTapBack() {
self.router?.detachInputParticipateCode(onlyPop: true)
self.router?.detachInputParticipateCode(onlyPop: true)
}

func moveToMOITListButtonDidTap() {
self.router?.detachInputParticipateCode(onlyPop: false)
}

func showMOITDetailButtonDidTap(moitID: Int) {
self.router?.detachInputParticipateCode(onlyPop: false)
self.router?.attachMOITDetail(id: "\(moitID)")
}


func moveToMOITListButtonDidTap() {
self.router?.detachInputParticipateCode(onlyPop: false)
}

func showMOITDetailButtonDidTap(moitID: Int) {
self.router?.detachInputParticipateCode(onlyPop: false)
self.router?.attachMOITDetail(id: "\(moitID)")
}
}

// MARK: - Alarm


extension MOITListInteractor {

func didSwipeBackAlarm() {
self.router?.detachAlarm(withPop: true)
self.router?.detachAlarm(withPop: false)
}

func didTapBackAlarm() {
self.router?.detachAlarm(withPop: true)
}
}

// MARK: - MOITListActionableItem
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import MOITParticipateUserInterface
import MOITParticipateDomain
import MOITDetail
import MOITDetailDomain

import FirebaseMessaging
import RIBs
import RxSwift

Expand Down Expand Up @@ -73,6 +73,11 @@ final class InputParticipateCodeInteractor: PresentableInteractor<InputParticipa
let moitDetailProfileInfoViewModel = self.convertToMOITDetailProfileInfoViewModel(
model: participateEntity
)
print("모👀잇 아이디 등록 MOIT-\(participateEntity.moitID)")
Messaging.messaging().subscribe(toTopic: "MOIT-\(participateEntity.moitID)") { error in
print("register topic subscribe error is 👉", error)
}

self.router?.attachPariticipationSuccess(with: moitDetailProfileInfoViewModel)
case .failure:
self.presenter.showErrorToast()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@ import FlexLayout
import ResourceKit

final class MOITSettingTitleCollectionViewCell: UICollectionViewCell {
private let flexRootview = UIView()
private let flexRootview: UIView = {
let view = UIView()
view.backgroundColor = .white
return view
}()
private let titleLabel: UILabel = {
let label = UILabel()
label.font = ResourceKitFontFamily.h6
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ final class MOITSettingViewController: UIViewController,
self.navigationController?.navigationBar.isHidden = true
view.backgroundColor = .white
self.flexRootView.backgroundColor = .white
self.collectionView.backgroundColor = .white
define()
configureCollectionView()
bind()
Expand All @@ -60,7 +61,7 @@ final class MOITSettingViewController: UIViewController,

override func viewDidLayoutSubviews() {
super.viewDidLayoutSubviews()
flexRootView.pin.top(view.pin.safeArea).bottom().horizontally()
flexRootView.pin.top(view.pin.safeArea.top).bottom().horizontally()
flexRootView.flex.layout()
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,12 @@ public final class ShareViewController: BottomSheetViewController,

private func presentUIActivity(item: String) {
let viewController = UIActivityViewController(
activityItems: [item],
activityItems: [
"""
MOIT쓰니 스터디 관리 왜 이렇게 편해잇!
여기로 당장 모잇 👉 \(item)
"""
],
applicationActivities: nil
)
viewController.excludedActivityTypes = [
Expand Down
Loading