Page Menu
Home
Musing Studio
Search
Configure Global Search
Log In
Files
F14172120
CollectionListView.swift
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
835 B
Subscribers
None
CollectionListView.swift
View Options
import
SwiftUI
struct
CollectionListView
:
View
{
@
EnvironmentObject
var
model
:
WriteFreelyModel
var
body
:
some
View
{
List
{
ForEach
(
model
.
collections
.
collectionsList
)
{
collection
in
NavigationLink
(
destination
:
PostListView
(
selectedCollection
:
collection
)
)
{
Text
(
collection
.
title
)
}
}
}
.
navigationTitle
(
"Collections"
)
.
listStyle
(
SidebarListStyle
())
}
}
struct
CollectionSidebar_Previews
:
PreviewProvider
{
static
var
previews
:
some
View
{
let
model
=
WriteFreelyModel
()
model
.
collections
=
CollectionListModel
(
with
:
[
userCollection1
,
userCollection2
,
userCollection3
])
return
CollectionListView
()
.
environmentObject
(
model
)
}
}
File Metadata
Details
Attached
Mime Type
text/x-c
Expires
Thu, Apr 2, 2:49 AM (1 d, 13 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3678980
Attached To
rWFSUI WriteFreely SwiftUI
Event Timeline
Log In to Comment