Skip to content

Display Single Image for Picture #8

Description

@0xLeif

Currently Picture only shows text for the initial images. We should display an Image if there is only one image. This will be the default behavior for Picture, there will be ways to customize the single or multiple images. This ticket should only focus on displaying a single image. A simple SwiftUI Image view would be fine.

The code is located in the Picture.swift file:

public var body: some View {
    Group {
        if sources.count == 1 {
            Text("Image") // Single Image
        } else {
            // ... 
        }
    }
    .sheet(isPresented: $isFullscreen) {
        fullscreenView
    }
    .onTapGesture {
        isFullscreen = true
    }
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions