Merge remote-tracking branch 'origin/main' into use_http_client_dess
This commit is contained in:
commit
aea49c38f1
1 changed files with 3 additions and 10 deletions
|
@ -11,7 +11,6 @@ import {
|
||||||
CreatePostLike,
|
CreatePostLike,
|
||||||
CreatePostReport,
|
CreatePostReport,
|
||||||
DeletePost,
|
DeletePost,
|
||||||
EditPost,
|
|
||||||
FeaturePost,
|
FeaturePost,
|
||||||
Language,
|
Language,
|
||||||
LockPost,
|
LockPost,
|
||||||
|
@ -27,7 +26,6 @@ import { getExternalHost, getHttpBase } from "../../env";
|
||||||
import { i18n } from "../../i18next";
|
import { i18n } from "../../i18next";
|
||||||
import { BanType, PostFormParams, PurgeType, VoteType } from "../../interfaces";
|
import { BanType, PostFormParams, PurgeType, VoteType } from "../../interfaces";
|
||||||
import { UserService } from "../../services";
|
import { UserService } from "../../services";
|
||||||
import { HttpService } from "../../services/HttpService";
|
|
||||||
import {
|
import {
|
||||||
amAdmin,
|
amAdmin,
|
||||||
amCommunityCreator,
|
amCommunityCreator,
|
||||||
|
@ -1452,14 +1450,9 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
|
||||||
this.setState({ showEdit: false });
|
this.setState({ showEdit: false });
|
||||||
}
|
}
|
||||||
|
|
||||||
async handleEditPost(form: EditPost) {
|
// The actual editing is done in the receive for post
|
||||||
const res = await HttpService.client.editPost(form);
|
handleEditPost() {
|
||||||
|
this.setState({ showEdit: false });
|
||||||
if (res.state === "success") {
|
|
||||||
this.setState({ showEdit: false });
|
|
||||||
}
|
|
||||||
|
|
||||||
return res;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
handleShare(i: PostListing) {
|
handleShare(i: PostListing) {
|
||||||
|
|
Loading…
Reference in a new issue