Skip to content

Commit ebcd055

Browse files
author
Isaac
committed
Temp
1 parent 6ee1edc commit ebcd055

76 files changed

Lines changed: 1351 additions & 1089 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎submodules/ActivityIndicator/Sources/ActivityIndicator.swift‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ private func generateIndefiniteActivityIndicatorImage(color: UIColor, diameter:
1616
}
1717

1818
private func convertIndicatorColor(_ color: UIColor) -> UIColor {
19-
if color.isEqual(UIColor(rgb: 0x007aff)) {
19+
if color.isEqual(UIColor(rgb: 0x007aff)) || color.isEqual(UIColor(rgb: 0x0088ff)) {
2020
return .gray
2121
} else if color.isEqual(UIColor(rgb: 0x2ea6ff)) {
2222
return .white

‎submodules/AudioBlob/Sources/BlobView.swift‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,7 @@ final class BlobNode: ASDisplayNode {
461461

462462
if let backgroundView = self.backgroundView, let color = self.color {
463463
let halfWidth = floor(self.bounds.width * self.minScale)
464-
backgroundView.update(size: CGSize(width: halfWidth, height: halfWidth), cornerRadius: halfWidth * 0.5, isDark: false, tintColor: color, transition: .immediate)
464+
backgroundView.update(size: CGSize(width: halfWidth, height: halfWidth), cornerRadius: halfWidth * 0.5, isDark: false, tintColor: .init(kind: .custom, color: color), transition: .immediate)
465465
backgroundView.frame = CGRect(origin: CGPoint(x: (self.bounds.width - halfWidth) * 0.5, y: (self.bounds.height - halfWidth) * 0.5), size: CGSize(width: halfWidth, height: halfWidth))
466466
}
467467
}

‎submodules/ChatListUI/BUILD‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ swift_library(
117117
"//submodules/TelegramUI/Components/Ads/AdsReportScreen",
118118
"//submodules/TelegramUI/Components/ButtonComponent",
119119
"//submodules/TelegramUI/Components/AnimatedTextComponent",
120+
"//submodules/TelegramUI/Components/EdgeEffect",
120121
],
121122
visibility = [
122123
"//visibility:public",

‎submodules/ChatListUI/Sources/ChatListContainerItemNode.swift‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ import Postbox
1313
import ChatListHeaderComponent
1414
import ActionPanelComponent
1515
import ChatFolderLinkPreviewScreen
16+
import EdgeEffect
17+
import ComponentDisplayAdapters
1618

1719
final class ChatListContainerItemNode: ASDisplayNode {
1820
private final class TopPanelItem {
@@ -37,6 +39,8 @@ final class ChatListContainerItemNode: ASDisplayNode {
3739

3840
private var floatingHeaderOffset: CGFloat?
3941

42+
private let edgeEffectView: EdgeEffectView
43+
4044
private(set) var emptyNode: ChatListEmptyNode?
4145
var emptyShimmerEffectNode: ChatListShimmerNode?
4246
private var shimmerNodeOffset: CGFloat = 0.0
@@ -74,9 +78,12 @@ final class ChatListContainerItemNode: ASDisplayNode {
7478
self.listNode.scrollHeightTopInset = ChatListNavigationBar.searchScrollHeight + ChatListNavigationBar.storiesScrollHeight
7579
}
7680

81+
self.edgeEffectView = EdgeEffectView()
82+
7783
super.init()
7884

7985
self.addSubnode(self.listNode)
86+
self.view.addSubview(self.edgeEffectView)
8087

8188
self.listNode.isEmptyUpdated = { [weak self] isEmptyState, _, transition in
8289
guard let strongSelf = self else {
@@ -442,6 +449,11 @@ final class ChatListContainerItemNode: ASDisplayNode {
442449
}
443450

444451
self.layoutAdditionalPanels(transition: transition)
452+
453+
let edgeEffectHeight: CGFloat = insets.bottom
454+
let edgeEffectFrame = CGRect(origin: CGPoint(x: 0.0, y: size.height - edgeEffectHeight), size: CGSize(width: size.width, height: edgeEffectHeight))
455+
transition.updateFrame(view: self.edgeEffectView, frame: edgeEffectFrame)
456+
self.edgeEffectView.update(content: self.presentationData.theme.list.plainBackgroundColor, rect: edgeEffectFrame, edge: .bottom, edgeSize: edgeEffectFrame.height, containerSize: size, transition: ComponentTransition(transition))
445457
}
446458

447459
func updateScrollingOffset(navigationHeight: CGFloat, offset: CGFloat, transition: ContainedViewLayoutTransition) {

‎submodules/ChatListUI/Sources/ChatListControllerNode.swift‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import ChatFolderLinkPreviewScreen
2121
import ChatListHeaderComponent
2222
import StoryPeerListComponent
2323
import TelegramNotices
24+
import EdgeEffect
2425

2526
public enum ChatListContainerNodeFilter: Equatable {
2627
case all

‎submodules/ContactListUI/BUILD‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ swift_library(
4646
"//submodules/UndoUI",
4747
"//submodules/TelegramIntents",
4848
"//submodules/ContextUI",
49+
"//submodules/TelegramUI/Components/EdgeEffect",
4950
],
5051
visibility = [
5152
"//visibility:public",

‎submodules/ContactListUI/Sources/ContactsControllerNode.swift‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import ChatListTitleView
1717
import ComponentFlow
1818
import SwiftUI
1919
import ContactsUI
20+
import EdgeEffect
2021

2122
private final class ContextControllerContentSourceImpl: ContextControllerContentSource {
2223
let controller: ViewController
@@ -48,6 +49,7 @@ private final class ContextControllerContentSourceImpl: ContextControllerContent
4849

4950
final class ContactsControllerNode: ASDisplayNode, ASGestureRecognizerDelegate {
5051
let contactListNode: ContactListNode
52+
private let edgeEffectView: EdgeEffectView
5153

5254
private let context: AccountContext
5355
private(set) var searchDisplayController: SearchDisplayController?
@@ -116,6 +118,8 @@ final class ContactsControllerNode: ASDisplayNode, ASGestureRecognizerDelegate {
116118
contextAction?(peer, node, gesture, location, isStories)
117119
})
118120

121+
self.edgeEffectView = EdgeEffectView()
122+
119123
super.init()
120124

121125
self.setViewBlock({
@@ -125,6 +129,7 @@ final class ContactsControllerNode: ASDisplayNode, ASGestureRecognizerDelegate {
125129
self.backgroundColor = self.presentationData.theme.chatList.backgroundColor
126130

127131
self.addSubnode(self.contactListNode)
132+
self.view.addSubview(self.edgeEffectView)
128133

129134
self.presentationDataDisposable = (context.sharedContext.presentationData
130135
|> deliverOnMainQueue).start(next: { [weak self] presentationData in
@@ -442,6 +447,11 @@ final class ContactsControllerNode: ASDisplayNode, ASGestureRecognizerDelegate {
442447

443448
self.contactListNode.frame = CGRect(origin: CGPoint(), size: layout.size)
444449

450+
let edgeEffectHeight: CGFloat = layout.intrinsicInsets.bottom
451+
let edgeEffectFrame = CGRect(origin: CGPoint(x: 0.0, y: layout.size.height - edgeEffectHeight), size: CGSize(width: layout.size.width, height: edgeEffectHeight))
452+
transition.updateFrame(view: self.edgeEffectView, frame: edgeEffectFrame)
453+
self.edgeEffectView.update(content: self.presentationData.theme.list.plainBackgroundColor, rect: edgeEffectFrame, edge: .bottom, edgeSize: edgeEffectFrame.height, containerSize: layout.size, transition: ComponentTransition(transition))
454+
445455
self.updateNavigationScrolling(transition: transition)
446456

447457
if let navigationBarComponentView = self.navigationBarView.view as? ChatListNavigationBar.View {

‎submodules/Display/Source/NavigationBackButtonNode.swift‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public class NavigationBackButtonNode: ASControlNode {
3131
}
3232
}
3333

34-
public var color: UIColor = UIColor(rgb: 0x007aff) {
34+
public var color: UIColor = UIColor(rgb: 0x0088ff) {
3535
didSet {
3636
self.label.attributedText = NSAttributedString(string: self._text, attributes: self.attributesForCurrentState())
3737
}

‎submodules/Display/Source/NavigationButtonNode.swift‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ private final class NavigationButtonItemNode: ImmediateTextNode {
107107
}
108108
}
109109

110-
public var color: UIColor = UIColor(rgb: 0x007aff) {
110+
public var color: UIColor = UIColor(rgb: 0x0088ff) {
111111
didSet {
112112
if let text = self._text {
113113
self.attributedText = NSAttributedString(string: text, attributes: self.attributesForCurrentState())
@@ -347,7 +347,7 @@ public final class NavigationButtonNode: ContextControllerSourceNode {
347347
public var pressed: (Int) -> () = { _ in }
348348
public var highlightChanged: (Int, Bool) -> () = { _, _ in }
349349

350-
public var color: UIColor = UIColor(rgb: 0x007aff) {
350+
public var color: UIColor = UIColor(rgb: 0x0088ff) {
351351
didSet {
352352
if !self.color.isEqual(oldValue) {
353353
for node in self.nodes {

‎submodules/Display/Source/TabBarController.swift‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,12 @@ public protocol TabBarController: ViewController {
1313
var controllers: [ViewController] { get }
1414
var selectedIndex: Int { get set }
1515

16-
var cameraItemAndAction: (item: UITabBarItem, action: () -> Void)? { get set }
17-
1816
func setControllers(_ controllers: [ViewController], selectedIndex: Int?)
1917

2018
func updateBackgroundAlpha(_ alpha: CGFloat, transition: ContainedViewLayoutTransition)
2119

22-
func viewForCameraItem() -> UIView?
2320
func frameForControllerTab(controller: ViewController) -> CGRect?
2421
func isPointInsideContentArea(point: CGPoint) -> Bool
25-
func sourceNodesForController(at index: Int) -> [ASDisplayNode]?
2622

2723
func updateIsTabBarEnabled(_ value: Bool, transition: ContainedViewLayoutTransition)
2824
func updateIsTabBarHidden(_ value: Bool, transition: ContainedViewLayoutTransition)

0 commit comments

Comments
 (0)