Skip to content

Commit 2869c5b

Browse files
committed
fix: pfp works and user password can be changed
1 parent 53573de commit 2869c5b

2 files changed

Lines changed: 2 additions & 22 deletions

File tree

lib/core/services/supabase_service.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -398,6 +398,7 @@ class SupabaseService extends StateHandler {
398398
.from('User')
399399
.update({'profile_picture_url': publicUrl}).eq('id', user.id);
400400
setUserPfp(imageFile);
401+
notifyListeners();
401402
return publicUrl;
402403
} catch (e) {
403404
print('Error uploading profile picture: $e');
@@ -433,6 +434,7 @@ class SupabaseService extends StateHandler {
433434
final file = File('${tempDir.path}/pfp_${user.id}.$fileExtension');
434435
await file.writeAsBytes(response);
435436
setUserPfp(XFile(file.path));
437+
notifyListeners();
436438
return;
437439
} catch (e) {
438440
print('Error downloading profile picture: $e');

lib/main.dart

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -59,28 +59,6 @@ class MyApp extends StatefulWidget {
5959
}
6060

6161
class _MyAppState extends State<MyApp> {
62-
// final UpdateManager _updateManager = UpdateManager();
63-
// bool _hasCheckedForUpdates = false;
64-
65-
// @override
66-
// void initState() {
67-
// super.initState();
68-
// // Use a post-frame callback to ensure the context is available
69-
// WidgetsBinding.instance.addPostFrameCallback((_) {
70-
// _checkForUpdates();
71-
// });
72-
// }
73-
74-
// Future<void> _checkForUpdates() async {
75-
// if (!_hasCheckedForUpdates) {
76-
// _hasCheckedForUpdates = true;
77-
// // Wait a short time to let the app finish initializing
78-
// await Future.delayed(const Duration(seconds: 3));
79-
// if (mounted) {
80-
// await _updateManager.checkAndPromptForUpdate(context);
81-
// }
82-
// }
83-
// }
8462

8563
@override
8664
Widget build(BuildContext context) {

0 commit comments

Comments
 (0)