[FIX] Do not play sound on first load
This commit is contained in:
parent
1ad39bb52d
commit
007ff79210
@ -160,6 +160,11 @@ $(document).ready(function(){
|
|||||||
|
|
||||||
function refreshBlockData(data) {
|
function refreshBlockData(data) {
|
||||||
blocks = data.getdashboarddata.data.pool.blocks;
|
blocks = data.getdashboarddata.data.pool.blocks;
|
||||||
|
// Initilize
|
||||||
|
if (lastBlock == 0) {
|
||||||
|
lastBlock = blocks[0].height;
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (blocks[0].height > lastBlock) {
|
if (blocks[0].height > lastBlock) {
|
||||||
createjs.Sound.play('ding');
|
createjs.Sound.play('ding');
|
||||||
lastBlock = blocks[0].height;
|
lastBlock = blocks[0].height;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user