feat(image): 메인 라이브 탭에 DownsampledKFImage 적용
- 수평 리스트 HStack → LazyHStack으로 교체해 프리로딩/메모리 개선
This commit is contained in:
		@@ -27,11 +27,11 @@ struct LiveNowItemView: View {
 | 
				
			|||||||
            VStack(spacing: 0) {
 | 
					            VStack(spacing: 0) {
 | 
				
			||||||
                ZStack(alignment: .bottom) {
 | 
					                ZStack(alignment: .bottom) {
 | 
				
			||||||
                    ZStack {
 | 
					                    ZStack {
 | 
				
			||||||
                        KFImage(URL(string: item.creatorProfileImage))
 | 
					                        DownsampledKFImage(
 | 
				
			||||||
                            .cancelOnDisappear(true)
 | 
					                            url: URL(string: item.creatorProfileImage),
 | 
				
			||||||
                            .resizable()
 | 
					                            size: CGSize(width: 72, height: 72)
 | 
				
			||||||
                            .frame(width: 72, height: 72)
 | 
					                        )
 | 
				
			||||||
                            .clipShape(Circle())
 | 
					                        .clipShape(Circle())
 | 
				
			||||||
                    }
 | 
					                    }
 | 
				
			||||||
                    .frame(width: 84, height: 84)
 | 
					                    .frame(width: 84, height: 84)
 | 
				
			||||||
                    .overlay {
 | 
					                    .overlay {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -42,7 +42,7 @@ struct SectionLiveNowView: View {
 | 
				
			|||||||
            
 | 
					            
 | 
				
			||||||
            if items.count > 0 {
 | 
					            if items.count > 0 {
 | 
				
			||||||
                ScrollView(.horizontal, showsIndicators: false) {
 | 
					                ScrollView(.horizontal, showsIndicators: false) {
 | 
				
			||||||
                    HStack(alignment: .top, spacing: 16) {
 | 
					                    LazyHStack(alignment: .top, spacing: 16) {
 | 
				
			||||||
                        ForEach(items, id: \.self) { item in
 | 
					                        ForEach(items, id: \.self) { item in
 | 
				
			||||||
                            LiveNowItemView(item: item)
 | 
					                            LiveNowItemView(item: item)
 | 
				
			||||||
                                .contentShape(Rectangle())
 | 
					                                .contentShape(Rectangle())
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -17,13 +17,11 @@ struct LiveReservationItemView: View {
 | 
				
			|||||||
    var body: some View {
 | 
					    var body: some View {
 | 
				
			||||||
        HStack(spacing: 16) {
 | 
					        HStack(spacing: 16) {
 | 
				
			||||||
            ZStack(alignment: .topLeading) {
 | 
					            ZStack(alignment: .topLeading) {
 | 
				
			||||||
                KFImage(URL(string: item.creatorProfileImage))
 | 
					                DownsampledKFImage(
 | 
				
			||||||
                    .cancelOnDisappear(true)
 | 
					                    url: URL(string: item.creatorProfileImage),
 | 
				
			||||||
                    .resizable()
 | 
					                    size: CGSize(width: 100, height: 100)
 | 
				
			||||||
                    .scaledToFill()
 | 
					                )
 | 
				
			||||||
                    .frame(width: 100, height: 100, alignment: .top)
 | 
					                .cornerRadius(16)
 | 
				
			||||||
                    .cornerRadius(16)
 | 
					 | 
				
			||||||
                    .clipped()
 | 
					 | 
				
			||||||
                
 | 
					                
 | 
				
			||||||
                if item.isPrivateRoom {
 | 
					                if item.isPrivateRoom {
 | 
				
			||||||
                    Image("ic_lock")
 | 
					                    Image("ic_lock")
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -29,13 +29,11 @@ struct MyLiveReservationItemView: View {
 | 
				
			|||||||
            
 | 
					            
 | 
				
			||||||
            HStack(spacing: 16) {
 | 
					            HStack(spacing: 16) {
 | 
				
			||||||
                ZStack(alignment: .topLeading) {
 | 
					                ZStack(alignment: .topLeading) {
 | 
				
			||||||
                    KFImage(URL(string: item.creatorProfileImage))
 | 
					                    DownsampledKFImage(
 | 
				
			||||||
                        .cancelOnDisappear(true)
 | 
					                        url: URL(string: item.creatorProfileImage),
 | 
				
			||||||
                        .resizable()
 | 
					                        size: CGSize(width: 100, height: 100)
 | 
				
			||||||
                        .scaledToFill()
 | 
					                    )
 | 
				
			||||||
                        .frame(width: 100, height: 100, alignment: .top)
 | 
					                    .cornerRadius(16)
 | 
				
			||||||
                        .cornerRadius(16)
 | 
					 | 
				
			||||||
                        .clipped()
 | 
					 | 
				
			||||||
                    
 | 
					                    
 | 
				
			||||||
                    if item.isPrivateRoom {
 | 
					                    if item.isPrivateRoom {
 | 
				
			||||||
                        Image("ic_lock")
 | 
					                        Image("ic_lock")
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user