Skip to content

Commit

Permalink
Merge pull request #249 from pangeachat/login-loading
Browse files Browse the repository at this point in the history
Shows loading screen after login
  • Loading branch information
ggurdin authored May 27, 2024
2 parents 4f96c55 + 6e5d97c commit 14c25c0
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
5 changes: 4 additions & 1 deletion lib/pages/homeserver_picker/homeserver_picker.dart
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,10 @@ class HomeserverPickerController extends State<HomeserverPicker> {
} finally {
if (mounted) {
setState(() {
isLoading = isLoggingIn = false;
// #Pangea
// isLoading = isLoggingIn = false;
isLoggingIn = false;
// Pangea#
});
}
}
Expand Down
9 changes: 8 additions & 1 deletion lib/pages/homeserver_picker/homeserver_picker_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,14 @@ class HomeserverPickerView extends StatelessWidget {
// Pangea#
Expanded(
child: controller.isLoading
? const Center(child: CircularProgressIndicator.adaptive())
// #Pangea
// ? const Center(child: CircularProgressIndicator.adaptive())
? const Center(
child: CircularProgressIndicator(
valueColor: AlwaysStoppedAnimation<Color>(Colors.black),
),
)
// Pangea#
: ListView(
children: [
if (errorText != null) ...[
Expand Down
4 changes: 3 additions & 1 deletion lib/pages/login/login.dart
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,9 @@ class LoginController extends State<Login> {
return setState(() => loading = false);
}

if (mounted) setState(() => loading = false);
// #Pangea
// if (mounted) setState(() => loading = false);
// Pangea#
}

Timer? _coolDown;
Expand Down

0 comments on commit 14c25c0

Please sign in to comment.