Skip to content

Commit 90396c8

Browse files
committed
feat: fixed the splash screen bug
1 parent 13ef2b8 commit 90396c8

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

lib/views/screens/splash_screen.dart

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import 'package:resonate/utils/app_images.dart';
88
import 'package:resonate/utils/colors.dart';
99
import 'package:resonate/utils/ui_sizes.dart';
1010
import 'package:resonate/routes/app_routes.dart';
11+
import 'package:resonate/utils/enums/update_enums.dart';
1112

1213
class SplashScreen extends StatefulWidget {
1314
const SplashScreen({super.key});
@@ -52,7 +53,7 @@ class _SplashScreenState extends State<SplashScreen>
5253

5354
// Delay before navigation
5455
Timer(const Duration(milliseconds: 3000), () async {
55-
await Get.find<AboutAppScreenController>().checkForUpdate(
56+
final result = await Get.find<AboutAppScreenController>().checkForUpdate(
5657
onIgnore: () {
5758
authController.isUserLoggedIn();
5859
Get.offNamed(AppRoutes.landing);
@@ -70,6 +71,11 @@ class _SplashScreenState extends State<SplashScreen>
7071
},
7172
isManualCheck: false,
7273
);
74+
if (result == UpdateCheckResult.noUpdateAvailable ||
75+
result == UpdateCheckResult.checkFailed) {
76+
authController.isUserLoggedIn();
77+
Get.offNamed(AppRoutes.landing);
78+
}
7379
});
7480
}
7581

0 commit comments

Comments
 (0)