Skip to content

Commit

Permalink
feat: handle badges visibility preference
Browse files Browse the repository at this point in the history
  • Loading branch information
alexktzk committed Feb 21, 2019
1 parent 36f9ec7 commit b94c7d5
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions public/js/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ t = TrelloPowerUp.initialize({
let settingsPage = (t) => t.popup({
title: 'Habitica settings',
url: './settings.html',
height: 250,
height: 322,
})

let loginPage = (t) => t.popup({
Expand All @@ -129,7 +129,10 @@ t = TrelloPowerUp.initialize({
let currentUser = await storage.getUser()
if (!currentUser.loggedIn) return []

return syncWithHabitica(t, storage).then(async () => {
return syncWithHabitica(t).then(async () => {
let settings = await storage.getSettings()
if (!settings.showBadges) return []

let taskData = await storage.getTask()
return [
{ icon: taskData.id ? ICONS.TASK_DOING : null },
Expand Down

0 comments on commit b94c7d5

Please sign in to comment.