File tree 1 file changed +8
-2
lines changed
1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ import {STARS_CURRENCY} from '../../lib/mtproto/mtproto_config';
18
18
import { attachClickEvent } from '../../helpers/dom/clickEvent' ;
19
19
import PopupPayment from './payment' ;
20
20
import wrapPeerTitle from '../wrappers/peerTitle' ;
21
+ import toggleDisability from '../../helpers/dom/toggleDisability' ;
21
22
22
23
export default class PopupStarGiftUpgrade extends PopupElement {
23
24
private constructor (
@@ -54,23 +55,28 @@ export default class PopupStarGiftUpgrade extends PopupElement {
54
55
if ( this . descriptionForPeerId ) {
55
56
this . hide ( ) ;
56
57
} else if ( freeUpgrade ) {
58
+ const toggle = toggleDisability ( this . btnConfirm , true ) ;
57
59
this . managers . appGiftsManager . upgradeStarGift (
58
60
this . gift . input ,
59
61
keepInfoSignal [ 0 ] ( )
60
- ) . then ( ( ) => this . hide ( ) ) ;
62
+ ) . then ( ( ) => this . hide ( ) , toggle ) ;
61
63
} else {
64
+ const toggle = toggleDisability ( this . btnConfirm , true ) ;
62
65
PopupPayment . create ( {
63
66
inputInvoice : {
64
67
_ : 'inputInvoiceStarGiftUpgrade' ,
65
68
stargift : this . gift . input ,
66
69
pFlags : {
67
70
keep_original_details : keepInfoSignal [ 0 ] ( ) ? true : undefined
68
71
}
69
- }
72
+ } ,
73
+ noShowIfStars : true
70
74
} ) . then ( ( popup ) => {
71
75
popup . addEventListener ( 'finish' , ( result ) => {
72
76
if ( result === 'paid' ) {
73
77
this . hide ( ) ;
78
+ } else {
79
+ toggle ( ) ;
74
80
}
75
81
} ) ;
76
82
} ) ;
You can’t perform that action at this time.
0 commit comments