DetailedPage: rebuild on actual change of shouldDisableScroll value

This commit is contained in:
Neeraj Gupta 2022-06-27 01:57:58 +05:30
parent 041c19137e
commit a8e9c9d6d5
No known key found for this signature in database
GPG key ID: 3C5A1684DC1729E1

View file

@ -141,9 +141,11 @@ class _DetailPageState extends State<DetailPage> {
autoPlay: !_hasPageChanged,
tagPrefix: widget.config.tagPrefix,
shouldDisableScroll: (value) {
setState(() {
_shouldDisableScroll = value;
});
if (_shouldDisableScroll != value) {
setState(() {
_shouldDisableScroll = value;
});
}
},
playbackCallback: (isPlaying) {
_shouldHideAppBar = isPlaying;