signalapp / Signal-iOS

A private messenger for iOS.
https://signal.org
GNU Affero General Public License v3.0
10.59k stars 2.95k forks source link

Do not ignore 'shouldAutoPlayVideo' function parameter in MediaPageViewController. #5789

Open alex1704 opened 2 months ago

alex1704 commented 2 months ago

Contributor checklist

Description

Currently when MediaPageViewController.setCurrentItem is invoked shouldAutoPlayVideo parameter is ignored and MediaItemViewController.shouldAutoPlayVideo property is always set to true inside function. In this PR I changed only part related to behaviour in MediaPageViewController.setCurrentItem but MediaPageViewController have several calls to setCurrentItem where this parameter is not used explicitly and its default to false which may alter desired final behaviour as currently MediaItemViewController.shouldAutoPlayVideo is always true. I would gladly change all places where setCurrentItem but I do not know specs.