Fix stream info not refreshing

This commit is contained in:
Tommy Chow 2022-07-27 01:19:25 -04:00
parent 98fa3a68fa
commit b2fe05a4c4
5 changed files with 24 additions and 3 deletions

View file

@ -140,7 +140,7 @@ Map<String, dynamic> _$EmoteToJson(Emote instance) => <String, dynamic>{
'height': instance.height,
'zeroWidth': instance.zeroWidth,
'url': instance.url,
'type': _$EmoteTypeEnumMap[instance.type],
'type': _$EmoteTypeEnumMap[instance.type]!,
'ownerId': instance.ownerId,
};

View file

@ -135,6 +135,14 @@ mixin _$ChatStore on ChatStoreBase, Store {
});
}
late final _$getAssetsAsyncAction =
AsyncAction('ChatStoreBase.getAssets', context: context);
@override
Future<void> getAssets() {
return _$getAssetsAsyncAction.run(() => super.getAssets());
}
late final _$ChatStoreBaseActionController =
ActionController(name: 'ChatStoreBase', context: context);

View file

@ -147,9 +147,11 @@ abstract class VideoStoreBase with Store {
}
}
@action
void handleRefresh() {
HapticFeedback.lightImpact();
controller?.reload();
updateStreamInfo();
}
FutureOr<NavigationDecision> handleNavigation(NavigationRequest navigation) {

View file

@ -198,6 +198,17 @@ mixin _$VideoStore on VideoStoreBase, Store {
}
}
@override
void handleRefresh() {
final _$actionInfo = _$VideoStoreBaseActionController.startAction(
name: 'VideoStoreBase.handleRefresh');
try {
return super.handleRefresh();
} finally {
_$VideoStoreBaseActionController.endAction(_$actionInfo);
}
}
@override
String toString() {
return '''

View file

@ -48,7 +48,7 @@ SettingsStore _$SettingsStoreFromJson(Map<String, dynamic> json) =>
Map<String, dynamic> _$SettingsStoreToJson(SettingsStore instance) =>
<String, dynamic>{
'themeType': _$ThemeTypeEnumMap[instance.themeType],
'themeType': _$ThemeTypeEnumMap[instance.themeType]!,
'showThumbnails': instance.showThumbnails,
'largeStreamCard': instance.largeStreamCard,
'showThumbnailUptime': instance.showThumbnailUptime,
@ -68,7 +68,7 @@ Map<String, dynamic> _$SettingsStoreToJson(SettingsStore instance) =>
'useReadableColors': instance.useReadableColors,
'showDeletedMessages': instance.showDeletedMessages,
'showChatMessageDividers': instance.showChatMessageDividers,
'timestampType': _$TimestampTypeEnumMap[instance.timestampType],
'timestampType': _$TimestampTypeEnumMap[instance.timestampType]!,
'badgeScale': instance.badgeScale,
'emoteScale': instance.emoteScale,
'messageScale': instance.messageScale,