Commit Graph

13022 Commits

Author SHA1 Message Date
Huy Nguyen
5ef1d2b541 Improve hash functions of image and text nodes (#3265)
* Improve hash functions of image and text nodes

* Move ASEqualityHashHelpers to Private/
2017-04-13 16:13:21 -07:00
Huy Nguyen
c642771e1c Remove unused initializer in ASTableNode (#3268) 2017-04-13 16:11:32 -07:00
Huy Nguyen
c325ae2cb5 Move thread ownership assertion to ASThread (#3269) 2017-04-13 15:49:32 -07:00
Adlai Holler
390d8f231c Disable event logging by default (#3272) 2017-04-13 13:07:48 -07:00
overtake
18beabff2e Merge branch 'master' of https://github.com/peter-iakovlev/TelegramCore 2017-04-13 21:01:37 +03:00
overtake
752c49e077 no message 2017-04-13 21:01:31 +03:00
Peter
cd0476e1cc no message 2017-04-13 20:43:34 +03:00
Peter
b4a2fe04f6 no message 2017-04-13 20:43:12 +03:00
Christian Selig
3dd2da5b9f Fix incorrect argument label in function comment (#3261) 2017-04-13 18:38:44 +01:00
overtake
32d12c5940 no message 2017-04-13 19:42:08 +03:00
Huy Nguyen
7d365c7d07 Introduce ASCollectionLayout and friends (#3130)
* Introduce ASCollectionViewLayout
- `ASCollectionViewLayout` is an async `UICollectionViewLayout` that encapsulates its layout calculation logic into a separate thread-safe object which can be used ahead of time and/or on multiple threads.
- `ASDataController` now can prepare for a new layout resulted from a change set before `ASCollectionView` even knows about it. By the time the change set it ready to be consumed by `ASCollectionView`, its new layout is also ready.
- New `ASCollectionViewLayoutCalculating` protocol that is simple and generic enough that many types of calculators can be built on top. `ASCollectionViewLayoutSpecCalculator` conforms to `ASCollectionViewLayoutCalculating` protocol and can be backed by any layout spec (e.g `ASStackLayoutSpec`, `PIMasonryLayoutSpec`, etc). We can even build a `ASCollectionViewLayoutYogaCalculator` that uses Yoga internally.
- A built-in `ASCollectionViewFlowLayoutCalculator` that is a subclass of `ASCollectionViewLayoutSpecCalculator` and uses a multi-threaded multi-line `ASStackLayoutSpec` internally. The result is a performant and thread-safe flow layout calculator.
- Finally, `ASCollectionViewLayout` can be subclassed to handle a specific type of calculator with optimizations implemented based on the knowledge of such calculator. For example, `ASCollectionViewFlowLayout` can have a highly optimized implementation of `-layoutAttributesForElementsInRect:`.

Protocolize layout calculator providing and consuming

Add flex wrap documentation

Add a `multithreaded` flag to ASStackLayoutSpec that forces it to dispatch even if it's off main
- Update ASCollectionViewFlowLayoutSpecCalculator to use that flag.

Minor change in ASCollectionViewLayout

Implement Mosaic layout calculator

Minor change

Fix project file

Rename and fix project file

Skip fetching constrained size only if a layout calculator is available

Update examples/ASCollectionView

Remove unnecessary change in ASTableView

Address comments

Rename collection view calculator protocols

Minor changes after rebasing with master

Add ASLegacyCollectionLayoutCalculator for backward compatibility

Remove ASCollectionLayoutSpecCalculator

Remove ASLegacyCollectionLayoutCalculator

Introduce ASCollectionLayout
- A wrapper object that contains content size and an element to rect table.
- Collection layout calculators to return this new object instead of an ASLayout.

Before adding a content cache

Finishing hooking up ASCollectionLayoutDataSource to ASCollectionNode

Stash

Finish ASCollectionLayout

Rough impl of ASCollectionFlowLayout

Revert changes in CustomCollectionView example

Move ASRectTable back to Private

* Rename ASCollectionContentAttributes to ASCollectionLayoutState

* Address other comments

* Introduce ASCollectionLayoutDelegate and make ASCollectionLayout private

* Address comments

* API tweaks:
- Replace `-layoutContextWithElementMap:` in ASCollectionLayoutDelegate with `-additionalInfoForLayoutWithElements:`. The returned object is then stored in ASCollectionLayoutContext for later lookups.
- ASCollectionLayoutContext has no public initializer.
- ASDataControllerLayoutDelegate no longer requires a context of type ASCollectionLayoutContext but simply an `id`. This helps decouple ASDataController and ASCollectionLayout.
- Rename `elementMap` to `elements`.
- Rename `visibleMap` to `visibleElements`.
- Other minor changes.

* Rename ASCGSizeHash to ASHashFromCGSize

* Make sure to call super in -[ASCollectionLayout prepareLayout]

* Update example/ASCollectionView to use ASCollectionFlowLayoutDelegate

* Remove unnecessary change
2017-04-12 11:13:44 +01:00
Peter
69ebab9369 Merge commit '43b0f15d00ea909280bf0ac9414aa40d9b2a4fbd' 2017-04-12 13:02:40 +03:00
Peter
1dcf9ee2eb no message 2017-04-12 13:02:33 +03:00
Michael Schneider
ae1e299f21 Fix PINRemoteImageManagerPriority deprecation (#3258) 2017-04-11 10:52:10 -07:00
Garrett Moon
8c3775f5e2 Need to check availability before use of macros. (#3254)
* Need to check availability before use of macros.

* Get rid of PCH and enforce macro definition.

* Remove prefix

* Switch to global warning instead, much better.
2017-04-10 15:06:40 -07:00
Garrett Moon
68a8d5f468 Add download resume support (#3246)
* Adds support for resuming downloads that were canceled due to exiting preload range.

* Update to latest PINRemoteImage

* Fix warnings

* Address comments. Thanks @nguyenhuy!
2017-04-10 11:18:05 -07:00
Heberti Almeida
582bca93cb Fix failing batch fetch in some cases. (#3242)
* Fixed failed batch fetch caused by _deceleratingVelocity

* Fixed indentation
2017-04-10 09:35:44 -07:00
Peter
bf8a14438f Merge commit 'dba36b678a895bd92ff714f6c977a706da5dc5a9' 2017-04-09 21:37:15 +03:00
Peter
d9431dcb78 no message 2017-04-09 21:35:18 +03:00
overtake
dba36b678a login design improvements 2017-04-09 20:08:12 +03:00
Grishka
88d22e82cf Removed static libs 2017-04-09 19:19:52 +03:00
Grishka
04dc380359 Merge branch 'public' of github.com:grishka/libtgvoip into public 2017-04-09 19:16:34 +03:00
Grishka
333c4a1101 Added working audio i/o for OS X
Added simple audio resampler
Replaced prebuilt static libs with their sources & added that to all project files (closes #5)
2017-04-09 19:14:33 +03:00
overtake
43b0f15d00 Merge branch 'master' of https://github.com/peter-iakovlev/Postbox 2017-04-09 19:06:39 +03:00
Peter
b0e511bea6 no message 2017-04-09 16:32:13 +03:00
overtake
49f82c1096 Merge branch 'master' of https://github.com/peter-iakovlev/TelegramCore 2017-04-08 18:16:47 +03:00
overtake
9fae9ebc06 no message 2017-04-08 18:16:39 +03:00
overtake
e43f479b7c Merge branch 'master' of https://github.com/peter-iakovlev/Postbox
Conflicts:
	Postbox/SqliteInterface.swift
2017-04-08 18:06:22 +03:00
Peter
f747bb4716 no message 2017-04-08 17:23:13 +03:00
Peter
403a723c6f no message 2017-04-08 17:22:56 +03:00
Adlai Holler
b41816d40d Standardize Dependency Flags for PINRemoteImage, IGListKit (#3244)
* no message

* Go further

* Make the symbols public so that apps actually build

* Move ASAvailability into the umbrella header

* Remove duplicate define

* Put the file back where it was in the list

* Revert "Put the file back where it was in the list"

This reverts commit 6a80c15b5b5efe5ff39812a018114e8bdc1dc0cf.
2017-04-07 15:04:50 -07:00
Benjamin Scholtysik (Reimold)
79c032efd6 Merge pull request #405 from erychagov/delete/support-ios-6
Remove all dependences iOS 6
2017-04-06 11:52:27 -07:00
Adlai Holler
873ae64cec Remove macOS support (#3245) 2017-04-05 11:58:11 -07:00
Benjamin Scholtysik (Reimold)
32268c855c Merge pull request #406 from bitstadium/feature/fix-ci-simulator-timeout
Start Simulator manually before tests to avoid timeouts
2017-04-05 09:49:41 -07:00
Garrett Moon
30ad10da3c _setImage wasn't calling correct implementation (#3243)
_setImage is intended to call the super version of the method,
however with the adoption of the new _locked_ prefix, ASImageNode's
implementation would call back into ASNetworkImageNode's implementation.
This restore the intent of the _setImage method.
2017-04-04 15:13:10 -07:00
Huy Nguyen
75ad248f8c Fix failing build in XCode 8.3 (#3241) 2017-04-04 14:37:45 -07:00
Alex Pretzlav
f5e624b51c Fix bounds calculation for masked sublayers 2017-04-04 14:29:08 -07:00
Tim Malseed
5b428e3be1 Fixed typo in LOTAnimationView function
_callCompletionIfNecesarry -> _callCompletionIfNecessary
2017-04-04 15:32:31 +10:00
Adlai Holler
e1f7b86756 Add support for IGListKit > 2.1, without IGListCollectionView (#3239) 2017-04-03 12:52:36 -07:00
Adlai Holler
42eb955d8f Range controller: do not schedule range update after rendering finishes if already in full range mode (#3236) 2017-04-03 09:57:16 -07:00
overtake
b192142d34 changes 2017-04-03 16:15:42 +03:00
Rychagov Evgeny
9db991d20c Removed unused code 2017-04-03 14:58:51 +03:00
Adlai Holler
c7794a31dd Beef up the headers for ASSectionController and ASSupplementaryNodeSource (#3233) 2017-04-03 11:09:57 +01:00
appleguy
d4af736985 [ASCollectionView] Improve interop to silence invalid layout warnings, fix supplementary passthrough. (#3178)
* [ASCollectionView] Improve interop to silence invalid layout warnings, fix supplementary passthrough.

Before this change, passthrough of supplementary elements didn't work properly -- it would get rehosted into the blank ASCellNode.

* [ASCollectionView] Ensure that IGListKit-handled supplementary views are sent through ASRangeController.

* [ASCellNode] When .shouldUseUIKitCell == YES, don't remove the subviews of the .contentView
2017-04-02 12:11:44 -07:00
overtake
b9b25953bc no message 2017-04-02 21:53:00 +03:00
overtake
4495e88da9 no message 2017-04-02 21:53:00 +03:00
overtake
e3a8391c3c no message 2017-04-02 21:52:59 +03:00
Grishka
163bab1ce7 fixes & project file for OS X 2017-04-02 18:24:17 +03:00
overtake
81c4b66e31 Merge branch 'master' of https://github.com/peter-iakovlev/Postbox 2017-04-01 16:50:36 +03:00
Peter
bd4e29ecbe no message 2017-04-01 16:48:13 +03:00