Merge pull request #266 from GetStream/hotfix/initialMessageId
fixes #265
This commit is contained in:
@@ -314,12 +314,24 @@ class StreamChannelState extends State<StreamChannel> {
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
_populateFutures();
|
||||
}
|
||||
|
||||
void _populateFutures() {
|
||||
_futures = [widget.channel.initialized];
|
||||
if (initialMessageId != null) {
|
||||
_futures.add(_loadChannelAtMessage);
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
void didUpdateWidget(covariant StreamChannel oldWidget) {
|
||||
if (oldWidget.initialMessageId != initialMessageId) {
|
||||
_populateFutures();
|
||||
}
|
||||
super.didUpdateWidget(oldWidget);
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
_queryTopMessagesController.close();
|
||||
|
||||
Reference in New Issue
Block a user