Skip to content

Commit 126e030

Browse files
added docs
1 parent e356537 commit 126e030

File tree

9 files changed

+31
-16
lines changed

9 files changed

+31
-16
lines changed

Sources/StreamChatSwiftUI/ChatChannel/Composer/DiscardAttachmentButton.swift

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -27,19 +27,3 @@ public struct DiscardAttachmentButton: View {
2727
}
2828
}
2929
}
30-
31-
/// View for the discard button.
32-
struct DiscardButtonView: View {
33-
34-
var body: some View {
35-
ZStack {
36-
Circle()
37-
.fill(Color.white)
38-
.frame(width: 16, height: 16)
39-
40-
Image(systemName: "xmark.circle.fill")
41-
.foregroundColor(Color.black.opacity(0.8))
42-
}
43-
.padding(.all, 4)
44-
}
45-
}

Sources/StreamChatSwiftUI/ChatChannel/Gallery/GalleryView.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import StreamChat
66
import SwiftUI
77

8+
/// View used for displaying image attachments in a gallery.
89
struct GalleryView: View {
910

1011
@Injected(\.colors) private var colors

Sources/StreamChatSwiftUI/ChatChannel/Gallery/GridPhotosView.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import StreamChat
66
import SwiftUI
77

8+
/// View used for displaying photos in a grid.
89
struct GridPhotosView: View {
910

1011
var imageURLs: [URL]

Sources/StreamChatSwiftUI/ChatChannel/Gallery/VideoPlayerView.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import AVKit
66
import StreamChat
77
import SwiftUI
88

9+
/// View used for displaying videos.
910
public struct VideoPlayerView: View {
1011
@Environment(\.presentationMode) var presentationMode
1112

Sources/StreamChatSwiftUI/ChatChannel/Gallery/ZoomableScrollView.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import Combine
66
import SwiftUI
77

8+
/// View used for displaying zoomable content.
89
struct ZoomableScrollView<Content: View>: View {
910
let content: Content
1011

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
//
2+
// Copyright © 2021 Stream.io Inc. All rights reserved.
3+
//
4+
5+
import SwiftUI
6+
7+
/// View for the discard button.
8+
struct DiscardButtonView: View {
9+
10+
var body: some View {
11+
ZStack {
12+
Circle()
13+
.fill(Color.white)
14+
.frame(width: 16, height: 16)
15+
16+
Image(systemName: "xmark.circle.fill")
17+
.foregroundColor(Color.black.opacity(0.8))
18+
}
19+
.padding(.all, 4)
20+
}
21+
}

Sources/StreamChatSwiftUI/CommonViews/GalleryHeaderView.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import StreamChat
66
import SwiftUI
77

8+
/// View used for the gallery header, for images and videos.
89
struct GalleryHeaderView: View {
910

1011
@Injected(\.colors) private var colors

Sources/StreamChatSwiftUI/CommonViews/TitleWithCloseButton.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
import SwiftUI
66

7+
/// View displaying a title and a close button.
78
struct TitleWithCloseButton: View {
89

910
@Injected(\.fonts) private var fonts

StreamChatSwiftUI.xcodeproj/project.pbxproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@
142142
848399F227601231003075E4 /* ReactionsOverlayView_Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 848399F127601231003075E4 /* ReactionsOverlayView_Tests.swift */; };
143143
849CDD942768E0E1003C7A51 /* MessageActionsResolver.swift in Sources */ = {isa = PBXBuildFile; fileRef = 849CDD932768E0E1003C7A51 /* MessageActionsResolver.swift */; };
144144
84A75FBB274EA29B00225CE8 /* GiphyAttachmentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84A75FBA274EA29B00225CE8 /* GiphyAttachmentView.swift */; };
145+
84AB7B1D2771F4AA00631A10 /* DiscardButtonView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84AB7B1C2771F4AA00631A10 /* DiscardButtonView.swift */; };
145146
84AD8425274E2C380098C3C4 /* ChatChannelScreen.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84AD8424274E2C380098C3C4 /* ChatChannelScreen.swift */; };
146147
84B288CD274C544B00DD090B /* CreateGroupView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84B288CC274C544B00DD090B /* CreateGroupView.swift */; };
147148
84B288CF274C545900DD090B /* CreateGroupViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84B288CE274C545900DD090B /* CreateGroupViewModel.swift */; };
@@ -420,6 +421,7 @@
420421
848399F127601231003075E4 /* ReactionsOverlayView_Tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReactionsOverlayView_Tests.swift; sourceTree = "<group>"; };
421422
849CDD932768E0E1003C7A51 /* MessageActionsResolver.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MessageActionsResolver.swift; sourceTree = "<group>"; };
422423
84A75FBA274EA29B00225CE8 /* GiphyAttachmentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GiphyAttachmentView.swift; sourceTree = "<group>"; };
424+
84AB7B1C2771F4AA00631A10 /* DiscardButtonView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DiscardButtonView.swift; sourceTree = "<group>"; };
423425
84AD8424274E2C380098C3C4 /* ChatChannelScreen.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChatChannelScreen.swift; sourceTree = "<group>"; };
424426
84B288CC274C544B00DD090B /* CreateGroupView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CreateGroupView.swift; sourceTree = "<group>"; };
425427
84B288CE274C545900DD090B /* CreateGroupViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CreateGroupViewModel.swift; sourceTree = "<group>"; };
@@ -690,6 +692,7 @@
690692
8465FCFA2746A95600AF091E /* ActionItemView.swift */,
691693
84F2908D276B92A40045472D /* GalleryHeaderView.swift */,
692694
8434E582277088D9001E1B83 /* TitleWithCloseButton.swift */,
695+
84AB7B1C2771F4AA00631A10 /* DiscardButtonView.swift */,
693696
);
694697
path = CommonViews;
695698
sourceTree = "<group>";
@@ -1343,6 +1346,7 @@
13431346
8465FDC92746A95700AF091E /* ChatChannelSwipeableListItem.swift in Sources */,
13441347
8465FDD32746A95800AF091E /* ColorPalette.swift in Sources */,
13451348
8465FD782746A95700AF091E /* FileAttachmentView.swift in Sources */,
1349+
84AB7B1D2771F4AA00631A10 /* DiscardButtonView.swift in Sources */,
13461350
8465FDAE2746A95700AF091E /* UIColor+Extensions.swift in Sources */,
13471351
8465FD6F2746A95700AF091E /* StreamChat.swift in Sources */,
13481352
8465FD8F2746A95700AF091E /* AttachmentUploadingStateView.swift in Sources */,

0 commit comments

Comments
 (0)