-
Notifications
You must be signed in to change notification settings - Fork 873
/
Copy pathAvatar_StickersList.swift
57 lines (46 loc) · 1.28 KB
/
Avatar_StickersList.swift
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
//
// Avatar_StickersList.swift
// Telegram
//
// Created by Mike Renoir on 22.04.2022.
// Copyright © 2022 Telegram. All rights reserved.
//
import Foundation
import TGUIKit
import AppKit
final class Avatar_StickersList : View {
private var stickersView: NSView?
required init(frame frameRect: NSRect) {
super.init(frame: frameRect)
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
func set(view: NSView, context: AccountContext, animated: Bool) {
self.stickersView = view
self.addSubview(view)
needsLayout = true
}
override func layout() {
super.layout()
self.stickersView?.frame = bounds
}
}
final class Avatar_EmojiList : View {
private var stickersView: NSView?
required init(frame frameRect: NSRect) {
super.init(frame: frameRect)
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
func set(view: NSView, context: AccountContext, animated: Bool) {
self.stickersView = view
self.addSubview(view)
needsLayout = true
}
override func layout() {
super.layout()
self.stickersView?.frame = bounds
}
}