* iOS Share extension * Add Fastlane steps for iOS Share Extension * new multi file layout * Add recent label * Refactor code & identation * ux feedback * downsample images * remove options horizontal padding
33 lines
684 B
Swift
33 lines
684 B
Swift
//
|
|
// SingleAttachmentView.swift
|
|
// MattermostShare
|
|
//
|
|
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
|
// See LICENSE.txt for license information.
|
|
//
|
|
|
|
import SwiftUI
|
|
|
|
struct SingleAttachmentView: View {
|
|
var attachment: AttachmentModel
|
|
var hasError: Bool
|
|
|
|
var body: some View {
|
|
if (attachment.type == .image) {
|
|
ImageThumbnail(
|
|
attachment: attachment,
|
|
hasError: hasError
|
|
)
|
|
} else if (attachment.type == .video) {
|
|
VideoThumbnail(
|
|
attachment: attachment,
|
|
hasError: hasError
|
|
)
|
|
} else {
|
|
AttachmentInfoView(
|
|
attachment: attachment,
|
|
hasError: hasError
|
|
)
|
|
}
|
|
}
|
|
}
|