scroll animation
This commit is contained in:
parent
f627f248fb
commit
4a712ffed4
|
@ -196,14 +196,23 @@ class TimelineState extends State<Timeline> with AutomaticKeepAliveClientMixin {
|
|||
}
|
||||
|
||||
void reload() async {
|
||||
setState(() {
|
||||
children = [const LoadingBox()];
|
||||
oldestId = null;
|
||||
});
|
||||
controller.animateTo(
|
||||
0,
|
||||
duration: const Duration(seconds: 1),
|
||||
curve: Curves.easeOut,
|
||||
);
|
||||
if (mounted) {
|
||||
setState(() {
|
||||
children = [const LoadingBox()];
|
||||
oldestId = null;
|
||||
});
|
||||
}
|
||||
await _waitForFetchMore();
|
||||
setState(() {
|
||||
fetchMore();
|
||||
});
|
||||
if (mounted) {
|
||||
setState(() {
|
||||
fetchMore();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> _waitForFetchMore() async {
|
||||
|
|
|
@ -5,7 +5,6 @@ import 'package:loris/pages/chat/chat.dart';
|
|||
import 'package:loris/pages/notifications/notifications.dart';
|
||||
import 'package:loris/pages/timeline/timeline.dart';
|
||||
import 'package:loris/pages/settings/settings.dart';
|
||||
import '../global.dart' as global;
|
||||
import '../business_logic/websocket.dart' as websocket;
|
||||
import '../pages/timeline/timeline.dart' as tl;
|
||||
|
||||
|
|
Loading…
Reference in New Issue