[BREAKGLASS] A private messenger for iOS. https://signal.org
Go to file
Jordan Rose 4e37af097b
MediaGallery: Separate the lazy loading logic into a testable MediaGallerySections
MediaGallery models a list of GalleryDate-based sections (in practice, months), each of which has a certain number of items. Sections are loaded on demand (that is, there may be newer and older sections that are not in the model), and always know their number of items. Items are also loaded on demand, potentially non-contiguously. This model is designed around the needs of UICollectionView (a thread's All Media view), but it also supports flat views of media (swiping between items in the media detail view, which can cross album boundaries).

This model is a result of refactoring I did last year to improve the performance and UX of the All Media view, but the implementation in MediaGallery.swift is entangled with the actual attachments and messages in the database, making it hard to test. This commit pulls the state management part out into its own struct, MediaGallerySections, which wraps the OrderedDictionary of items-by-section. Our MediaGalleryItem model references TSAttachmentStream directly and our queries go straight to the database, so to avoid having to set up real attachments in testing, MediaGallerySections is generic over a loader (delegate? data source?) of items with "gallery dates" and unique IDs. Now all the basic section- and item-loading APIs can be unit-tested.
2022-05-09 18:04:12 -07:00
.github Change references from master to main 2022-05-02 10:30:40 -05:00
fastlane fastlane: updated transifex config file 2022-05-02 10:48:46 -05:00
Instruments added missing Signalyzer file (#4017) 2022-02-21 08:07:21 +01:00
Pods@76e1e21283 Update to RingRTC v2.20.5 2022-05-05 23:43:21 -07:00
Scripts Harden upload_metadata script 2022-05-05 10:13:47 -05:00
Signal MediaGallery: Separate the lazy loading logic into a testable MediaGallerySections 2022-05-09 18:04:12 -07:00
Signal.xcodeproj MediaGallery: Separate the lazy loading logic into a testable MediaGallerySections 2022-05-09 18:04:12 -07:00
Signal.xcworkspace Fix copyright year in Xcode template 2022-04-25 12:16:49 -07:00
SignalMessaging Fix protocol conformance warnings 2022-05-09 11:44:05 -05:00
SignalNSE "Bump build to 5.38.0.6." (nightly-05-07-2022) 2022-05-07 04:00:59 -07:00
SignalServiceKit Fix some codegen designated initializers 2022-05-09 13:59:38 -07:00
SignalShareExtension "Bump build to 5.38.0.6." (nightly-05-07-2022) 2022-05-07 04:00:59 -07:00
SignalUI Use shorter fog report URI in wallet 2022-05-09 08:11:42 -05:00
SignalUITests Move MobileCoin SDK to SignalUI. 2021-11-02 14:26:04 -03:00
ThirdParty Update to RingRTC v2.20.5 2022-05-05 23:43:21 -07:00
.clang-format Update clang-format with AllowShortEnumsOnASingleLine: false 2022-03-14 11:20:20 -07:00
.gitattributes Supporting diffing of localizablestrings. 2015-09-14 12:26:47 +02:00
.gitignore Manage app store metadata with transifex 2021-04-22 12:53:43 -07:00
.gitmodules Convert to just using CocoaPods for dependencies 2020-01-02 12:03:57 -08:00
.ruby-version Update to ruby 2.6.9 2022-01-10 10:50:09 -06:00
.swiftlint.yml Disable SwiftLint for_where rule 2022-05-05 16:15:13 -05:00
.xcode-version Use Xcode 13 for nightly builds 2021-08-20 15:36:46 -07:00
BUILDING.md The Application Group string is located in TSConstants.swift. 2020-06-23 19:09:49 -07:00
CONTRIBUTING.md Update donation link in contribution instructions 2020-08-19 15:12:03 -05:00
Gemfile Remove cocoapods-binary 2022-04-26 09:20:14 -07:00
Gemfile.lock Remove cocoapods-binary 2022-04-26 09:20:14 -07:00
Jenkinsfile ci labels PRs with GH title 2019-01-11 10:53:22 -07:00
LICENSE Update license. 2017-04-11 18:09:16 -04:00
MAINTAINING.md PR Feedback 2020-01-02 12:06:44 -08:00
Makefile Show progress during make dependencies 2022-01-27 09:39:48 -08:00
Podfile Remove cocoapods-binary 2022-04-26 09:20:14 -07:00
Podfile.lock Update to RingRTC v2.20.5 2022-05-05 23:43:21 -07:00
README.md Change references from master to main 2022-05-02 10:30:40 -05:00
SignalServiceKit.podspec Update to LibSignalClient v0.15.0 2022-03-24 11:55:45 -07:00

Signal iOS

Signal is a free, open source, messaging app for simple private communication with friends.

Available on the App Store

Also available on Android and Desktop.

Questions?

For troubleshooting and questions, please visit our support center or unofficial community forum.

Contributing Bug Reports

We use GitHub for bug tracking. Please search existing issues and create a new one if the issue is not yet tracked. For Android users, please use the Signal for Android issue tracker.

Contributing Translations

Help us translate Signal! The translation effort happens on Transifex.

Contributing Code

Instructions on how to setup your development environment and build Signal-iOS can be found in BUILDING.md. Other useful instructions for development can be found in the Development Guide wiki page. We also recommend reading the contribution guidelines.

Contributing Ideas

Have something you want to say about Signal Foundation projects or want to be part of the conversation? Get involved in the community forum.

Cryptography Notice

This distribution includes cryptographic software. The country in which you currently reside may have restrictions on the import, possession, use, and/or re-export to another country, of encryption software. BEFORE using any encryption software, please check your country's laws, regulations and policies concerning the import, possession, or use, and re-export of encryption software, to see if this is permitted. See http://www.wassenaar.org/ for more information.

The U.S. Government Department of Commerce, Bureau of Industry and Security (BIS), has classified this software as Export Commodity Control Number (ECCN) 5D002.C.1, which includes information security software using or performing cryptographic functions with asymmetric algorithms. The form and manner of this distribution makes it eligible for export under the License Exception ENC Technology Software Unrestricted (TSU) exception (see the BIS Export Administration Regulations, Section 740.13) for both object code and source code.

License

Licensed under GPLv3

Copyright 2014-2022 Open Whisper Systems

Apple and the Apple logo are trademarks of Apple Inc., registered in the U.S. and other countries. App Store is a service mark of Apple Inc., registered in the U.S. and other countries.