mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-08-05 03:52:14 +00:00
fix to itemstore notifiication not showing
This commit is contained in:
parent
fac802cddb
commit
b9de996b94
2 changed files with 10 additions and 7 deletions
|
|
@ -104,9 +104,9 @@ module.exports.setupGrowlNotifications = (model) ->
|
|||
trigger: 'manual'
|
||||
html: true
|
||||
content: "<div class='item-store-popover'>
|
||||
<img src='/img/BrowserQuest/chest.png' />
|
||||
#{message} <a href='#' onClick=\"$('ul.items').popover('hide');return false;\">[Close]</a>
|
||||
</div>"
|
||||
<img src='/img/BrowserQuest/chest.png' />
|
||||
#{message} <a href='#' onClick=\"$('ul.items').popover('hide');return false;\">[Close]</a>
|
||||
</div>"
|
||||
$('ul.items').popover 'show'
|
||||
|
||||
user.on 'set', 'flags.partyEnabled', (captures, args) ->
|
||||
|
|
@ -118,9 +118,9 @@ module.exports.setupGrowlNotifications = (model) ->
|
|||
trigger: 'manual'
|
||||
html: true
|
||||
content: "<div class='party-system-popover'>
|
||||
<img src='/img/BrowserQuest/favicon.png' />
|
||||
#{message} <a href='#' onClick=\"$('#add-friend-button').popover('hide');return false;\">[Close]</a>
|
||||
</div>"
|
||||
<img src='/img/BrowserQuest/favicon.png' />
|
||||
#{message} <a href='#' onClick=\"$('#add-friend-button').popover('hide');return false;\">[Close]</a>
|
||||
</div>"
|
||||
$('#add-friend-button').popover 'show'
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -81,8 +81,11 @@ updateStats = (newStats, batch) ->
|
|||
obj.stats.lvl++
|
||||
obj.stats.hp = 50
|
||||
if !obj.items.itemsEnabled and obj.stats.lvl >= 2
|
||||
obj.items.itemsEnabled = true #bit of trouble using userSet here
|
||||
# Set to object, then also send to browser right away to get model.on() subscription notification
|
||||
batch.set 'items.itemsEnabled', true
|
||||
obj.items.itemsEnabled = true
|
||||
if !obj.flags.partyEnabled and obj.stats.lvl >= 3
|
||||
batch.set 'flags.partyEnabled', true
|
||||
obj.flags.partyEnabled = true
|
||||
obj.stats.exp = newStats.exp
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue