feat: 移除目标管理功能模块
删除了完整的目标管理功能,包括目标创建、编辑、任务管理等相关页面和组件。同时移除了相关的API服务、Redux状态管理、类型定义和通知功能。应用版本从1.0.20升级到1.0.21。
This commit is contained in:
@@ -1,18 +1,16 @@
|
||||
import AsyncStorage from '@/utils/kvStore';
|
||||
|
||||
// 引导状态存储键
|
||||
const GUIDE_KEYS = {
|
||||
GOALS_PAGE: '@guide_goals_page_completed',
|
||||
} as const;
|
||||
const GUIDE_KEYS = {} as const;
|
||||
|
||||
/**
|
||||
* 检查用户是否已经完成特定引导
|
||||
* @param guideKey 引导键名
|
||||
* @returns Promise<boolean> 是否已完成
|
||||
*/
|
||||
export const checkGuideCompleted = async (guideKey: keyof typeof GUIDE_KEYS): Promise<boolean> => {
|
||||
export const checkGuideCompleted = async (guideKey: string): Promise<boolean> => {
|
||||
try {
|
||||
const completed = await AsyncStorage.getItem(GUIDE_KEYS[guideKey]);
|
||||
const completed = await AsyncStorage.getItem(guideKey);
|
||||
return completed === 'true';
|
||||
} catch (error) {
|
||||
console.error('检查引导状态失败:', error);
|
||||
@@ -24,9 +22,9 @@ export const checkGuideCompleted = async (guideKey: keyof typeof GUIDE_KEYS): Pr
|
||||
* 标记引导为已完成
|
||||
* @param guideKey 引导键名
|
||||
*/
|
||||
export const markGuideCompleted = async (guideKey: keyof typeof GUIDE_KEYS): Promise<void> => {
|
||||
export const markGuideCompleted = async (guideKey: string): Promise<void> => {
|
||||
try {
|
||||
await AsyncStorage.setItem(GUIDE_KEYS[guideKey], 'true');
|
||||
await AsyncStorage.setItem(guideKey, 'true');
|
||||
} catch (error) {
|
||||
console.error('保存引导状态失败:', error);
|
||||
}
|
||||
@@ -37,9 +35,8 @@ export const markGuideCompleted = async (guideKey: keyof typeof GUIDE_KEYS): Pro
|
||||
*/
|
||||
export const resetAllGuides = async (): Promise<void> => {
|
||||
try {
|
||||
const keys = Object.values(GUIDE_KEYS);
|
||||
await AsyncStorage.multiRemove(keys);
|
||||
console.log('所有引导状态已重置');
|
||||
// 由于没有引导键,这个函数现在什么都不做
|
||||
console.log('所有引导状态已重置(无引导键)');
|
||||
} catch (error) {
|
||||
console.error('重置引导状态失败:', error);
|
||||
}
|
||||
@@ -51,15 +48,8 @@ export const resetAllGuides = async (): Promise<void> => {
|
||||
*/
|
||||
export const getAllGuideStatus = async (): Promise<Record<string, boolean>> => {
|
||||
try {
|
||||
const result: Record<string, boolean> = {};
|
||||
const keys = Object.values(GUIDE_KEYS);
|
||||
|
||||
for (const key of keys) {
|
||||
const completed = await AsyncStorage.getItem(key);
|
||||
result[key] = completed === 'true';
|
||||
}
|
||||
|
||||
return result;
|
||||
// 由于没有引导键,返回空对象
|
||||
return {};
|
||||
} catch (error) {
|
||||
console.error('获取引导状态失败:', error);
|
||||
return {};
|
||||
|
||||
Reference in New Issue
Block a user