Show real photos for people instead of scene art
Your avatar is your photo, picked from the device by tapping it on Home or from a new Profile photo row in Settings, shrunk to 256 px and kept on the phone (there is no upload endpoint yet). Group members show the photo the server sends in a new `photo` field, everywhere avatars appear. Without a photo, an initial on a neutral disc. Mock mode bundles free Unsplash portraits for the sample people. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KhQh614DMeYoQEH9SoMRUw
This commit is contained in:
@@ -80,6 +80,15 @@ class ViewHome extends ParentViewModel {
|
||||
}
|
||||
}
|
||||
|
||||
/// A new profile photo, kept on the device with the rest of the user's
|
||||
/// details. There is no upload endpoint yet, so it does not leave the phone.
|
||||
void savePhoto(String pic) async {
|
||||
final UserDetails details = await getDataManager().getUserDetails();
|
||||
details.pic = pic;
|
||||
await getDataManager().setUserDetails(details);
|
||||
connection.onUserLoaded(details);
|
||||
}
|
||||
|
||||
void loadTodos() async {
|
||||
connection.onTodosLoaded(await getDataManager().getTodos());
|
||||
}
|
||||
@@ -140,8 +149,7 @@ class ViewHome extends ParentViewModel {
|
||||
/// Reminders are one-shots for the coming week, so they are re-placed
|
||||
/// whenever the schedule is read.
|
||||
void _placeReminders(List<RoutineChain> routines) async {
|
||||
final ProgressTargets targets =
|
||||
await getDataManager().getProgressTargets();
|
||||
final ProgressTargets targets = await getDataManager().getProgressTargets();
|
||||
if (targets.reminders) {
|
||||
await LocalNotificationEngine.scheduleRoutineReminders(
|
||||
routines, targets.reminderLead);
|
||||
|
||||
Reference in New Issue
Block a user