Fix request history
This commit is contained in:
parent
c3421f7d54
commit
795d19ee01
|
@ -81,10 +81,12 @@ class _ChatState extends State<_Chat> {
|
||||||
final int _loadHistoryCount = 100;
|
final int _loadHistoryCount = 100;
|
||||||
|
|
||||||
void requestHistory() async {
|
void requestHistory() async {
|
||||||
|
if (timeline.events.last.type != EventTypes.RoomCreate) {
|
||||||
setState(() => this._loadingHistory = true);
|
setState(() => this._loadingHistory = true);
|
||||||
await timeline.requestHistory(historyCount: _loadHistoryCount);
|
await timeline.requestHistory(historyCount: _loadHistoryCount);
|
||||||
setState(() => this._loadingHistory = false);
|
setState(() => this._loadingHistory = false);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
|
|
Loading…
Reference in a new issue