Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed double tap to exit app #356

Merged
merged 1 commit into from
Jul 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -20,7 +20,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 @@ -95,9 +95,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);
}
}
}
Loading