Skip to content
Closed
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
8 changes: 8 additions & 0 deletions ByeBoo-iOS/ByeBoo-iOS/Data/DataDependencyAssembler.swift
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,14 @@ struct DataDependencyAssembler: DependencyAssembler {
DIContainer.shared.register(type: NotificationInterface.self) { _ in
return DefaultNotificationRepository(networkService: networkService)
}

DIContainer.shared.register(type: DefaultNotificationTokenRepository.self) { _ in
return DefaultNotificationTokenRepository(
network: networkService,
userDefaultsService: userDefaultService,
keychainService: keychainService
)
}
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// NotificationInterface.swift
// NotificationTokenInterface.swift
// ByeBoo-iOS
//
// Created by APPLE on 11/26/25.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,8 @@ final class NotificationsViewController: BaseViewController {
action: #selector(back)
)

guard let notifications = notificationList?.notifications else {
return
}

rootView.contentView.decideNoticeContent(isExistNotice: !notifications.isEmpty)
let isExistNotice = notificationList.map { !$0.notifications.isEmpty } ?? false
rootView.contentView.decideNoticeContent(isExistNotice: isExistNotice)
}

override func setAddTarget() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,6 @@ final class NotificationsViewModel {
}

func formatElapsedTime(from timeString: String) -> String? {
guard let formattedTime = formatElapsedTimeUseCase.execute(from: timeString) else {
return nil
}

return formattedTime
formatElapsedTimeUseCase.execute(from: timeString)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ extension CommonQuestViewModel {
}

func getWrittenAt(at index: Int) -> String? {
formatElapsedTimeUseCase.execute(from: answers[index].writtenAt)
guard index >= 0 && index < answers.count else { return nil }
return formatElapsedTimeUseCase.execute(from: answers[index].writtenAt)
}
}