Signal-iOS/SignalUI/ViewControllers
Evan Hahn c0c4a85d48 Fix InteractiveSheetViewController scrolling bug
Short story: we now properly decide whether the sheet is being resized
or scrolled, fixing the bug.

Long story:

Some users report that they can't scroll the forward message sheet
([example report 1][1], [example report 2][2]). This wasn't just a bug
with the forwarding sheet. It was a bug with all subclasses of
`InteractiveSheetViewController`.

When you gesture on the sheet, there are effectively two modes: "resize
the sheet mode", and "scroll the contents" mode. (See
`beginInteractiveTransitionIfNecessary` for a boolean that expresses
this.) The logic is effectively this:

    def getMode():
      if sheetHeight < maximumSheetHeight:
        # Note: there are some other ways to get this mode, e.g. by
        # grabbing the handle. But those aren't relevant for this bug.
        return "resize the sheet mode"
      else:
        return "scroll the contents mode"

Unfortunately, there was a bug in how we computed the max sheet height
if that height was larger than the height of the screen (e.g., in
landscape mode or on a shorter device). That bad height caused you to
get into "resize the sheet mode" incorrectly. This fixes that, and does
a few other cleanups.

[1]: https://github.com/signalapp/Signal-iOS/issues/5366
[2]: https://community.signalusers.org/t/beta-feedback-for-the-upcoming-ios-5-44-release/45401/3

Co-Authored-By: Igor Solomennikov <igor@signal.org>
2022-07-19 16:54:57 -05:00
..
AttachmentApproval Remove unused AttachmentCaptionViewController 2022-07-15 17:15:53 -05:00
ConversationPicker PR Feedback 2022-07-15 15:05:03 -07:00
Member Picker Move dependencies needed for private story creation to SignalUI 2022-07-15 15:05:03 -07:00
Recipient Picker Move dependencies needed for private story creation to SignalUI 2022-07-15 15:05:03 -07:00
Safety Numbers Move dependencies needed for private story creation to SignalUI 2022-07-15 15:05:03 -07:00
Stickers Fix violations of SwiftLint's attributes rule 2022-05-14 09:07:42 -05:00
Stories PR Feedback 2022-07-15 15:05:03 -07:00
ActionSheetController.swift Computed accessors shold always be in the same order 2022-06-24 09:35:07 -07:00
ApprovalFooterView.swift Add ability to send to group stories 2022-07-15 15:05:03 -07:00
ContactFieldView.swift Lint 2022-04-13 20:23:22 -07:00
ContactShareApprovalViewController.swift Fix violations of SwiftLint's attributes rule 2022-05-14 09:07:42 -05:00
ContactsPicker.swift Move dependencies needed for private story creation to SignalUI 2022-07-15 15:05:03 -07:00
CountryCodeViewController.swift replaced NSLocalizedStringFromAppBundle with OWSLocalizedString 2022-03-08 10:17:25 +01:00
EditContactShareNameViewController.swift Fix violations of SwiftLint's attributes rule 2022-05-14 09:07:42 -05:00
FindByPhoneNumberViewController.swift Fix violations of SwiftLint's attributes rule 2022-05-14 09:07:42 -05:00
InteractiveSheetViewController.swift Fix InteractiveSheetViewController scrolling bug 2022-07-19 16:54:57 -05:00
MediaMessageView.swift Merge branch igor/media-editor-updates. 2022-07-06 14:54:26 -07:00
ModalActivityIndicatorViewController.swift Fix violations of SwiftLint's attributes rule 2022-05-14 09:07:42 -05:00
OWSNavigationController.h Merge branch igor/media-editor-updates. 2022-07-06 14:54:26 -07:00
OWSNavigationController.m Merge branch igor/media-editor-updates. 2022-07-06 14:54:26 -07:00
OWSTableSheetViewController.swift Fix InteractiveSheetViewController scrolling bug 2022-07-19 16:54:57 -05:00
OWSTableViewController2.swift Computed accessors shold always be in the same order 2022-06-24 09:35:07 -07:00
OWSTableViewController.h cell background and context menu react to Theme changes 2022-01-26 10:46:08 +01:00
OWSTableViewController.m Remove UIScrollView workaround that was only used in iOS 11.0-11.2 2022-01-31 15:15:18 -08:00
OWSTableViewController.swift Add "Donation Receipts" view 2022-04-11 16:21:12 -05:00
OWSViewController.h Support emoji search in the emoji picker sheet 2021-12-10 13:03:55 -10:00
OWSViewController.m Fix typo in a comment. 2022-01-31 17:57:15 -08:00
OWSWindow.swift Fix violations of SwiftLint's attributes rule 2022-05-14 09:07:42 -05:00
RegistrationValues.swift replaced NSLocalizedStringFromAppBundle with OWSLocalizedString 2022-03-08 10:17:25 +01:00
SafetyNumberConfirmationSheet.swift Move dependencies needed for private story creation to SignalUI 2022-07-15 15:05:03 -07:00
ScanQRCodeViewController.swift Move dependencies needed for private story creation to SignalUI 2022-07-15 15:05:03 -07:00
ScreenLockViewController.h Add SignalUI framework target. 2021-10-19 09:39:53 -03:00
ScreenLockViewController.m replaced NSLocalizedStringFromAppBundle with OWSLocalizedString 2022-03-08 10:17:25 +01:00
SheetViewController.swift Lint 2022-04-13 20:23:22 -07:00
SpamCaptchaViewController.swift PR Feedback: Remove notImplemented altogether 2022-04-13 20:21:47 -07:00
TextApprovalViewController.swift Fix reentrant DB read on mentions processing 2022-06-20 13:21:22 -07:00
UIViewController+Permissions.h Add SignalUI framework target. 2021-10-19 09:39:53 -03:00
UIViewController+Permissions.m replaced NSLocalizedStringFromAppBundle with OWSLocalizedString 2022-03-08 10:17:25 +01:00
ViewControllerUtils.h Fix typos 2022-03-18 11:31:06 -07:00
ViewControllerUtils.m replaced NSLocalizedStringFromAppBundle with OWSLocalizedString 2022-03-08 10:17:25 +01:00