Skip to content

Commit

Permalink
Merge pull request #356 from BrawlerXull/exit
Browse files Browse the repository at this point in the history
Fixed double tap to exit app
  • Loading branch information
Pavel401 authored Jul 7, 2024
2 parents 86727d6 + 6e9f778 commit 1c09780
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 14 deletions.
1 change: 0 additions & 1 deletion lib/app/modules/home/views/home_page_body.dart
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ class HomePageBody extends StatelessWidget {
controller.showInAppTour(context);
return DoubleBackToCloseApp(
snackBar: const SnackBar(content: Text('Tap back again to exit')),
// ignore: avoid_unnecessary_containers
child: Container(
color: AppSettings.isDarkMode
? Palette.kToDark.shade200
Expand Down
6 changes: 0 additions & 6 deletions lib/app/modules/home/views/home_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,6 @@ class HomeView extends GetView<HomeController> {

controller.checkForSync(context);

// var taskData = controller.searchedTasks;

// var pendingFilter = controller.pendingFilter;
// var waitingFilter = controller.waitingFilter;
// var pendingTags = controller.pendingTags;

return Obx(
() => Scaffold(
appBar: HomePageAppBar(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,7 @@ class OnboardingPageStartButton extends StatelessWidget {
child: ElevatedButton(
onPressed: () {
controller.markOnboardingAsCompleted();
// Navigator.of(context).pushAndRemoveUntil(
// MaterialPageRoute(builder: (context) => const HomeView()),
// (Route<dynamic> route) => false,
// );
Get.toNamed(Routes.HOME);
Get.offNamed(Routes.HOME);
},
style: ElevatedButton.styleFrom(
backgroundColor: TaskWarriorColors.black,
Expand Down
1 change: 1 addition & 0 deletions lib/app/modules/splash/bindings/splash_binding.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ class SplashBinding extends Bindings {
void dependencies() {
Get.put<SplashController>(
SplashController(),
permanent: true,
);
}
}
4 changes: 2 additions & 2 deletions lib/app/modules/splash/controllers/splash_controller.dart
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,9 @@ class SplashController extends GetxController {
void sendToNextPage() async {
await checkOnboardingStatus();
if (hasCompletedOnboarding.value) {
Get.toNamed(Routes.HOME);
Get.offNamed(Routes.HOME);
} else {
Get.toNamed(Routes.ONBOARDING);
Get.offNamed(Routes.ONBOARDING);
}
}
}

0 comments on commit 1c09780

Please sign in to comment.