mirror of
https://github.com/writeas/writefreely-swiftui-multiplatform.git
synced 2024-11-15 01:11:02 +00:00
Exclude local posts from showing remote-copy-deleted prompt
This commit is contained in:
parent
58e2aff6d7
commit
4c9f5d3348
@ -56,7 +56,7 @@ struct PostEditorStatusToolbarView: View {
|
||||
})
|
||||
}
|
||||
#endif
|
||||
} else if post.wasDeletedFromServer {
|
||||
} else if post.wasDeletedFromServer && post.status != PostStatus.local.rawValue {
|
||||
#if os(iOS)
|
||||
if horizontalSizeClass == .compact {
|
||||
VStack {
|
||||
@ -137,3 +137,16 @@ struct PESTView_OutdatedLocalCopyPreviews: PreviewProvider {
|
||||
.environmentObject(model)
|
||||
}
|
||||
}
|
||||
|
||||
struct PESTView_DeletedRemoteCopyPreviews: PreviewProvider {
|
||||
static var previews: some View {
|
||||
let context = LocalStorageManager.persistentContainer.viewContext
|
||||
let model = WriteFreelyModel()
|
||||
let testPost = WFAPost(context: context)
|
||||
testPost.status = PostStatus.published.rawValue
|
||||
testPost.wasDeletedFromServer = true
|
||||
|
||||
return PostEditorStatusToolbarView(post: testPost)
|
||||
.environmentObject(model)
|
||||
}
|
||||
}
|
||||
|
@ -7,12 +7,12 @@
|
||||
<key>WriteFreely-MultiPlatform (iOS).xcscheme_^#shared#^_</key>
|
||||
<dict>
|
||||
<key>orderHint</key>
|
||||
<integer>1</integer>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
<key>WriteFreely-MultiPlatform (macOS).xcscheme_^#shared#^_</key>
|
||||
<dict>
|
||||
<key>orderHint</key>
|
||||
<integer>0</integer>
|
||||
<integer>1</integer>
|
||||
</dict>
|
||||
</dict>
|
||||
</dict>
|
||||
|
Loading…
Reference in New Issue
Block a user