Skip to content

Commit

Permalink
[FIX/#177] Marker 아이콘 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkySide committed Nov 3, 2024
1 parent d627eb2 commit 87f2ad1
Show file tree
Hide file tree
Showing 9 changed files with 21 additions and 36 deletions.
7 changes: 2 additions & 5 deletions PLAT/PLAT/Domain/UseCase/AuthUseCase.swift
Original file line number Diff line number Diff line change
Expand Up @@ -107,11 +107,8 @@ extension AuthUseCase {
Task {
let result = await memberService.fetchProfile()
switch result {
case .success(let user):
state.user = user

case .failure(let error):
print(error) // TODO: 에러 처리
case .success(let user): state.user = user
case .failure(let error): print(error)
}
}

Expand Down
6 changes: 3 additions & 3 deletions PLAT/PLAT/Domain/UseCase/TrackUseCase.swift
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ extension TrackUseCase {
let result = await trackService.fetchCurrent(trackId: id)
switch result {
case .success(let track): self.currentTrack = track
case .failure(let error): print(error) // TODO: 에러 처리
case .failure(let error): print(error)
}
}

Expand All @@ -180,7 +180,7 @@ extension TrackUseCase {
)
switch uploadTrackResult {
case .success: break
case .failure(let error): print(error) // TODO: 에러 처리
case .failure(let error): print(error)
}
}

Expand All @@ -189,7 +189,7 @@ extension TrackUseCase {
let result = await trackService.report(trackId: trackId)
switch result {
case .success: break
case .failure(let error): print(error) // TODO: 에러 처리
case .failure(let error): print(error)
}
}
}
Expand Down
23 changes: 7 additions & 16 deletions PLAT/PLAT/Presentaion/TrackFeed/TrackFeedView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,7 @@ private struct FeedList: View {
ScrollView {
LazyVStack {
ForEach(Array(trackList.enumerated()), id: \.offset) { index, track in
FeedRowView(
currentTrack: $musicControlUseCase.state.currentTrack,
FeedRow(
isLoading: $isLoading,
isNonePlaylistToastPresented: $isNonePlaylistToastPresented,
track: track,
Expand Down Expand Up @@ -156,24 +155,18 @@ private struct FeedList: View {
}
}

// MARK: - FeedRowView
// MARK: - FeedRow

private struct FeedRowView: View {
private struct FeedRow: View {

@Environment(MusicControlUseCase.self) private var musicControlUseCase
@Environment(UserUseCase.self) private var userUseCase
@Environment(AuthUseCase.self) private var authUseCase
@Environment(TrackUseCase.self) private var trackUseCase
@Environment(PathModel.self) private var pathModel

@State private var isPaused = true

@Binding private(set) var currentTrack: Track?
@Binding private(set) var isLoading: Bool
@Binding private(set) var isNonePlaylistToastPresented: Bool

let track: Track
let address: String?
let address: String

var body: some View {
VStack(spacing: 0) {
Expand All @@ -185,7 +178,7 @@ private struct FeedRowView: View {
HStack(spacing: 0) {
VStack(alignment: . leading, spacing: 2) {
FeedHeaderView(track: track)
FeedLocationView(address: address ?? "", track: track)
FeedLocationView(address: address, track: track)
}

Spacer()
Expand Down Expand Up @@ -223,10 +216,8 @@ private struct FeedRowView: View {

Rectangle()
.foregroundColor(.gray9)
.frame(width: UIScreen.main.bounds.width, height: 1)
}
.onAppear {
authUseCase.effect(.fetchProfile)
.frame(maxWidth: .infinity)
.frame(height: 1)
}
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,8 @@
{
"images" : [
{
"filename" : "img_feedloacation.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
"filename" : "Pin.svg",
"idiom" : "universal"
}
],
"info" : {
Expand Down
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" : "Mask group.png",
"filename" : "Pin.svg",
"idiom" : "universal"
}
],
Expand Down
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.

0 comments on commit 87f2ad1

Please sign in to comment.