diff --git a/src/app/shell/components/modals/post-publish-modal/post-publish-modal.component.html b/src/app/shell/components/modals/post-publish-modal/post-publish-modal.component.html
index 49e1e59..72a6405 100644
--- a/src/app/shell/components/modals/post-publish-modal/post-publish-modal.component.html
+++ b/src/app/shell/components/modals/post-publish-modal/post-publish-modal.component.html
@@ -19,7 +19,7 @@
Prepare your story for readers
[displayBy]="'hashtag'"
>
-
-
+
diff --git a/src/app/shell/components/modals/post-publish-modal/post-publish-modal.component.ts b/src/app/shell/components/modals/post-publish-modal/post-publish-modal.component.ts
index 1b194b5..c70f4fe 100644
--- a/src/app/shell/components/modals/post-publish-modal/post-publish-modal.component.ts
+++ b/src/app/shell/components/modals/post-publish-modal/post-publish-modal.component.ts
@@ -5,8 +5,8 @@ import { PostService } from '@app/shared/services/post.service';
import { Post } from '@app/shared/interfaces';
import { WalletService, ICurrencyConversion, ICurrencyConversionResponse } from '@app/shared/services/wallet.service';
-let bodyHTML: string = '';
-let _bodyHTML: string = '';
+let bodyHTML = '';
+let _bodyHTML = '';
const ridMapFunction = (j: number, el: any) => {
const $el = $(el);
@@ -54,12 +54,13 @@ const getRidOfStackeditWrapper = (body: string) => {
})
export class PostPublishModalComponent {
post: Post;
+ paidSectionEnabled: boolean;
paidSectionCostInUSD: number;
bchUsdRate: number;
- showPaidSectionCostInUSD: boolean = false;
+ showPaidSectionCostInUSD = false;
bodyHTML: string;
- paidSectionLinebreakEnd: number = 0;
- paidSectionLineBreakTouched: boolean = false;
+ paidSectionLinebreakEnd = 0;
+ paidSectionLineBreakTouched = false;
constructor(
public activeModal: NgbActiveModal,
@@ -73,6 +74,10 @@ export class PostPublishModalComponent {
this.bodyHTML = getRidOfStackeditWrapper(this.bodyHTML);
this.paidSectionLinebreakEnd = $(this.bodyHTML).length;
+ setTimeout(() => {
+ this.paidSectionEnabled = this.post.parentPostId ? false : true;
+ });
+
if (!this.bchUsdRate) {
this.walletService.getCurrencyData().subscribe((response: ICurrencyConversionResponse) => {
this.bchUsdRate = Number(response.data.rates.USD);