Skip to content

Commit

Permalink
Merge pull request #87 from TeamHY2/Fix/#83-Ranking&Home-QA
Browse files Browse the repository at this point in the history
[Fix] Ranking&HomeScreen QA 대응
  • Loading branch information
Seokki-Kwon authored Nov 12, 2024
2 parents dc20314 + 1b8546f commit 9f6f220
Show file tree
Hide file tree
Showing 42 changed files with 62 additions and 76 deletions.
Binary file modified .DS_Store
Binary file not shown.
10 changes: 7 additions & 3 deletions HongikYeolgong2.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@
47A147792CA158E800A91F66 /* MainTabView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 47A147782CA158E800A91F66 /* MainTabView.swift */; };
47A1477E2CA159E300A91F66 /* SplashView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 47A1477D2CA159E300A91F66 /* SplashView.swift */; };
47A147802CA15A4E00A91F66 /* OnboardingView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 47A1477F2CA15A4E00A91F66 /* OnboardingView.swift */; };
47A3DDC62CE3146700FEA779 /* Secrets-prod.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 47A3DDC52CE3146700FEA779 /* Secrets-prod.xcconfig */; };
47A540732CD0D90F00DC40D0 /* Nickname.swift in Sources */ = {isa = PBXBuildFile; fileRef = 47A540722CD0D90F00DC40D0 /* Nickname.swift */; };
47A9DCC32CE0DB97001DE76D /* WebView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 47A9DCC22CE0DB97001DE76D /* WebView.swift */; };
47B1D4AC2C9CB1740071B62B /* HongikYeolgong2App.swift in Sources */ = {isa = PBXBuildFile; fileRef = 47B1D4AB2C9CB1740071B62B /* HongikYeolgong2App.swift */; };
Expand Down Expand Up @@ -269,6 +270,7 @@
47A147782CA158E800A91F66 /* MainTabView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainTabView.swift; sourceTree = "<group>"; };
47A1477D2CA159E300A91F66 /* SplashView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SplashView.swift; sourceTree = "<group>"; };
47A1477F2CA15A4E00A91F66 /* OnboardingView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OnboardingView.swift; sourceTree = "<group>"; };
47A3DDC52CE3146700FEA779 /* Secrets-prod.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = "Secrets-prod.xcconfig"; sourceTree = "<group>"; };
47A540722CD0D90F00DC40D0 /* Nickname.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Nickname.swift; sourceTree = "<group>"; };
47A9DCC22CE0DB97001DE76D /* WebView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WebView.swift; sourceTree = "<group>"; };
47B1D4A82C9CB1740071B62B /* HongikYeolgong2.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = HongikYeolgong2.app; sourceTree = BUILT_PRODUCTS_DIR; };
Expand Down Expand Up @@ -794,6 +796,7 @@
children = (
47C815522CE257950017EA24 /* AuthKey_843UNB7W58.p8 */,
98B5F0092CDB362C007CF5FA /* Secrets-dev.xcconfig */,
47A3DDC52CE3146700FEA779 /* Secrets-prod.xcconfig */,
479821D32CA24CFF002357EB /* .swiftlint.yml */,
47B1D4AA2C9CB1740071B62B /* HongikYeolgong2 */,
47B1D4BB2C9CB1760071B62B /* HongikYeolgong2Tests */,
Expand Down Expand Up @@ -1105,6 +1108,7 @@
98B5F00A2CDB362C007CF5FA /* Secrets-dev.xcconfig in Resources */,
47A1476A2CA147A600A91F66 /* Pretendard-SemiBold.otf in Resources */,
47A147662CA147A600A91F66 /* Pretendard-ExtraLight.otf in Resources */,
47A3DDC62CE3146700FEA779 /* Secrets-prod.xcconfig in Resources */,
47A147712CA147A600A91F66 /* SUITE-Regular.otf in Resources */,
47A147652CA147A600A91F66 /* Pretendard-ExtraBold.otf in Resources */,
47B1D4B32C9CB1760071B62B /* Preview Assets.xcassets in Resources */,
Expand Down Expand Up @@ -1482,7 +1486,7 @@
};
47B1D4CE2C9CB1760071B62B /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 98B5F0092CDB362C007CF5FA /* Secrets-dev.xcconfig */;
baseConfigurationReference = 47A3DDC52CE3146700FEA779 /* Secrets-prod.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
Expand Down Expand Up @@ -1550,7 +1554,7 @@
};
47B1D4D12C9CB1760071B62B /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 98B5F0092CDB362C007CF5FA /* Secrets-dev.xcconfig */;
baseConfigurationReference = 47A3DDC52CE3146700FEA779 /* Secrets-prod.xcconfig */;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
BUNDLE_LOADER = "$(TEST_HOST)";
Expand Down Expand Up @@ -1590,7 +1594,7 @@
};
47B1D4D42C9CB1760071B62B /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 98B5F0092CDB362C007CF5FA /* Secrets-dev.xcconfig */;
baseConfigurationReference = 47A3DDC52CE3146700FEA779 /* Secrets-prod.xcconfig */;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
CODE_SIGN_STYLE = Automatic;
Expand Down
9 changes: 5 additions & 4 deletions HongikYeolgong2/Presentation/Home/HomeView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ struct HomeView: View {
VStack {
NavigationLink("",
destination: WebViewWithNavigation(url: SecretKeys.roomStatusUrl, title: "좌석")
.edgesIgnoringSafeArea(.bottom),
.edgesIgnoringSafeArea(.bottom),
isActive: $shouldShowWebView)

WeeklyStudyView(studyRecords: studyRecords)
Expand Down Expand Up @@ -75,11 +75,12 @@ struct HomeView: View {
.padding(.horizontal, 32.adjustToScreenWidth)
.modifier(IOSBackground())
.onAppear {
permissions.request(permission: .localNotifications)
weeklyStudyInteractor.getWeekyStudy(studyRecords: $studyRecords)
weeklyStudyInteractor.getWiseSaying(wiseSaying: $wiseSaying)
}
.onReceive(studySessionUpdated) { studySession = $0 }
.onReceive(studySessionUpdated) {
studySession = $0
}
.onReceive(studySessionEnded) { _ in
studySessionInteractor.endStudy()
}
Expand Down Expand Up @@ -123,7 +124,7 @@ extension HomeView {
.delay(for: 1, scheduler: RunLoop.main)
.map { _ in }
.eraseToAnyPublisher()
}
}
}

// MARK: - StudyContentControllerView
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,18 @@ struct WeeklyStudyCell: View {
var body: some View {
VStack(spacing: 0) {
Text(dayOfWeek.koreanString)
.font(.pretendard(size: 12, weight: .regular), lineHeight: 18)
.font(.pretendard(size: 12, weight: .regular), lineHeight: 18.adjustToScreenHeight)
.foregroundStyle(textColor)

Image(studyRecord.imageName)
.padding(.top, 8)
.padding(.bottom, 2)
VStack {
Image(studyRecord.imageName)
}
.frame(height: 28.adjustToScreenHeight)
.padding(.top, 8.adjustToScreenHeight)
.padding(.bottom, 2.adjustToScreenHeight)

Text(studyRecord.monthOfDay)
.font(.pretendard(size: 12, weight: .regular), lineHeight: 18)
.font(.pretendard(size: 12, weight: .regular), lineHeight: 18.adjustToScreenHeight)
.foregroundStyle(textColor)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,13 @@ struct WeeklyStudyView: View {
var body: some View {
HStack {
ForEach(Array(studyRecords.enumerated()), id: \.self.offset) { (offset, stduyRecord) in

if offset != 0 && offset != 7 {
Spacer()
}
WeeklyStudyCell(
dayOfWeek: .init(rawValue: offset) ?? .monday,
studyRecord: stduyRecord
)
if offset != 7 {
Spacer()
}
}
}
.padding(.top, 33.adjustToScreenHeight)
Expand Down
4 changes: 2 additions & 2 deletions HongikYeolgong2/Presentation/Ranking/RankingView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ struct RankingView: View {
Button(action: {
getPreviosWeeklyRanking()
}, label: {
Image(.leftArrow)
Image(.icCalendarLeft)
})
.frame(width: 36.adjustToScreenWidth, height: 36.adjustToScreenHeight)

Button(action: {
getNextWeeklyRanking()
}, label: {
Image(.rightArrow)
Image(.icCalendarRight)
})
.frame(width: 36.adjustToScreenWidth, height: 36.adjustToScreenHeight)
}
Expand Down
35 changes: 30 additions & 5 deletions HongikYeolgong2/Presentation/Root/InitialView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ import SwiftUI
import Combine

struct InitialView: View {
@Environment(\.injected) var injected: DIContainer
@Environment(\.injected.appState) var appState
@Environment(\.injected.interactors.userDataInteractor) var userDataInteractor
@Environment(\.injected.interactors.userPermissionsInteractor) var userPermissionsInteractor

@State private var userSession: AppState.UserSession = .pending

Expand All @@ -23,22 +25,45 @@ struct InitialView: View {
case .pending:
SplashView()
.ignoresSafeArea(.all)
.onAppear(perform: checkUserSession)
.onAppear { checkUserSession() }
}
}
.onReceive(userSessionUpdated) { userSession = $0 }
.onAppear {
resolveUserPermissions()
}
.onReceive(canRequestFirstPushPermissions) { _ in
requestUserPushPermissions()
}
.onReceive(userSessionUpdated) {
userSession = $0
}
}
}

private extension InitialView {
var userSessionUpdated: AnyPublisher<AppState.UserSession, Never> {
injected.appState.updates(for: \.userSession)
appState.updates(for: \.userSession)
}

var canRequestFirstPushPermissions: AnyPublisher<Void, Never> {
appState.updates(for: \.permissions.push)
.filter { $0 == .notRequested }
.map { _ in }
.eraseToAnyPublisher()
}
}

private extension InitialView {
func checkUserSession() {
injected.interactors.userDataInteractor.checkAuthentication()
userDataInteractor.checkAuthentication()
}

func resolveUserPermissions() {
userPermissionsInteractor.resolveStatus(for: .localNotifications)
}

func requestUserPushPermissions() {
userPermissionsInteractor.request(permission: .localNotifications)
}
}

Expand Down

This file was deleted.

Binary file not shown.
Binary file not shown.
Binary file not shown.

This file was deleted.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
{
"images" : [
{
"filename" : "rankingBoxDefault.png",
"filename" : "Rectangle 34624927.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "Group 2532@2x.png",
"filename" : "Rectangle 34624927@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "Group 2532@3x.png",
"filename" : "Rectangle 34624927@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
Expand Down
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"images" : [
{
"filename" : "shineCount00.png",
"filename" : "Vector.png",
"idiom" : "universal",
"scale" : "1x"
},
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"images" : [
{
"filename" : "shineCount01.png",
"filename" : "Vector.png",
"idiom" : "universal",
"scale" : "1x"
},
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"images" : [
{
"filename" : "shineCount02.png",
"filename" : "Vector.png",
"idiom" : "universal",
"scale" : "1x"
},
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"images" : [
{
"filename" : "shineCount03.png",
"filename" : "Vector.png",
"idiom" : "universal",
"scale" : "1x"
},
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Diff not rendered.

0 comments on commit 9f6f220

Please sign in to comment.