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

[SCRUM-105] mvp2차 QA 지현 - 2 #65

Merged
merged 2 commits into from
Dec 21, 2024
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
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,12 @@
// Copyright © 2024 PomoNyang. All rights reserved.
//

import AppService
import APIClientInterface
import UserServiceInterface
import CatServiceInterface
import UserNotificationClientInterface
import UserDefaultsClientInterface
import DatabaseClientInterface
import StreamListenerInterface
import DesignSystem
Expand Down Expand Up @@ -59,6 +61,7 @@ public struct SelectCatCore {
@Dependency(UserService.self) var userService
@Dependency(CatService.self) var catService
@Dependency(UserNotificationClient.self) var userNotificationClient
@Dependency(UserDefaultsClient.self) var userDefaultClient
@Dependency(DatabaseClient.self) var databaseClient
@Dependency(StreamListener.self) var streamListener

Expand Down Expand Up @@ -108,8 +111,10 @@ public struct SelectCatCore {
case ._setNextAction:
if state.route == .onboarding {
return .run { send in
// user notification 요청
_ = try await userNotificationClient.requestAuthorization([.alert, .badge, .sound])
let isGranted = try await userNotificationClient.requestAuthorization([.alert, .badge, .sound])
await setTimerAlarm(userDefaultsClient: self.userDefaultClient, isEnabled: isGranted)
await setDisturbAlarm(userDefaultsClient: self.userDefaultClient, isEnabled: isGranted)

await send(._moveToNamingCat)
}
} else {
Expand Down
2 changes: 1 addition & 1 deletion Projects/Feature/HomeFeature/Sources/Home/HomeView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ public struct HomeView: View {
if !store.isNetworkConnected {
VStack {
HStack(spacing: Alias.Spacing.small) {
DesignSystemAsset.Image._16NullPrimary.swiftUIImage
DesignSystemAsset.Image._16Offline.swiftUIImage
Text("오프라인 모드")
.font(Typography.bodySB)
.foregroundStyle(Alias.Color.Text.secondary)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ public struct MyPageCore {
private func core(state: inout State, action: Action) -> EffectOf<Self> {
switch action {
case .onAppear:
// TODO: userDefault get bool 은 옵셔널 값이 아니어서, 다른 방법을 사용해서 default setting 값 부여해야할듯
state.isTimerAlarmOn = getTimerAlarm(userDefaultsClient: self.userDefaultsClient)
state.isDisturbAlarmOn = getDisturbAlarm(userDefaultsClient: self.userDefaultsClient)
state.isLiveActivityOn = getLiveActivityState(userDefaultsClient: self.userDefaultsClient)
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"images" : [
{
"filename" : "16_offline.svg",
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading