Commit Graph

13022 Commits

Author SHA1 Message Date
overtake
0487414c72 Merge branch 'master' of https://github.com/peter-iakovlev/TelegramCore 2017-07-14 16:58:52 +03:00
overtake
13f9d5a0c5 no message 2017-07-14 16:58:45 +03:00
Peter
d8a8f02331 no message 2017-07-14 16:30:07 +03:00
overtake
7fcf0c0e79 Merge branch 'master' of https://github.com/peter-iakovlev/MtProtoKit 2017-07-14 15:41:58 +03:00
Peter
b6ded073ad no message 2017-07-14 15:34:30 +03:00
Peter
9591e2ca71 no message 2017-07-14 15:32:15 +03:00
Peter
82499816e7 no message 2017-07-14 15:31:53 +03:00
Peter
9b26fde413 Merge commit '5e9881d26f501257bc5161c6673b15cd18c675b4' 2017-07-14 15:31:30 +03:00
Peter
104a129477 no message 2017-07-14 15:31:24 +03:00
Peter
645e4f0c03 no message 2017-07-14 15:30:49 +03:00
overtake
384e53683f Merge branch 'master' of https://github.com/peter-iakovlev/MtProtoKit 2017-07-14 15:28:51 +03:00
Peter
5431b6dbdc Merge commit '29826304da68627132891a947757662b03e68ad8' 2017-07-14 15:26:30 +03:00
Peter
0d0c3fff9c no message 2017-07-14 15:26:25 +03:00
Peter
e2f19e6b03 no message 2017-07-14 15:25:56 +03:00
Ivan Matkov
8ac671e271 Fix docset copy script 2017-07-13 20:23:50 +03:00
Ivan Matkov
cae728984e Fix Objective-C syntax highlighting in documentation 2017-07-13 17:05:59 +03:00
appleguy
dc06cadb8a [ASDisplayNode] Fix some gaps in the bridging of new contents* properties. (#435)
I audited this more carefully and found some gaps in my PR from yesterday.

This also ensures the grouping and ordering of all the contents properties
is consistent across all of the places they appear.

In the future, it would be great to make the #define macros more sophisticated
so that we can add property bridging with fewer lines changed, and for
objects besides ASDisplayNode too!
2017-07-13 09:53:51 +00:00
Adlai Holler
1fa498873e Use a sentinel NSUInteger for node layout data #trivial (#428)
* Use a sentinel NSUInteger for node layout data

* Add a comment

* Address feedback from @appleguy
2017-07-10 12:10:04 +00:00
appleguy
bc361caf5e [ASDisplayNode] Allow setting stretchable contents on nodes; add bridged properties. (#429)
This makes it much easier to use the ASCoreAnimationExtras method which offers by
far the most efficient way to display a stretchable image.

In the future, we should move that function to UIImage+ASConvenience or another
header where it can be more easily found and enjoyed!
2017-07-09 10:54:39 -07:00
Brandon Kase
554c688eba Workaround clang4.0 <stdatomic.h> initialization (#426)
Texture fails to build with this error on clang 4.0:

```
external/Texture/pod_support/Headers/Public/AsyncDisplayKit/ASDispatch.h:32:35: error: illegal initializer type 'atomic_size_t' (aka '_Atomic(size_t)')
  __block atomic_size_t counter = ATOMIC_VAR_INIT(0);
                                  ^
In module 'std' imported from external/Texture/pod_support/Headers/Public/AsyncDisplayKit/ASStackUnpositionedLayout.h:18:
/private/var/tmp/_bazel_bkase/a00d4cbe29902fb63d5778cc19944cd2/external/clang40/bin/../include/c++/v1/atomic:1839:30: note: expanded from macro 'ATOMIC_VAR_INIT'
                             ^
1 error generated.
```

See
http://techqa.info/programming/question/38233019/Initializing-an--atomic-int--with-a-braced-constant--Is-this-valid-C-code--If-so-why-does-it-not-compile-in-clang-

Replacing the intialization with just 0 (and not the macro fixes the
error). For now this is safe because the macro just expands to the
value.
2017-07-07 16:29:50 -07:00
Ivan Matkov
b12752ed5e Install jazzy on travis build 2017-07-07 15:08:45 +03:00
Ivan Matkov
3ee72d0205 Fix distribution build 2017-07-07 14:52:00 +03:00
Nicholas Guriev
f2e246c1bf Remove deprecated call of AES_ctr128_encrypt
* The AES_ctr128_encrypt function is not available in OpenSSL 1.1.0
   without a special compiler flag
 * Fix a small misspelling
2017-07-06 23:26:40 +03:00
Gregory K
de33700312 Merge pull request #30 from telegramdesktop/tdesktop
Add virtual destructor to NetworkAddress.
2017-07-06 21:32:46 +03:00
Huy Nguyen
e78d70eec4 [ASCollectionView] Small improvements (#407)
* Minor refactors in ASCollectionView and its private cell classes
- `_ASCollectionReusableView` and `_ASCollectionViewCell` no longer expose getters for their collection element and cell node properties. This is to make sure that clients can only obtain elements from the visible map which is always the source of truth.
- Since the map can return `nil` for an element request, it's much safer to check and avoid adding/removing a nil pointer to an `NSArray`.
- Since we use a special way to check whether an object of kind of `_ASCollectionViewCell` or `_ASCollectionReusableView`, based on the assumption that these classes are subclass restricted, I added cast-or-return  macros in the header files, closer to where the restrictions are declared.

* Add ASDynamicCastStrict

* Add element and node properties back to _ASCollectionReusableView and _ASCollectionViewCell

* Assert unexpected nil elements

* Always mark an element visible even if it is backed by an UIKit / non-_ASCollection* view

* Fix typo

* Remove unnecessary changes

* Dump mistakes

* Update CHANGELOG

* Can't track visibility of elements backed by non-_AS views
2017-07-06 17:38:23 +00:00
John Preston
757a5d8ec3 Add virtual destructor to NetworkAddress.
Subclasses of NetworkAddress are deleted using pointers to the base class,
so a virtual destructor is required. Also fix a couple of warnings on 64bit.
2017-07-06 20:16:18 +03:00
Ivan Matkov
5390ea988e Workaround for jazzy bug 2017-07-06 19:08:34 +03:00
Gregory K
0d5530641f Merge pull request #29 from UnigramDev/public
SetProxy on RT too, other small fixes
2017-07-06 18:44:20 +03:00
Fela Ameghino
15dabd5a14 SetProxy on RT too, other small fixes 2017-07-06 17:33:47 +02:00
Huy Nguyen
f1b07d97b6 Add missing import in ASDisplayNode+AsyncDisplay (#423) 2017-07-06 14:53:51 +00:00
appleguy
a68f3c5aa9 [ASCollectionElement] Add checks for nil element, prior to other PRs landing. (#421) 2017-07-05 14:14:35 -07:00
Adlai Holler
d00ed249e5 Introduce ASIntegerMap, improve our changeset handling #trivial (#405)
* Introduce ASIntegerMap, improve our changeset handling

Rename to ASIntegerMap

License header

* Add unit tests for ASIntegerMap

* Address nit
2017-07-05 13:29:02 -07:00
appleguy
03592e0669 [ASDisplayNode] -didEnterPreloadState does not need to call -layoutIfNeeded #trivial (#411)
This was originally added for ASCollectionNode and ASTableNode preloading to work
as intended when nested inside of another ASRangeController-powered node. Indeed,
it is still necessary to trigger layout on these UIKit-backed components in order
for their own ASRangeControllers to start preparing content within them.

However, unlike the comment suggests, it is *not* necessary to do this for image
nodes. ASNetworkImageNode has only one .URL, and does not use the .bounds or
.calculatedLayout at all during loading. Even the ASMultiplexImageNode does not
use the .bounds, and the ASMapNode uses .calculatedLayout instead of .bounds.

This change has important performance benefits. In particular, it avoids
layouts that would occur on the main thread, often including text sizing,
and also can result in redundant layout passes (even during a layout pass that
triggers a node to enter the preload range, it may force its own layout early).

It would be great to test this change with Pinterest to confirm its safety, but
based on a full audit of the framework codebase, the only possibility that I
see for a regression is if app implementations of -didEnterPreloadState make
direct use of .bounds instead of .calculatedLayout (which is easy to fix).
2017-07-05 19:07:43 +00:00
Huy Nguyen
ed9a3cc2e0 [ASDataController] Apply new visible map inside batch updates block (#420)
* ASDataController to apply new visible map inside batch updates block

* Update CHANGELOG

* Sorry, put up a PR that doesn't even build LOL
2017-07-05 19:04:17 +00:00
Huy Nguyen
4a1aea2373 [ASDataController] Fix a crash in table view caused by executing an empty change set during layoutSubviews (#416)
* Fix a crash in table view caused by executing an empty change set during layoutSubviews
- Previously, when a change set is empty, `ASDataController` forwards the change set to its delegate right away, without dispatching to its editing queue and then back to main.
- This behaviour can potentially cause bad internal states in UITableView which trigger a crash reported in https://github.com/TextureGroup/Texture/issues/83.
- Fix by still reusing the existing pending map, because the data source's state has not changed, but go through the editing queue and main queue tunnel.

* Update CHANGELOG
2017-07-05 17:55:44 +00:00
Ivan Matkov
9c609cb081 Fix jazzy paths 2017-07-05 18:50:19 +03:00
Tyler Neveldine
cf870dc8e9 [ASVideoPlayerNode] Check that the video player's delegate implements the didTapFullScreenButtonNode method before calling it #trivial (#418) 2017-07-05 12:10:58 +00:00
appleguy
fb6cad941f [ASDisplayNode+Layout] In layoutThatFits:, check and use _pending layout if valid. (#413)
I believe this check is supposed to be here. Unit tests pass with it in place.
Without it, calling layoutThatFits: (as ASDataController does) and then calling
it again later (as ASCollectionNode does when answering the sizeForItem: call)
will recompute the layout, potentially on main.

This seems to have more of an impact / benefit for Yoga layouts, but I don't think
its benefit is exclusive to them.
2017-07-05 10:02:38 +00:00
Peter
5e9881d26f Merge commit '47298fcafe52dca86b5290e507f99b6aa2abbde8' 2017-07-04 20:45:05 +03:00
Peter
e0bf15dc73 no message 2017-07-04 20:45:00 +03:00
Huy Nguyen
5d72a76fb9 Integrate Weaver into ASDKGram (#412)
* Integrate Weaver into ASDKGram

* Update the license of app delegate
2017-07-04 12:20:17 +00:00
Adlai Holler
8ec4b312cf Overhaul our logging, add activity tracing support. (#399)
* Improve the os_log and os_activity integration

* Address feedback from Scott and Huy
2017-07-03 19:03:26 -07:00
Grishka
445433f4f0 Proxy fix 2017-07-04 03:04:59 +03:00
appleguy
2cda73a334 [ASTextNode2] Provide compiler flag to enable ASTextNode2 for all usages. (#410)
* [ASTextNode2] Provide compiler flag to enable ASTextNode2 for all usages.

The runtime switch is helpful, but is too slow to be shipped in a large
production application where startup time is carefully optimized.

Although this doesn't pass text-related snapshot tests when enabled, it
does allow apps to rely on built-in components like ASButtonNode using
the same text stack as when they are manually creating ASTextNode2
instances.

A simpler approach would be to use a #define ASTextNode ASTextNode2,
but this would create unusual keyword highlighting in code referencing
ASTextNode. However, because it would be less invasive and this is
not on by default, we could do that instead if preferred.

* Update AsyncDisplayKit.h

* [ASTextNode2] Improve naming and documentation of ASTEXTNODE_EXPERIMENT_GLOBAL_ENABLE

* [ASTextNode2] CHANGELOG.md for #410.
2017-07-02 21:40:51 -07:00
appleguy
c70a97d28f [ASTextNode2] Add initial implementation for link handling. (#396)
* [ASTextNode2] Add initial implementation for link handling.

This is a fairly basic first step to achieving feature parity between ASTextNode2
and ASTextNode. It does not yet do the 9-box detection of links, and there is
other code from ASTextNode that could be shared to improve this.

However, in the interest of getting a shippable implementation running as soon
as possible, I'm hoping to quickly refine this. Then we can continue improving
it based on the original ASTextNode with the benefit of testing UI against it.

* [ASTextNode2] Refine implementation of link handling.
2017-07-02 19:50:59 -07:00
Grishka
1be4d016a4 Refactor all the things!
- Added support for SOCKS5 proxy
- Also, a bunch of bugfixes
2017-07-03 04:42:49 +03:00
appleguy
1d1a3787c2 [Yoga] Refine the handling of measurement functions when Yoga is used. (#408)
This ensures that measure funcs are not set for container / empty spacer
nodes, because Yoga has more internal capabilities than layoutThatFits:
knows about.

Avoid need for the main layout pass to directly call setup for measure
funcs, by making it an implicit part of .yogaLayoutInProgress =.

Tear down the measure func after the layout pass to avoid retain cycle.
2017-07-02 13:01:07 -07:00
Adlai Holler
fcb293e049 Fix issue where supplementary elements don't track section changes (#404)
* Fix collection view supplementary issue

* Add a fast-path

* Remove the old index path entry unconditionally

* Handle overwriting bug
2017-07-01 10:55:59 -07:00
appleguy
5e288c596e [Documentation] Improve description of synchronous concurrency with screenshot and video link. (#406)
* Add screenshot for synchronous concurrency description

* Include reference to new image, improve text of synchronous concurrency doc
2017-07-01 13:34:35 +01:00
Garrett Moon
f71963d717 Fixed changelog for real 2017-06-30 14:37:48 -07:00