Skip to content

Commit

Permalink
Fix incorrect predicates used when syncPublishing is off
Browse files Browse the repository at this point in the history
  • Loading branch information
kean committed May 8, 2024
1 parent 746236e commit 7ca3bca
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions WordPress/Classes/ViewRelated/Post/PostListFilter.swift
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ import Foundation
let statuses: [BasePost.Status] = [.publish, .publishPrivate]

let predicate: NSPredicate
if FeatureFlag.syncPublishing.enabled {
if !FeatureFlag.syncPublishing.enabled {
let query =
// existing published/private posts
"(statusAfterSync = status AND status IN (%@))"
Expand Down Expand Up @@ -128,7 +128,7 @@ import Foundation
let statusesForLocalDrafts: [BasePost.Status] = [.draft, .pending, .publish, .publishPrivate, .scheduled]

let predicate: NSPredicate
if FeatureFlag.syncPublishing.enabled {
if !FeatureFlag.syncPublishing.enabled {
let query =
// Existing draft/pending posts
"(statusAfterSync = status AND status IN (%@))"
Expand Down Expand Up @@ -170,7 +170,7 @@ import Foundation
let statuses: [BasePost.Status] = [.scheduled]

let predicate: NSPredicate
if FeatureFlag.syncPublishing.enabled {
if !FeatureFlag.syncPublishing.enabled {
let query =
// existing scheduled posts
"(statusAfterSync = status AND status IN (%@))"
Expand Down Expand Up @@ -213,7 +213,7 @@ import Foundation
let statuses: [BasePost.Status] = [.draft, .pending, .publish, .publishPrivate, .scheduled]

let predicate: NSPredicate
if FeatureFlag.syncPublishing.enabled {
if !FeatureFlag.syncPublishing.enabled {
let query =
// Existing non-trashed posts
"(statusAfterSync = status AND status IN (%@))"
Expand Down

0 comments on commit 7ca3bca

Please sign in to comment.