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
3
3
struct PostListFilteredView : View {
4
4
@EnvironmentObject var model : WriteFreelyModel
5
5
6
+ @FetchRequest ( entity: WFACollection . entity ( ) , sortDescriptors: [ ] ) var collections : FetchedResults < WFACollection >
6
7
var fetchRequest : FetchRequest < WFAPost >
8
+ var showAllPosts : Bool
7
9
8
10
init ( filter: String ? , showAllPosts: Bool ) {
11
+ self . showAllPosts = showAllPosts
9
12
if showAllPosts {
10
13
fetchRequest = FetchRequest < WFAPost > (
11
14
entity: WFAPost . entity ( ) ,
@@ -37,7 +40,16 @@ struct PostListFilteredView: View {
37
40
tag: post,
38
41
selection: $model. selectedPost
39
42
) {
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
+ }
41
53
}
42
54
. deleteDisabled ( post. status != PostStatus . local. rawValue)
43
55
}
Original file line number Diff line number Diff line change 7
7
<key >WriteFreely-MultiPlatform (iOS).xcscheme_^#shared#^_ </key >
8
8
<dict >
9
9
<key >orderHint </key >
10
- <integer >0 </integer >
10
+ <integer >1 </integer >
11
11
</dict >
12
12
<key >WriteFreely-MultiPlatform (macOS).xcscheme_^#shared#^_ </key >
13
13
<dict >
14
14
<key >orderHint </key >
15
- <integer >1 </integer >
15
+ <integer >0 </integer >
16
16
</dict >
17
17
</dict >
18
18
</dict >
You can’t perform that action at this time.
0 commit comments