Skip to content
This repository was archived by the owner on Oct 18, 2025. It is now read-only.

Comments

refactor: use json instead of csv to store location history#63

Draft
PA733 wants to merge 1 commit intoella8192:masterfrom
PA733:fix/historical-location-crash
Draft

refactor: use json instead of csv to store location history#63
PA733 wants to merge 1 commit intoella8192:masterfrom
PA733:fix/historical-location-crash

Conversation

@PA733
Copy link
Contributor

@PA733 PA733 commented Apr 19, 2025

此 PR 将 HistoricalLocation 部分重构,抛弃了 CSV 存储方式,改为 JSON 。
同时增加了迁移步骤,以兼容旧数据。

重构原因

JSON 可直接利用项目中已导入的 com.alibaba.fastjson2 进行处理,不需要增加额外的依赖。
CSV 要完整处理,需要大量的编码实现,可行但是代码可读性和效率会下降。
CSV 即使处理后,Kotlin 字面量也仍然需要对引号转义,否则会出现把 "123456" 显示为 123456 之类的问题。

演示

Screenshot_20250419-150053
Screenshot_20250419-150101
Screenshot_20250419-150105
Screenshot_20250419-150110

To-Do

测试

  • 数据迁移功能

其他

  • 清理代码
  • 解决 workflow 构建问题

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant