sovled #100
This commit is contained in:
@@ -29,59 +29,64 @@ struct SharingListView: View {
|
||||
@Published var fuckingWrappedShrable: WrappedSharable? = nil
|
||||
@Published var showFuckingSheet = false
|
||||
}
|
||||
|
||||
|
||||
@StateObject private var selectedShare = StupidAssObservableObject()
|
||||
var sharebleItems = [WrappedSharable]()
|
||||
|
||||
let sharebleItems: [WrappedSharable] = [
|
||||
WrappedSharable(preview: AnyView(
|
||||
AllMoodsTotalTemplate(isPreview: true,
|
||||
startDate: PersistenceController.shared.earliestEntry?.forDate ?? Date(),
|
||||
endDate: Date(),
|
||||
fakeData: false)
|
||||
),destination: AnyView(
|
||||
AllMoodsTotalTemplate(isPreview: false,
|
||||
startDate: PersistenceController.shared.earliestEntry?.forDate ?? Date(),
|
||||
endDate: Date(),
|
||||
fakeData: false)
|
||||
),description: AllMoodsTotalTemplate.description),
|
||||
//////////////////////////////////////////////////////////
|
||||
WrappedSharable(preview: AnyView(
|
||||
CurrentStreakTemplate(isPreview: true,
|
||||
startDate: Calendar.current.date(byAdding: .day, value: -10, to: Date())!,
|
||||
endDate: Date(),
|
||||
fakeData: false)
|
||||
), destination: AnyView(
|
||||
CurrentStreakTemplate(isPreview: false,
|
||||
startDate: Calendar.current.date(byAdding: .day, value: -10, to: Date())!,
|
||||
endDate: Date(),
|
||||
fakeData: false)
|
||||
), description: CurrentStreakTemplate.description),
|
||||
//////////////////////////////////////////////////////////
|
||||
WrappedSharable(preview: AnyView(
|
||||
LongestStreakTemplate(isPreview: true,
|
||||
startDate: PersistenceController.shared.earliestEntry?.forDate ?? Date(),
|
||||
endDate: Date(),
|
||||
fakeData: false)
|
||||
), destination: AnyView(
|
||||
LongestStreakTemplate(isPreview: false,
|
||||
startDate: PersistenceController.shared.earliestEntry?.forDate ?? Date(),
|
||||
endDate: Date(),
|
||||
fakeData: false)
|
||||
), description: LongestStreakTemplate.description),
|
||||
//////////////////////////////////////////////////////////
|
||||
WrappedSharable(preview: AnyView(
|
||||
MonthTotalTemplate(isPreview: true,
|
||||
startDate: Date().startOfMonth,
|
||||
endDate: Date().endOfMonth,
|
||||
fakeData: false)
|
||||
), destination: AnyView(
|
||||
MonthTotalTemplate(isPreview: false,
|
||||
startDate: Date().startOfMonth,
|
||||
endDate: Date().endOfMonth,
|
||||
fakeData: false)
|
||||
), description: MonthTotalTemplate.description),
|
||||
//////////////////////////////////////////////////////////
|
||||
]
|
||||
init() {
|
||||
self.sharebleItems = [
|
||||
WrappedSharable(preview: AnyView(
|
||||
AllMoodsTotalTemplate(isPreview: true,
|
||||
startDate: PersistenceController.shared.earliestEntry?.forDate ?? Date(),
|
||||
endDate: Date(),
|
||||
fakeData: false)
|
||||
),destination: AnyView(
|
||||
AllMoodsTotalTemplate(isPreview: false,
|
||||
startDate: PersistenceController.shared.earliestEntry?.forDate ?? Date(),
|
||||
endDate: Date(),
|
||||
fakeData: false)
|
||||
),description: AllMoodsTotalTemplate.description),
|
||||
//////////////////////////////////////////////////////////
|
||||
WrappedSharable(preview: AnyView(
|
||||
CurrentStreakTemplate(isPreview: true,
|
||||
startDate: Calendar.current.date(byAdding: .day, value: -10, to: Date())!,
|
||||
endDate: Date(),
|
||||
fakeData: false)
|
||||
), destination: AnyView(
|
||||
CurrentStreakTemplate(isPreview: false,
|
||||
startDate: Calendar.current.date(byAdding: .day, value: -10, to: Date())!,
|
||||
endDate: Date(),
|
||||
fakeData: false)
|
||||
), description: CurrentStreakTemplate.description),
|
||||
//////////////////////////////////////////////////////////
|
||||
WrappedSharable(preview: AnyView(
|
||||
LongestStreakTemplate(isPreview: true,
|
||||
startDate: PersistenceController.shared.earliestEntry?.forDate ?? Date(),
|
||||
endDate: Date(),
|
||||
fakeData: false)
|
||||
), destination: AnyView(
|
||||
LongestStreakTemplate(isPreview: false,
|
||||
startDate: PersistenceController.shared.earliestEntry?.forDate ?? Date(),
|
||||
endDate: Date(),
|
||||
fakeData: false)
|
||||
), description: LongestStreakTemplate.description),
|
||||
//////////////////////////////////////////////////////////
|
||||
WrappedSharable(preview: AnyView(
|
||||
MonthTotalTemplate(isPreview: true,
|
||||
startDate: Date().startOfMonth,
|
||||
endDate: Date().endOfMonth,
|
||||
fakeData: false)
|
||||
), destination: AnyView(
|
||||
MonthTotalTemplate(isPreview: false,
|
||||
startDate: Date().startOfMonth,
|
||||
endDate: Date().endOfMonth,
|
||||
fakeData: false)
|
||||
), description: MonthTotalTemplate.description)
|
||||
//////////////////////////////////////////////////////////
|
||||
]
|
||||
}
|
||||
|
||||
|
||||
|
||||
func didDismiss() {
|
||||
selectedShare.showFuckingSheet = false
|
||||
@@ -144,6 +149,10 @@ struct SharingListView: View {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
func share(image: UIImage) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
struct SharingView_Previews: PreviewProvider {
|
||||
|
||||
Reference in New Issue
Block a user