Page MenuHomeMusing Studio

CollectionListModel.swift
No OneTemporary

CollectionListModel.swift

import SwiftUI
class CollectionListModel: ObservableObject {
private(set) var userCollections: [PostCollection] = []
@Published private(set) var collectionsList: [PostCollection] = [ allPostsCollection, draftsCollection ]
init(with userCollections: [PostCollection]) {
for userCollection in userCollections {
self.userCollections.append(userCollection)
}
collectionsList.append(contentsOf: self.userCollections)
}
func clearUserCollection() {
userCollections = []
collectionsList = [ allPostsCollection, draftsCollection ]
}
}

File Metadata

Mime Type
text/x-c++
Expires
Thu, Apr 2, 5:44 AM (14 h, 25 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3674249

Event Timeline