Refactor TelegramNotices, TelegramPermissions, PhotoResources, ImageTransparency, TinyThumbnail

This commit is contained in:
Peter
2019-08-11 03:56:10 +03:00
parent 1a1a1a890a
commit 55b0df2ff7
121 changed files with 3449 additions and 249 deletions

View File

@@ -1,5 +1,6 @@
import Foundation
@inlinable
public func mergeListsStableWithUpdates<T>(leftList: [T], rightList: [T], allUpdated: Bool = false) -> ([Int], [(Int, T, Int?)], [(Int, T, Int)]) where T: Comparable, T: Identifiable {
var removeIndices: [Int] = []
var insertItems: [(Int, T, Int?)] = []
@@ -180,6 +181,7 @@ public func mergeListsStableWithUpdates<T>(leftList: [T], rightList: [T], allUpd
return (removeIndices, insertItems, updatedIndices)
}
@inlinable
public func mergeListsStableWithUpdatesReversed<T>(leftList: [T], rightList: [T], allUpdated: Bool = false) -> ([Int], [(Int, T, Int?)], [(Int, T, Int)]) where T: Comparable, T: Identifiable {
var removeIndices: [Int] = []
var insertItems: [(Int, T, Int?)] = []