forked from firka/student-legacy
prevent double taps on new weird exam popup
This commit is contained in:
parent
52c2f3090d
commit
320499a466
@ -31,8 +31,18 @@ class ExamViewable extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
if (Provider.of<SettingsProvider>(context).newPopups) {
|
||||
bool pressed = false;
|
||||
|
||||
return GestureDetector(
|
||||
onTap: () => ExamPopup.show(context: context, exam: exam),
|
||||
onTap: () {
|
||||
// prevent double tap things
|
||||
if (pressed) return;
|
||||
pressed = true;
|
||||
ExamPopup.show(context: context, exam: exam);
|
||||
Future.delayed(const Duration(seconds: 2), () {
|
||||
pressed = false;
|
||||
});
|
||||
},
|
||||
child: ExamTile(
|
||||
exam,
|
||||
showSubject: showSubject,
|
||||
|
Loading…
x
Reference in New Issue
Block a user