mirror of
https://github.com/smogon/pokemon-showdown-client.git
synced 2026-05-05 21:16:26 -05:00
Closing PM window cancels challenge
This commit is contained in:
parent
2aa9f87644
commit
9c689df401
|
|
@ -109,6 +109,10 @@
|
|||
if ($rejectButton.length) {
|
||||
this.rejectChallenge(userid, $rejectButton);
|
||||
}
|
||||
$rejectButton = $pmWindow.find('button[name=cancelChallenge]');
|
||||
if ($rejectButton.length) {
|
||||
this.cancelChallenge(userid, $rejectButton);
|
||||
}
|
||||
|
||||
var $next = $pmWindow.next();
|
||||
while ($next.length && $next.css('display') === 'none') {
|
||||
|
|
@ -204,7 +208,7 @@
|
|||
if ($challenge.find('button[name=acceptChallenge]').length) {
|
||||
$challenge.html('<p>The challenge was cancelled.</p><p><button name="dismissChallenge">OK</button></p>');
|
||||
} else {
|
||||
$challenge.html('<p>The challenge was rejected.</p><p><button name="dismissChallenge">OK</button></p>');
|
||||
this.dismissChallenge();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user