mirror of
https://github.com/writeas/writefreely-swiftui-multiplatform.git
synced 2024-11-15 01:11:02 +00:00
Enable moving posts to Drafts
This commit is contained in:
parent
48625d4091
commit
5a488a2a70
@ -179,16 +179,8 @@ extension WriteFreelyModel {
|
||||
guard let loggedInClient = client,
|
||||
let postId = post.postId else { return }
|
||||
|
||||
if let newCollectionAlias = newCollection?.alias {
|
||||
post.collectionAlias = newCollectionAlias
|
||||
loggedInClient.movePost(postId: postId, to: newCollectionAlias, completion: movePostHandler)
|
||||
} else {
|
||||
// Moving a post to Drafts is not yet supported by the Swift package.
|
||||
DispatchQueue.main.async {
|
||||
post.collectionAlias = oldCollection?.alias
|
||||
self.selectedPost = nil
|
||||
}
|
||||
}
|
||||
post.collectionAlias = newCollection?.alias
|
||||
loggedInClient.movePost(postId: postId, to: newCollection?.alias, completion: movePostHandler)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1140,8 +1140,8 @@
|
||||
isa = XCRemoteSwiftPackageReference;
|
||||
repositoryURL = "git@github.com:writeas/writefreely-swift.git";
|
||||
requirement = {
|
||||
kind = upToNextMajorVersion;
|
||||
minimumVersion = 0.1.1;
|
||||
branch = "extend-move-api-to-drafts";
|
||||
kind = branch;
|
||||
};
|
||||
};
|
||||
/* End XCRemoteSwiftPackageReference section */
|
||||
|
Loading…
Reference in New Issue
Block a user