File tree Expand file tree Collapse file tree 2 files changed +15
-3
lines changed
WriteFreely-MultiPlatform.xcodeproj/xcuserdata/angelo.xcuserdatad/xcschemes Expand file tree Collapse file tree 2 files changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -3,9 +3,12 @@ import SwiftUI
33struct PostListFilteredView : View {
44 @EnvironmentObject var model : WriteFreelyModel
55
6+ @FetchRequest ( entity: WFACollection . entity ( ) , sortDescriptors: [ ] ) var collections : FetchedResults < WFACollection >
67 var fetchRequest : FetchRequest < WFAPost >
8+ var showAllPosts : Bool
79
810 init ( filter: String ? , showAllPosts: Bool ) {
11+ self . showAllPosts = showAllPosts
912 if showAllPosts {
1013 fetchRequest = FetchRequest < WFAPost > (
1114 entity: WFAPost . entity ( ) ,
@@ -37,7 +40,16 @@ struct PostListFilteredView: View {
3740 tag: post,
3841 selection: $model. selectedPost
3942 ) {
40- PostCellView ( post: post)
43+ if showAllPosts {
44+ if let collection = collections . filter { $0. alias == post. collectionAlias } . first {
45+ PostCellView ( post: post, collectionName: collection. title)
46+ } else {
47+ let collectionName = model. account. server == " https://write.as " ? " Anonymous " : " Drafts "
48+ PostCellView ( post: post, collectionName: collectionName)
49+ }
50+ } else {
51+ PostCellView ( post: post)
52+ }
4153 }
4254 . deleteDisabled ( post. status != PostStatus . local. rawValue)
4355 }
Original file line number Diff line number Diff line change 77 <key >WriteFreely-MultiPlatform (iOS).xcscheme_^#shared#^_ </key >
88 <dict >
99 <key >orderHint </key >
10- <integer >0 </integer >
10+ <integer >1 </integer >
1111 </dict >
1212 <key >WriteFreely-MultiPlatform (macOS).xcscheme_^#shared#^_ </key >
1313 <dict >
1414 <key >orderHint </key >
15- <integer >1 </integer >
15+ <integer >0 </integer >
1616 </dict >
1717 </dict >
1818</dict >
You can’t perform that action at this time.
0 commit comments