14914 Commits

Author SHA1 Message Date
Kevin
993172915a Correct View vs. Layer here (tho it doesn't make any difference) (#1378)
Older FBSnapshot versions, however, don't use VerifyViewOrLayer
2019-03-08 08:24:24 -08:00
Kevin
65061b9d3d Catch invalid sizes during yoga layout (#1376) 2019-03-08 08:24:08 -08:00
Garrett Moon
3547f5add3 Whoops, someone forgot an else! (#1385)
Luckily it seems this didn't cause huge memory bloat because there's
a check below that keeps the display flag from being set in low memory
conditions when the node is off the screen.
2019-03-08 08:18:11 -08:00
Huy Nguyen
d102ec81ee
Experiment with different strategies for image downloader priority (#1349)
Right now when an image node enters preload state, we kick off an image request with the default priority. Then when it enters display state, we change the priority to "imminent" which is mapped to the default priority as well. This means that requests from preload and display nodes have the same priority and are put to the same pool. The right behavior would be that preload requests should have a lower priority from the beginning.

Another problem is that, due to the execution order of -didEnter(Preload|Display|Visible)State calls, a node may kick off a low priority request when it enters preload state even though it knows that it's also visible. By the time -didEnterVisibleState is called, the low priority request may have already been consumed and the download/data task won't pick up the new higher priority, or some work needs to be done to move it to another queue. A better behavior would be to always use the current interface state to determine the priority. This means that visible nodes will kick off high priority requests as soon as -didEnterPreloadState is called.

The last (and smaller) issue is that a node marks its request as preload/low priority as soon as it exits visible state. I'd argue that this is too agressive. It may be reasonble for nodes in the trailing direction. Even so, we already handle this case by (almost always) have smaller trailing buffers. So this diff makes sure that nodes that exited visible state will have imminent/default priority if they remain in the display range.

All of these new behaviors are wrapped in an experiment and will be tested carefully before being rolled out.

* Add imports

* Fix build failure

* Encapsulate common logics into methods

* Address comments
2019-03-08 08:11:03 -08:00
Ilya Laktyushin
ca80cc40dc Added bounds transition 2019-03-08 18:33:53 +03:00
Peter
02e4a6776e MessageHistoryIndexHoleTable 2019-03-08 14:16:00 +00:00
overtake
75b527c4c8 Merge branch 'master' of https://gitlab.com/peter-iakovlev/postbox 2019-03-08 17:09:30 +04:00
overtake
19bb5a3bb3 Merge branch 'master' of https://gitlab.com/peter-iakovlev/telegramcore
# Please enter a commit message to explain why this merge is necessary,
# especially if it merges an updated upstream into a topic branch.
#
# Lines starting with '#' will be ignored, and an empty message aborts
# the commit.
2019-03-08 17:09:09 +04:00
overtake
fad778a335 no message 2019-03-08 17:08:46 +04:00
Peter
36fe22074f Merge branch 'master' into holes 2019-03-08 11:23:55 +00:00
Peter
18557fa0f1 Update API 2019-03-08 11:23:18 +00:00
Peter
8d4a0aa127 Merge branch 'master' into holes 2019-03-08 11:22:54 +00:00
Peter
956557b894 Added support for sticker pack thumbnails 2019-03-08 11:22:49 +00:00
Peter
1c36f9c7a8 Cleanup 2019-03-08 10:20:18 +00:00
Peter
41d0837b32 Initial holes 2.0 support 2019-03-08 10:20:01 +00:00
Peter
bbbd50fbaf Initial holes 2.0 support 2019-03-08 10:18:29 +00:00
Peter
4be6d0bfbb Initial holes 2.0 support 2019-03-08 10:18:20 +00:00
Adlai Holler
5e8721ebe8
Make ASTextNode2 more forgiving when searching for links (#1374)
* Make ASTextNode2 more forgiving when searching for links by searching a 44x44 square around the touch

* Trailing whitespace

* Safely handle end-of-line
2019-03-07 13:29:13 -08:00
Garrett Moon
fce6f23b97
Launches switching ASNetworkImageNode callbacks to global queue. (#1369)
* Launches switching ASNetworkImageNode callbacks to global queue.

* Good catch configuration tests!
2019-03-07 09:47:56 -08:00
Kevin
4c370a899c [Updated Snapshots] Don't add extraneous truncation token during kCTLineTruncationMiddle (#1375)
* Don't add extraneous truncation token during kCTLineTruncationMiddle

* Expand these comments a little.

* Update snapshot tests with beautiful correct behavior
2019-03-07 07:20:06 -08:00
subhransu mohanty
7f5d496a96 [rlottie] Added setDrawRegion api to Surface for supporting subsurface rendering. 2019-03-07 14:33:33 +09:00
Garrett Moon
45146ff1cf
Update the FAQ to throw less shade. (#1379)
* Update the FAQ to throw less shade.

Both of these technologies have their place, no point in being assholes.

* Update faq.md
2019-03-06 17:09:49 -08:00
Kevin
7bb3079082 Don't add extraneous truncation token during kCTLineTruncationMiddle. (#1297)
* Don't add extraneous truncation token during kCTLineTruncationMiddle

* Expand these comments a little.
2019-03-06 10:05:30 -08:00
Eric Scheers
a0012d90c2 Add forwarding of UIAccessibilityAction methods (#1344)
* Add forwarding of UIAccessibilityAction methods

* Use OCMock for testing UIAccessibilityAction method forwarding
2019-03-06 10:02:50 -08:00
Michael Schneider
07becd0fc8
Cleanup Yoga Categories (#1364) 2019-03-06 07:37:40 -08:00
Adlai Holler
dd4359db7b
Optimize ASCATransactionQueue (#1350)
* Optimize ASCATransactionQueue. This queue is very busy, and it runs on the main thread so it's important for it to be fast.

Avoid waking up the run loop for every single node.
Avoid a ton of NSPointerArray overhead that we don't need.
Avoid retain/release traffic on the singleton by using an inline function. I confirmed that in release mode, the static __strong is correctly inlined and no ARC traffic is incurred.

* Comment

* Unlock right

* Remove magic number
2019-03-05 18:20:17 -08:00
Ilya Laktyushin
06bfd14561 Update submodules 2019-03-06 00:44:21 +03:00
Ilya Laktyushin
a95da7736f Fixed build 2019-03-06 00:43:58 +03:00
Ilya Laktyushin
07dac1322d Update submodules 2019-03-06 00:29:31 +03:00
Ilya Laktyushin
c278cf193b Volume bar fix 2019-03-06 00:23:48 +03:00
Ilya Laktyushin
f24d58d7de Fixed call ringing on confirming stage 2019-03-06 00:22:54 +03:00
Ilya Laktyushin
f80abacc46 Merge branch 'master' of gitlab.com:peter-iakovlev/TelegramUI 2019-03-06 00:22:07 +03:00
Ilya Laktyushin
9e52360952 Fixed embedded album artwork fetch 2019-03-06 00:21:30 +03:00
Peter
bcbaad78b6 Update submodules 2019-03-05 20:02:19 +00:00
Peter
839d9a02c3 API update 2019-03-05 20:02:06 +00:00
Peter
ea2dfc192c API update 2019-03-05 20:01:52 +00:00
Ilya Laktyushin
999d798687 Merge branch 'master' of gitlab.com:peter-iakovlev/TelegramUI 2019-03-05 22:53:53 +03:00
Xavier Deloge
2a9379248b _ASCollectionViewCell - The point isn't converted before to send to node, impossible to touch button into the node hierarchy (#1362)
* Revert node call, useless, the node has a ASDisplayView, and this view forward on the node in first.

* Use convertPoint to convert the given point in hittest & pointInside methods.
Keep the standard usage if the node didn't rasterized a view.

* Removed isNodeLoaded, finally it's useless in this case
In these methods, we are on the mainThread, we can create the view if the view is not created.
2019-03-05 09:00:38 -08:00
Peter
c05f95fcbf Don't include MtProtoKit in NotificationService 2019-03-05 15:04:05 +00:00
Peter
66434d9ca0 Update submodules 2019-03-05 13:48:08 +00:00
Peter
7077ff31dc Fix alert text accessibility 2019-03-05 13:47:54 +00:00
Peter
3790d0637d VoiceOver updates
Fix FetchManager behavior when pre-fetching files
Preload videos based on their duration
2019-03-05 13:39:46 +00:00
Peter
fdd4395b66 Added unregisterNotificationToken
Fix fetchedMediaResource for data ranges
2019-03-05 13:38:52 +00:00
Peter
bad5edd2a2 MessageOfInterestHolesView: cache media 2019-03-05 13:37:28 +00:00
Peter
552b4a2661 VoiceOver updates 2019-03-05 13:36:50 +00:00
Ilya Laktyushin
983efe1f61 Merge branch 'master' of gitlab.com:peter-iakovlev/TelegramUI 2019-03-05 16:24:30 +03:00
Ilya Laktyushin
1e87e43415 UI fixes 2019-03-05 16:21:55 +03:00
Adlai Holler
17dbd8e1e5
Optimize _assertSubnodeState (#1352)
* Optimize _assertSubnodeState

This method is actually pretty painful in today's world. In one iPad mini trace, the first page of nodes spent 6.6ms in this call, just in time profiler.

* Clean it up, check count

* Check the right value
2019-03-04 21:07:31 -08:00
subhransu mohanty
b7d488671a rlottie: now loadFromData() api takes resourcePath for loading external resource 2019-03-05 13:05:16 +09:00
subhransu mohanty
8047001e1f rlottie: remove dependancy of -stdc++14 flag to link against rlottie library. 2019-03-05 10:56:25 +09:00