Page Menu
Home
Musing Studio
Search
Configure Global Search
Log In
Files
F14177234
CollectionListModel.swift
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
774 B
Subscribers
None
CollectionListModel.swift
View Options
import
SwiftUI
import
CoreData
class
CollectionListModel
:
ObservableObject
{
@
Published
var
userCollections
=
[
WFACollection
]()
static
let
allPostsCollection
=
PostCollection
(
title
:
"All Posts"
)
static
let
draftsCollection
=
PostCollection
(
title
:
"Drafts"
)
init
()
{
// let request = WFACollection.createFetchRequest()
// request.sortDescriptors = []
// do {
// userCollections = try PersistenceManager.persistentContainer.viewContext.fetch(request)
// } catch {
// print("Error: Failed to fetch user collections from local store")
// userCollections = []
// }
}
func
clearUserCollection
()
{
userCollections
=
[]
// Clear collections from CoreData store.
}
}
File Metadata
Details
Attached
Mime Type
text/x-c++
Expires
Thu, Apr 2, 5:44 AM (18 h, 55 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3679326
Attached To
rWFSUI WriteFreely SwiftUI
Event Timeline
Log In to Comment