Add groups with shared goals, objectives and chat; drop the water tracker
Groups let people keep each other honest: create one or join with a six-letter invite code. Each group has shared goals split into measurable objectives (km, sessions, words) that every member logs toward, a leaderboard of kept rate and streak with nudges, and a group chat where check-ins and nudges appear as cards beside the talk. The open chat polls for new messages. Reached from a new Groups tab (Training moves into the day rail), a Home "Your groups" rail that opens the chat, and a Group tile in the add sheet. Mock mode seeds two groups, a joinable one and members who reply. The water tracker is removed; it did not fit the app. Bottom sheets are now square app-wide via the theme. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KhQh614DMeYoQEH9SoMRUw
This commit is contained in:
@@ -60,11 +60,6 @@ abstract class ConnectInternalMemory {
|
||||
|
||||
Future setAmnestySpent(int spent);
|
||||
|
||||
/// Water drunk today in ml; a new day reads as 0.
|
||||
Future<int> getWaterToday();
|
||||
|
||||
Future setWaterToday(int ml);
|
||||
|
||||
/// The quick to-do list on Home.
|
||||
Future<List<TodoItem>> getTodos();
|
||||
|
||||
|
||||
@@ -41,8 +41,6 @@ class InternalMemory implements ConnectInternalMemory {
|
||||
|
||||
static const String AMNESTY_SPENT = "AMNESTY_SPENT_Jr4xVh9KmT3gLc6B";
|
||||
|
||||
static const String WATER = "WATER_Qe7tNd4ZsM2kBv9C";
|
||||
|
||||
static const String TODOS = "TODOS_Wm3kRb8TqZ5nHc2F";
|
||||
|
||||
static const String SHOW_ONBOARDING = "SHOW_ONBOARDING_Nz6qGf2SdX7wPb4M";
|
||||
@@ -257,31 +255,6 @@ class InternalMemory implements ConnectInternalMemory {
|
||||
await groundedStorage.write(key: AMNESTY_SPENT, value: spent.toString());
|
||||
}
|
||||
|
||||
String _today() {
|
||||
final DateTime now = DateTime.now();
|
||||
return "${now.year}-${now.month}-${now.day}";
|
||||
}
|
||||
|
||||
@override
|
||||
Future<int> getWaterToday() async {
|
||||
String? value = await groundedStorage.read(key: WATER);
|
||||
|
||||
if (value != null) {
|
||||
final Map<String, dynamic> entry = jsonDecode(value);
|
||||
if (entry['day'] == _today()) {
|
||||
return entry['ml'] ?? 0;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@override
|
||||
Future setWaterToday(int ml) async {
|
||||
await groundedStorage.write(
|
||||
key: WATER, value: jsonEncode({'day': _today(), 'ml': ml}));
|
||||
}
|
||||
|
||||
@override
|
||||
Future<List<TodoItem>> getTodos() async {
|
||||
String? value = await groundedStorage.read(key: TODOS);
|
||||
|
||||
Reference in New Issue
Block a user