Skip to content

Commit 947f0c5

Browse files
Grolyclaude
andcommitted
fix: v0.8.1-2 — nutrition history shown when only meals are tracked
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 1ee5e8c commit 947f0c5

3 files changed

Lines changed: 12 additions & 2 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "groly",
33
"private": true,
4-
"version": "0.8.1-1",
4+
"version": "0.8.1-2",
55
"type": "module",
66
"scripts": {
77
"dev": "vite dev",

src/lib/changelog.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
11
// Neuesten Eintrag immer oben einfügen.
22
// Diese Änderungen werden im Update-Popup angezeigt.
33
export const CHANGELOG: { version: string; de: string[]; en: string[] }[] = [
4+
{
5+
version: '0.8.1-2',
6+
de: [
7+
'Nutrition-Verlauf: Einträge wurden nicht angezeigt, wenn nur Mahlzeiten und keine anderen Tracker genutzt wurden – behoben'
8+
],
9+
en: [
10+
'Nutrition history: entries were hidden when only meals and no other trackers were used – fixed'
11+
]
12+
},
413
{
514
version: '0.8.1-1',
615
de: [

src/lib/components/supplements/HistoryTab.svelte

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,8 @@
353353
</div>
354354
{:else}
355355
{@const suppsForCheck = period === 'day' ? dayCombinedSupplements.length : adherence.length || supplementStatEntries.length}
356-
{@const otherEmpty = nutrientEntries.length === 0 && suppsForCheck === 0 && waterTotal === 0 && caffeineTotalMg === 0 && meditationTotalSeconds === 0}
356+
{@const nutritionEmpty = !userSettings.nutritionTrackerEnabled || (meals.length === 0 && rangeMeals.length === 0)}
357+
{@const otherEmpty = nutrientEntries.length === 0 && suppsForCheck === 0 && waterTotal === 0 && caffeineTotalMg === 0 && meditationTotalSeconds === 0 && nutritionEmpty}
357358
{#if userSettings.moodTrackerEnabled}
358359
<MoodHistoryView bind:hasDayEntry={moodHasDayEntry} onreload={onMoodReload} fixedView={period === 'day' ? 'today' : period} parentDate={date} />
359360
{/if}

0 commit comments

Comments
 (0)