Skip to content

Commit

Permalink
Merge pull request #100 from Nexters/feature/#99
Browse files Browse the repository at this point in the history
feat: 네비게이션 아이템 isHidden 수정
  • Loading branch information
haeseoklee authored Dec 30, 2024
2 parents 01ba3b9 + 7cd158d commit 718fca9
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
12 changes: 12 additions & 0 deletions Projects/Domain/Competition/Interface/Sources/Competition.swift
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,18 @@ public extension Competition {
}
}

public extension Competition.Status {

var isCreated: Bool {
switch self {
case .created:
return true
default:
return false
}
}
}

public extension MissionStatus {

func toCompetitionStatus(hasOtherPlayer: Bool) -> Competition.Status {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,7 @@ struct HomeNavigationBarView: View {
.onTapGesture {
store.send(.didTapMissionInfoGuideToolTip)
}
.isHidden(
store.isMissionInfoGuideToolTipShowed || store.competition?.status != .created(hasOtherPlayer: true),
remove: true
)
.isHidden(store.isMissionInfoGuideToolTipShowed, remove: true)
}

Spacer()
Expand All @@ -49,18 +46,17 @@ struct HomeNavigationBarView: View {
.frame(width: 28, height: 28)
.foregroundColor(SharedDesignSystemAsset.Colors.gray1.swiftUIColor)
}
.isHidden(store.competition?.board.isDisabled == false || !store.isMeHost, remove: true)
.isHidden(!((store.competition?.status.isCreated) ?? false), remove: true)
.overlay {
SharedDesignSystemAsset.Images.invitationCodeGuideToolTip.swiftUIImage
.resizable()
.frame(width: 161, height: 72)
.offset(x: -42, y: 50)

.onTapGesture {
store.send(.didTapInvitationInfoToolTip)
}
.isHidden(
store.isInvitationGuideToolTipShowed || store.competition?.status != .created(hasOtherPlayer: false) || !store.isMeHost,
store.isInvitationGuideToolTipShowed || !((store.competition?.status.isCreated) ?? false),
remove: true
)
}
Expand Down

0 comments on commit 718fca9

Please sign in to comment.