-
Notifications
You must be signed in to change notification settings - Fork 873
/
Copy pathCallSettingsModalController.swift
50 lines (34 loc) · 1.43 KB
/
CallSettingsModalController.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
//
// CallSettingsModalController.swift
// Telegram
//
// Created by Mikhail Filimonov on 21/02/2019.
// Copyright © 2019 Telegram. All rights reserved.
//
import Cocoa
import TelegramCore
import SwiftSignalKit
import Postbox
import TGUIKit
func CallSettingsModalController(_ sharedContext: SharedAccountContext, presentation: TelegramPresentationTheme = theme) -> InputDataModalController {
var close: (()->Void)? = nil
let controller = CallSettingsController(sharedContext: sharedContext, presentation: presentation)
controller.getBackgroundColor = {
return presentation.colors.listBackground
}
controller.leftModalHeader = ModalHeaderData(image: theme.icons.modalClose, handler: {
close?()
})
let modalController = InputDataModalController(controller, presentation: presentation)
modalController._hasBorder = false
modalController.getModalTheme = {
.init(text: presentation.colors.text, grayText: presentation.colors.grayText, background: .clear, border: .clear, accent: presentation.colors.accent, grayForeground: .clear, activeBackground: presentation.colors.background, activeBorder: presentation.colors.border, listBackground: .clear)
}
modalController.getHeaderBorderColor = {
return presentation.colors.border
}
close = { [weak modalController] in
modalController?.close()
}
return modalController
}