Huge refactor to add better structure to the project. Separating features with their associated view and model structure. This should be better organization and will allow us to improve the overall architecture in the future. I forsee many more improvements that can follow this change. e.g. MVVM Arch As well as cleaning up duplicate, unused, functionality. Many files have global functions that can also be moved or be renamed. damus/ ├── Features/ │ ├── <Feature>/ │ │ ├── Views/ │ │ └── Models/ ├── Shared/ │ ├── Components/ │ ├── Media/ │ ├── Buttons/ │ ├── Extensions/ │ ├── Empty Views/ │ ├── ErrorHandling/ │ ├── Modifiers/ │ └── Utilities/ ├── Core/ │ ├── Nostr/ │ ├── NIPs/ │ ├── DIPs/ │ ├── Types/ │ ├── Networking/ │ └── Storage/ Signed-off-by: ericholguin <ericholguin@apache.org>
32 lines
853 B
Swift
32 lines
853 B
Swift
//
|
|
// ProfilePicturesView.swift
|
|
// damus
|
|
//
|
|
// Created by William Casarin on 2023-02-22.
|
|
//
|
|
|
|
import SwiftUI
|
|
|
|
struct ProfilePicturesView: View {
|
|
let state: DamusState
|
|
let pubkeys: [Pubkey]
|
|
|
|
var body: some View {
|
|
HStack {
|
|
ForEach(pubkeys.prefix(8), id: \.self) { pubkey in
|
|
ProfilePicView(pubkey: pubkey, size: 32.0, highlight: .none, profiles: state.profiles, disable_animation: state.settings.disable_animation)
|
|
.onTapGesture {
|
|
state.nav.push(route: Route.ProfileByKey(pubkey: pubkey))
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
struct ProfilePicturesView_Previews: PreviewProvider {
|
|
static var previews: some View {
|
|
let pubkey = test_note.pubkey
|
|
ProfilePicturesView(state: test_damus_state, pubkeys: [pubkey, pubkey])
|
|
}
|
|
}
|