fix intro page buug

This commit is contained in:
hiddify-com
2024-07-05 00:26:08 +02:00
parent 4fb94f8049
commit 97d2427b44

View File

@@ -20,23 +20,19 @@ import 'package:timezone_to_country/timezone_to_country.dart';
class IntroPage extends HookConsumerWidget with PresLogger {
IntroPage({super.key});
final locationInfoLoaded = useState(false);
bool locationInfoLoaded = false;
@override
Widget build(BuildContext context, WidgetRef ref) {
final t = ref.watch(translationsProvider);
final isStarting = useState(false);
useEffect(
() {
if (!locationInfoLoaded.value) {
autoSelectRegion(ref).then((value) => loggy.debug("Auto Region selection finished!"));
locationInfoLoaded.value = true;
}
return null;
},
[],
);
if (!locationInfoLoaded) {
autoSelectRegion(ref).then((value) => loggy.debug("Auto Region selection finished!"));
locationInfoLoaded = true;
}
return Scaffold(
body: SafeArea(
child: CustomScrollView(