made button same height when loading, added timeout to language settings / avatar page (#1275)
This commit is contained in:
parent
341f44090d
commit
940b65d007
2 changed files with 15 additions and 2 deletions
|
|
@ -62,7 +62,13 @@ class FullWidthButtonState extends State<FullWidthButton> {
|
|||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
widget.loading
|
||||
? const Expanded(child: LinearProgressIndicator())
|
||||
? const Expanded(
|
||||
child: SizedBox(
|
||||
height: 18,
|
||||
child:
|
||||
Center(child: LinearProgressIndicator()),
|
||||
),
|
||||
)
|
||||
: widget.title,
|
||||
],
|
||||
),
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
import 'dart:async';
|
||||
|
||||
import 'package:fluffychat/pangea/controllers/language_list_controller.dart';
|
||||
import 'package:fluffychat/pangea/controllers/pangea_controller.dart';
|
||||
import 'package:fluffychat/pangea/models/language_model.dart';
|
||||
|
|
@ -145,7 +147,12 @@ class UserSettingsState extends State<UserSettingsPage> {
|
|||
waitForDataInSync: true,
|
||||
),
|
||||
];
|
||||
await Future.wait(updateFuture);
|
||||
await Future.wait(updateFuture).timeout(
|
||||
const Duration(seconds: 30),
|
||||
onTimeout: () {
|
||||
throw TimeoutException(L10n.of(context).oopsSomethingWentWrong);
|
||||
},
|
||||
);
|
||||
context.go('/rooms');
|
||||
} catch (err) {
|
||||
if (err is MatrixException) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue