Skip to content

Commit c757ef8

Browse files
authored
Merge pull request #11 from Sanotsu/plan_to_improve
feat:主要添加内置数据,并修复一些问题
2 parents aea91ac + 4d95c75 commit c757ef8

File tree

153 files changed

+120925
-4483
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

153 files changed

+120925
-4483
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,3 +74,6 @@ windows
7474
**bak*
7575
**_bak*
7676
**_self*
77+
78+
79+
android/app/.cxx

CHANGELOG.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,40 @@
22

33
All notable changes to this project will be documented in this file.
44

5+
## 0.2.2-beta.1
6+
7+
- feat:
8+
- 内置了一些基础动作和食物成分数据,方便直接使用
9+
- 如果设备系统语言是简体中文(zh),则导入中文的基础动作,否则是英文(en)
10+
- 数据初始化导入完成之后,**再切换 App 语言时,不会重新处理**,始终是初始化时语言
11+
- 可以在“基础动作”和“食物成分”主页右上角执行“加载内置数据”
12+
- 饮食日记餐次记录添加了可拍照留存图片
13+
- refactor:
14+
- 简单调整了一些项目结构
15+
- 统一了 toast 组件
16+
- chore:
17+
- 升级到 flutter3.32.4,同步更新工具依赖库到最新
18+
- fix:
19+
20+
- 数据新增时如果重复,从报错改为替换
21+
- 修正了一些细节和 bug
22+
23+
---
24+
25+
**注意**:仅全新初次使用才会初始化内置数据,App 未卸载的直接版本升级或覆盖恢复的,不会初始化内置数据,因为已有用户数据了。
26+
27+
可以在“基础动作”和“食物成分”主页右上角执行“加载内置数据”,会替换已存在的同名/同代号的数据。
28+
29+
“基础动作”的 [来源](https://github.com/yuhonas/free-exercise-db) json 格式固定,所以不会出现重复运动代号。
30+
31+
- 还可以根据当前应用的显示语言,加载不同中/英文的运动数据;会替换同名/同代号的数据
32+
33+
“食物成分”稍微不一样:
34+
35+
- 因为内置的 json 中数据 `foodCode + foodName` 对应数据库表唯一键 `brand + product`,json 中即便 foodCode 相同、但 foodName 稍微不完全一致,就会成为 2 个产品。
36+
- 比如 `012101`+`梗米 (标一)``012101`+`粳米(标一)`,因为 foodName 括号不一样,插入后会是 2 个产品
37+
- 因此,如果符合《中国食物成分表标准版(第 6 版)》[Sanotsu/china-food-composition-data](https://github.com/Sanotsu/china-food-composition-data) json 结构的数据(内置或者自行导入的),先判断数据库中的 `brand` 是否满足 `foodCode` 的数字格式,如果满足,则不管其他栏位如何,直接替换。
38+
539
## 0.2.1-beta.1
640

741
- refactor:

README-en.md

Lines changed: 333 additions & 0 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 136 additions & 83 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)