Signal-iOS/SignalUI
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
..
Appearance Allow creation of private stories 2022-07-15 15:05:03 -07:00
Categories Animate UI changes in the bottom toolbar in media review screen. 2022-07-13 12:12:48 -07:00
Environment Report HTTP status code when web sockets fail to connect 2022-03-28 15:25:37 -07:00
Fonts Add new fonts for text stories 2022-03-17 14:30:19 -07:00
Payments Avoid setters that don’t read newValue 2022-07-12 13:39:43 -07:00
SignalUI.docc Add SignalUI framework target. 2021-10-19 09:39:52 -03:00
UI Fix typos 2022-03-18 11:31:06 -07:00
Utils Rename GroupManager+SignalMessaging to GroupManager+GroupInvites 2022-07-18 15:14:51 -07:00
ViewControllers Fix InteractiveSheetViewController scrolling bug 2022-07-19 16:54:57 -05:00
ViewModels Add support for replying to gift messages 2022-07-07 10:49:20 -07:00
Views Add fromViewController parameter to showActionSheet 2022-07-18 15:07:19 -07:00
Wallpapers Fix typo: "Gausian" -> "Gaussian". 2022-05-17 19:25:30 -07:00
SignalUI-Prefix.pch minor changes due to changed name of NSLocalizedStringFromAppBundle (now OWSLocalizedString) and new location of swift function and preprocessor definition 2022-03-11 14:08:26 +01:00
SignalUI.h Move dependencies needed for private story creation to SignalUI 2022-07-15 15:05:03 -07:00