wip: new conversation menu screen
This commit is contained in:
parent
3d24c1526e
commit
53e67adb1c
|
@ -110,7 +110,7 @@ final class HomeVC: BaseVC, UITableViewDataSource, UITableViewDelegate, SeedRemi
|
|||
result.setCircularGlow(with: glowConfiguration)
|
||||
result.layer.masksToBounds = false
|
||||
result.tintColor = .white
|
||||
result.addTarget(self, action: #selector(createNewDM), for: .touchUpInside)
|
||||
result.addTarget(self, action: #selector(createNewConversation), for: .touchUpInside)
|
||||
|
||||
return result
|
||||
}()
|
||||
|
@ -731,17 +731,16 @@ final class HomeVC: BaseVC, UITableViewDataSource, UITableViewDelegate, SeedRemi
|
|||
self.navigationController?.setViewControllers([ self, searchController ], animated: true)
|
||||
}
|
||||
|
||||
// @objc func joinOpenGroup() {
|
||||
// let joinOpenGroupVC: JoinOpenGroupVC = JoinOpenGroupVC()
|
||||
// let navigationController: OWSNavigationController = OWSNavigationController(rootViewController: joinOpenGroupVC)
|
||||
//
|
||||
// if UIDevice.current.isIPad {
|
||||
// navigationController.modalPresentationStyle = .fullScreen
|
||||
// }
|
||||
//
|
||||
// present(navigationController, animated: true, completion: nil)
|
||||
// }
|
||||
//
|
||||
@objc func createNewConversation() {
|
||||
let newConversationVC = NewConversationVC()
|
||||
let navigationController = OWSNavigationController(rootViewController: newConversationVC)
|
||||
if UIDevice.current.isIPad {
|
||||
navigationController.modalPresentationStyle = .fullScreen
|
||||
}
|
||||
navigationController.modalPresentationCapturesStatusBarAppearance = true
|
||||
present(navigationController, animated: true, completion: nil)
|
||||
}
|
||||
|
||||
@objc func createNewDM() {
|
||||
let newDMVC = NewDMVC()
|
||||
let navigationController = OWSNavigationController(rootViewController: newDMVC)
|
||||
|
@ -762,13 +761,4 @@ final class HomeVC: BaseVC, UITableViewDataSource, UITableViewDelegate, SeedRemi
|
|||
navigationController.modalPresentationCapturesStatusBarAppearance = true
|
||||
present(navigationController, animated: true, completion: nil)
|
||||
}
|
||||
|
||||
// @objc func createClosedGroup() {
|
||||
// let newClosedGroupVC = NewClosedGroupVC()
|
||||
// let navigationController = OWSNavigationController(rootViewController: newClosedGroupVC)
|
||||
// if UIDevice.current.isIPad {
|
||||
// navigationController.modalPresentationStyle = .fullScreen
|
||||
// }
|
||||
// present(navigationController, animated: true, completion: nil)
|
||||
// }
|
||||
}
|
||||
|
|
|
@ -1,3 +1,200 @@
|
|||
// Copyright © 2022 Rangeproof Pty Ltd. All rights reserved.
|
||||
|
||||
import Foundation
|
||||
import UIKit
|
||||
|
||||
final class NewConversationVC: BaseVC, UITableViewDelegate, UITableViewDataSource {
|
||||
|
||||
// MARK: - UI
|
||||
|
||||
private lazy var newDMButton: NewConversationButton = NewConversationButton(icon: #imageLiteral(resourceName: "Message"), title: "vc_create_private_chat_title".localized())
|
||||
private lazy var newGroupButton: NewConversationButton = NewConversationButton(icon: #imageLiteral(resourceName: "Group"), title: "vc_create_closed_group_title".localized())
|
||||
private lazy var joinCommunityButton: NewConversationButton = NewConversationButton(icon: #imageLiteral(resourceName: "Globe"), title: "vc_join_public_chat_title".localized(), shouldShowSeparator: false)
|
||||
|
||||
private lazy var buttonStackView: UIStackView = {
|
||||
let lineTop = UIView()
|
||||
lineTop.set(.height, to: 0.5)
|
||||
lineTop.backgroundColor = Colors.border.withAlphaComponent(0.3)
|
||||
|
||||
let lineBottom = UIView()
|
||||
lineBottom.set(.height, to: 0.5)
|
||||
lineBottom.backgroundColor = Colors.border.withAlphaComponent(0.3)
|
||||
|
||||
let result = UIStackView(
|
||||
arrangedSubviews: [
|
||||
lineTop,
|
||||
newDMButton,
|
||||
newGroupButton,
|
||||
joinCommunityButton,
|
||||
lineBottom
|
||||
]
|
||||
)
|
||||
result.axis = .vertical
|
||||
return result
|
||||
}()
|
||||
|
||||
private lazy var buttonStackViewContainer = UIView(wrapping: buttonStackView, withInsets: .zero)
|
||||
|
||||
private lazy var contactsTitleLabel: UILabel = {
|
||||
let result = UILabel()
|
||||
result.textColor = Colors.text
|
||||
result.text = "Contacts"
|
||||
result.font = .systemFont(ofSize: Values.mediumSpacing)
|
||||
return result
|
||||
}()
|
||||
|
||||
private lazy var contactsTableView: UITableView = {
|
||||
let result = UITableView()
|
||||
result.delegate = self
|
||||
result.dataSource = self
|
||||
result.separatorStyle = .none
|
||||
result.backgroundColor = .clear
|
||||
result.register(view: UserCell.self)
|
||||
|
||||
return result
|
||||
}()
|
||||
|
||||
// MARK: - Lifecycle
|
||||
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
setUpNavBarStyle()
|
||||
setNavBarTitle(NSLocalizedString("vc_new_conversation_title", comment: ""))
|
||||
let navigationBar = navigationController!.navigationBar
|
||||
// Set up navigation bar buttons
|
||||
let closeButton = UIBarButtonItem(image: #imageLiteral(resourceName: "X"), style: .plain, target: self, action: #selector(close))
|
||||
closeButton.tintColor = Colors.text
|
||||
navigationItem.leftBarButtonItem = closeButton
|
||||
setUpViewHierarchy()
|
||||
}
|
||||
|
||||
private func setUpViewHierarchy() {
|
||||
buttonStackViewContainer.backgroundColor = Colors.cellBackground
|
||||
view.addSubview(buttonStackViewContainer)
|
||||
buttonStackViewContainer.pin([ UIView.HorizontalEdge.leading, UIView.HorizontalEdge.trailing ], to: view)
|
||||
buttonStackViewContainer.pin(.top, to: .top, of: view, withInset: Values.mediumSpacing)
|
||||
|
||||
view.addSubview(contactsTitleLabel)
|
||||
contactsTitleLabel.pin(.leading, to: .leading, of: view, withInset: Values.mediumSpacing)
|
||||
contactsTitleLabel.pin(.top, to: .bottom, of: buttonStackViewContainer, withInset: Values.smallSpacing)
|
||||
|
||||
view.addSubview(contactsTableView)
|
||||
contactsTableView.pin([ UIView.HorizontalEdge.leading, UIView.HorizontalEdge.trailing, UIView.VerticalEdge.bottom], to: view)
|
||||
contactsTableView.pin(.top, to: .bottom, of: contactsTitleLabel, withInset: Values.smallSpacing)
|
||||
}
|
||||
|
||||
// MARK: - UITableViewDataSource
|
||||
|
||||
func numberOfSections(in tableView: UITableView) -> Int {
|
||||
return 1
|
||||
}
|
||||
|
||||
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
|
||||
return 1
|
||||
}
|
||||
|
||||
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
|
||||
let cell: UserCell = tableView.dequeue(type: UserCell.self, for: indexPath)
|
||||
|
||||
return cell
|
||||
}
|
||||
|
||||
func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
|
||||
return nil
|
||||
}
|
||||
|
||||
// MARK: - UITableViewDelegate
|
||||
|
||||
func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat {
|
||||
return 0
|
||||
}
|
||||
|
||||
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
|
||||
tableView.deselectRow(at: indexPath, animated: true)
|
||||
}
|
||||
|
||||
// MARK: - Interaction
|
||||
|
||||
@objc private func close() {
|
||||
dismiss(animated: true, completion: nil)
|
||||
}
|
||||
|
||||
@objc func createNewDM() {
|
||||
let newDMVC = NewDMVC()
|
||||
self.navigationController?.pushViewController(newDMVC, animated: true)
|
||||
}
|
||||
|
||||
@objc func createClosedGroup() {
|
||||
let newClosedGroupVC = NewClosedGroupVC()
|
||||
self.navigationController?.pushViewController(newClosedGroupVC, animated: true)
|
||||
}
|
||||
|
||||
@objc func joinOpenGroup() {
|
||||
let joinOpenGroupVC: JoinOpenGroupVC = JoinOpenGroupVC()
|
||||
self.navigationController?.pushViewController(joinOpenGroupVC, animated: true)
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: NewConversationButton
|
||||
|
||||
private final class NewConversationButton: UIView {
|
||||
private let icon: UIImage
|
||||
private let title: String
|
||||
private let shouldShowSeparator: Bool
|
||||
|
||||
private static let height: CGFloat = 56
|
||||
private static let iconSize: CGFloat = 38
|
||||
|
||||
init(icon: UIImage, title: String, shouldShowSeparator: Bool = true) {
|
||||
self.icon = icon.withRenderingMode(.alwaysTemplate)
|
||||
self.title = title
|
||||
self.shouldShowSeparator = shouldShowSeparator
|
||||
super.init(frame: .zero)
|
||||
setUpViewHierarchy()
|
||||
}
|
||||
|
||||
override init(frame: CGRect) {
|
||||
preconditionFailure("Use init(icon:title:) instead.")
|
||||
}
|
||||
|
||||
required init?(coder: NSCoder) {
|
||||
preconditionFailure("Use init(icon:title:) instead.")
|
||||
}
|
||||
|
||||
private func setUpViewHierarchy() {
|
||||
let iconImageView = UIImageView(image: self.icon)
|
||||
iconImageView.contentMode = .center
|
||||
iconImageView.tintColor = Colors.text
|
||||
iconImageView.set(.width, to: Self.iconSize)
|
||||
|
||||
let titleLable = UILabel()
|
||||
titleLable.text = self.title
|
||||
titleLable.textColor = Colors.text
|
||||
titleLable.font = .systemFont(ofSize: Values.mediumFontSize)
|
||||
|
||||
let stackView = UIStackView(
|
||||
arrangedSubviews: [
|
||||
iconImageView,
|
||||
UIView.hSpacer(Values.mediumSpacing),
|
||||
titleLable,
|
||||
UIView.hStretchingSpacer()
|
||||
]
|
||||
)
|
||||
stackView.axis = .horizontal
|
||||
stackView.alignment = .center
|
||||
stackView.isLayoutMarginsRelativeArrangement = true
|
||||
stackView.layoutMargins = UIEdgeInsets(uniform: Values.mediumSpacing)
|
||||
addSubview(stackView)
|
||||
stackView.pin(to: self)
|
||||
stackView.set(.width, to: UIScreen.main.bounds.width)
|
||||
stackView.set(.height, to: Self.height)
|
||||
|
||||
let line = UIView()
|
||||
line.set(.height, to: 0.5)
|
||||
line.backgroundColor = Colors.border.withAlphaComponent(0.3)
|
||||
addSubview(line)
|
||||
line.pin([ UIView.VerticalEdge.bottom, UIView.HorizontalEdge.trailing ], to: self)
|
||||
line.pin(.leading, to: .leading, of: self, withInset: (Self.iconSize + 2 * Values.mediumSpacing))
|
||||
|
||||
line.isHidden = !shouldShowSeparator
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "Globe.pdf"
|
||||
"filename" : "Vector (1).pdf",
|
||||
"idiom" : "universal"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Binary file not shown.
|
@ -0,0 +1,181 @@
|
|||
%PDF-1.7
|
||||
|
||||
1 0 obj
|
||||
<< >>
|
||||
endobj
|
||||
|
||||
2 0 obj
|
||||
<< /Length 3 0 R >>
|
||||
stream
|
||||
/DeviceRGB CS
|
||||
/DeviceRGB cs
|
||||
q
|
||||
1.000000 0.000000 -0.000000 1.000000 0.000000 0.000000 cm
|
||||
0.000000 0.000000 0.000000 scn
|
||||
15.087405 24.729021 m
|
||||
15.087405 24.729021 15.043699 24.737762 15.026217 24.746504 c
|
||||
14.213280 24.912588 13.365377 25.000000 12.499993 25.000000 c
|
||||
11.634609 25.000000 10.786708 24.912588 9.973771 24.746504 c
|
||||
9.921324 24.746504 9.877617 24.720280 9.833911 24.711538 c
|
||||
4.222026 23.479021 0.000000 18.479021 0.000000 12.500000 c
|
||||
0.000000 5.603148 5.611885 0.000000 12.499993 0.000000 c
|
||||
19.388102 0.000000 24.999987 5.611889 24.999987 12.500000 c
|
||||
25.008728 18.505245 20.742996 23.531469 15.087405 24.729021 c
|
||||
h
|
||||
13.374119 1.783218 m
|
||||
13.374119 5.708042 l
|
||||
14.458035 5.777973 15.480761 5.926575 16.451040 6.136364 c
|
||||
15.690551 4.029720 14.790201 2.526224 14.388103 1.914337 c
|
||||
14.055936 1.853148 13.715028 1.809443 13.374119 1.783218 c
|
||||
13.374119 1.783218 l
|
||||
h
|
||||
10.585658 1.923079 m
|
||||
10.192302 2.526224 9.318177 3.968533 8.566429 6.013987 c
|
||||
9.615380 5.821680 10.638106 5.716784 11.625868 5.690559 c
|
||||
11.625868 1.791960 l
|
||||
11.276218 1.818184 10.926567 1.870630 10.585658 1.931820 c
|
||||
10.585658 1.923079 l
|
||||
h
|
||||
11.625868 23.208042 m
|
||||
11.625868 19.309441 l
|
||||
10.603142 19.283216 9.545450 19.178322 8.461535 18.968533 c
|
||||
8.968527 20.314686 9.659086 21.687063 10.594400 23.068182 c
|
||||
10.935308 23.129372 11.276218 23.173077 11.625868 23.199301 c
|
||||
11.625868 23.208042 l
|
||||
h
|
||||
14.379364 23.076923 m
|
||||
15.340901 21.643356 16.057684 20.227272 16.564678 18.837414 c
|
||||
15.568174 19.055944 14.501740 19.213287 13.374119 19.283216 c
|
||||
13.374119 23.208042 l
|
||||
13.715028 23.181818 14.047196 23.138111 14.379364 23.076923 c
|
||||
h
|
||||
23.216770 13.374126 m
|
||||
19.335655 13.374126 l
|
||||
19.309431 14.344406 19.213278 15.349651 19.020969 16.372379 c
|
||||
21.048941 15.620630 22.491247 14.755245 23.076910 14.361889 c
|
||||
23.138100 14.038462 23.181805 13.706294 23.208029 13.374126 c
|
||||
23.216770 13.374126 l
|
||||
h
|
||||
17.639851 13.374126 m
|
||||
13.382860 13.374126 l
|
||||
13.382860 17.587414 l
|
||||
14.737755 17.500000 15.996496 17.272728 17.141600 16.975525 c
|
||||
17.447544 15.734266 17.604887 14.527972 17.639851 13.374126 c
|
||||
17.639851 13.374126 l
|
||||
h
|
||||
11.634610 17.613636 m
|
||||
11.634610 13.374126 l
|
||||
7.351395 13.374126 l
|
||||
7.395101 14.562938 7.552444 15.795455 7.875870 17.071678 c
|
||||
9.169576 17.403847 10.428317 17.569931 11.634610 17.613636 c
|
||||
h
|
||||
5.646850 13.374126 m
|
||||
1.791957 13.374126 l
|
||||
1.818181 13.706294 1.861887 14.029720 1.923076 14.353147 c
|
||||
3.286712 15.279720 4.650347 15.970280 5.979018 16.468533 c
|
||||
5.777969 15.410839 5.673074 14.370629 5.646850 13.365385 c
|
||||
5.646850 13.374126 l
|
||||
h
|
||||
1.791957 11.625875 m
|
||||
5.673074 11.625875 l
|
||||
5.743004 10.515735 5.900346 9.466784 6.110137 8.479021 c
|
||||
4.737760 8.986015 3.330418 9.694057 1.914335 10.646853 c
|
||||
1.861887 10.970281 1.818181 11.293707 1.783216 11.625875 c
|
||||
1.791957 11.625875 l
|
||||
h
|
||||
7.368877 11.625875 m
|
||||
11.625868 11.625875 l
|
||||
11.625868 7.386364 l
|
||||
10.454540 7.421329 9.230764 7.587414 7.972024 7.902100 c
|
||||
7.674821 9.038463 7.447549 10.288462 7.360136 11.625875 c
|
||||
7.368877 11.625875 l
|
||||
h
|
||||
13.374119 7.412588 m
|
||||
13.374119 11.625875 l
|
||||
17.604885 11.625875 l
|
||||
17.526215 10.323427 17.307682 9.108392 17.019222 7.998251 c
|
||||
15.909082 7.709791 14.676566 7.491259 13.365377 7.412588 c
|
||||
13.374119 7.412588 l
|
||||
h
|
||||
19.309431 11.625875 m
|
||||
23.216770 11.625875 l
|
||||
23.190546 11.293707 23.146841 10.961538 23.085651 10.638112 c
|
||||
22.482506 10.236014 20.987753 9.335664 18.889851 8.575174 c
|
||||
19.090900 9.536714 19.239500 10.550699 19.309431 11.625875 c
|
||||
19.309431 11.625875 l
|
||||
h
|
||||
22.368870 16.765736 m
|
||||
21.389849 17.263987 20.096144 17.840910 18.557682 18.312937 c
|
||||
18.173067 19.615385 17.631109 20.952797 16.896845 22.298950 c
|
||||
19.335653 21.197552 21.302437 19.222029 22.368870 16.765736 c
|
||||
22.368870 16.765736 l
|
||||
h
|
||||
8.068177 22.281469 m
|
||||
7.368877 20.996504 6.844402 19.720280 6.459787 18.470280 c
|
||||
5.218529 18.085665 3.959788 17.569931 2.683565 16.870628 c
|
||||
3.758739 19.265734 5.681815 21.197552 8.068177 22.290211 c
|
||||
8.068177 22.281469 l
|
||||
h
|
||||
2.674824 8.138111 m
|
||||
4.012236 7.403847 5.332165 6.853148 6.625871 6.468531 c
|
||||
7.097898 4.938812 7.674821 3.636366 8.173073 2.657345 c
|
||||
5.725522 3.741261 3.758739 5.699301 2.674824 8.138111 c
|
||||
2.674824 8.138111 l
|
||||
h
|
||||
16.791948 2.639862 m
|
||||
17.307682 3.653847 17.902090 5.017483 18.391600 6.634617 c
|
||||
19.999990 7.124126 21.354885 7.709791 22.368870 8.225525 c
|
||||
21.284954 5.734266 19.283205 3.732519 16.791948 2.639862 c
|
||||
16.791948 2.639862 l
|
||||
h
|
||||
f
|
||||
n
|
||||
Q
|
||||
|
||||
endstream
|
||||
endobj
|
||||
|
||||
3 0 obj
|
||||
4273
|
||||
endobj
|
||||
|
||||
4 0 obj
|
||||
<< /Annots []
|
||||
/Type /Page
|
||||
/MediaBox [ 0.000000 0.000000 25.000000 25.000000 ]
|
||||
/Resources 1 0 R
|
||||
/Contents 2 0 R
|
||||
/Parent 5 0 R
|
||||
>>
|
||||
endobj
|
||||
|
||||
5 0 obj
|
||||
<< /Kids [ 4 0 R ]
|
||||
/Count 1
|
||||
/Type /Pages
|
||||
>>
|
||||
endobj
|
||||
|
||||
6 0 obj
|
||||
<< /Pages 5 0 R
|
||||
/Type /Catalog
|
||||
>>
|
||||
endobj
|
||||
|
||||
xref
|
||||
0 7
|
||||
0000000000 65535 f
|
||||
0000000010 00000 n
|
||||
0000000034 00000 n
|
||||
0000004363 00000 n
|
||||
0000004386 00000 n
|
||||
0000004559 00000 n
|
||||
0000004633 00000 n
|
||||
trailer
|
||||
<< /ID [ (some) (id) ]
|
||||
/Root 6 0 R
|
||||
/Size 7
|
||||
>>
|
||||
startxref
|
||||
4692
|
||||
%%EOF
|
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "Group.pdf"
|
||||
"filename" : "Group.pdf",
|
||||
"idiom" : "universal"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Binary file not shown.
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "Message.pdf"
|
||||
"filename" : "Vector.pdf",
|
||||
"idiom" : "universal"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Binary file not shown.
|
@ -0,0 +1,91 @@
|
|||
%PDF-1.7
|
||||
|
||||
1 0 obj
|
||||
<< >>
|
||||
endobj
|
||||
|
||||
2 0 obj
|
||||
<< /Length 3 0 R >>
|
||||
stream
|
||||
/DeviceRGB CS
|
||||
/DeviceRGB cs
|
||||
q
|
||||
1.000000 0.000000 -0.000000 1.000000 0.000000 0.000000 cm
|
||||
0.066667 0.066667 0.066667 scn
|
||||
0.953107 0.009306 m
|
||||
0.829203 0.009306 0.705298 0.027918 0.590926 0.074448 c
|
||||
0.228745 0.214037 0.000000 0.558357 0.000000 0.939899 c
|
||||
0.000000 20.482357 l
|
||||
0.000000 22.417992 1.610750 24.000000 3.602744 24.000000 c
|
||||
21.397257 24.000000 l
|
||||
23.379719 24.000000 25.000000 22.427298 25.000000 20.482357 c
|
||||
25.000000 7.761148 l
|
||||
25.000000 5.825514 23.389250 4.243507 21.397257 4.243507 c
|
||||
5.642394 4.243507 l
|
||||
1.639342 0.279181 l
|
||||
1.458252 0.102367 1.210445 0.000000 0.962637 0.000000 c
|
||||
0.953107 0.009306 l
|
||||
h
|
||||
3.602744 22.138813 m
|
||||
2.668699 22.138813 1.906215 21.394339 1.906215 20.482357 c
|
||||
1.906215 3.201242 l
|
||||
4.555852 5.825514 l
|
||||
4.736942 6.002327 4.975218 6.104692 5.232557 6.104692 c
|
||||
21.387730 6.104692 l
|
||||
22.321775 6.104692 23.084259 6.849167 23.084259 7.761148 c
|
||||
23.084259 20.482357 l
|
||||
23.084259 21.394339 22.321775 22.138813 21.387730 22.138813 c
|
||||
3.593215 22.138813 l
|
||||
3.602744 22.138813 l
|
||||
h
|
||||
f
|
||||
n
|
||||
Q
|
||||
|
||||
endstream
|
||||
endobj
|
||||
|
||||
3 0 obj
|
||||
1003
|
||||
endobj
|
||||
|
||||
4 0 obj
|
||||
<< /Annots []
|
||||
/Type /Page
|
||||
/MediaBox [ 0.000000 0.000000 25.000000 24.000000 ]
|
||||
/Resources 1 0 R
|
||||
/Contents 2 0 R
|
||||
/Parent 5 0 R
|
||||
>>
|
||||
endobj
|
||||
|
||||
5 0 obj
|
||||
<< /Kids [ 4 0 R ]
|
||||
/Count 1
|
||||
/Type /Pages
|
||||
>>
|
||||
endobj
|
||||
|
||||
6 0 obj
|
||||
<< /Pages 5 0 R
|
||||
/Type /Catalog
|
||||
>>
|
||||
endobj
|
||||
|
||||
xref
|
||||
0 7
|
||||
0000000000 65535 f
|
||||
0000000010 00000 n
|
||||
0000000034 00000 n
|
||||
0000001093 00000 n
|
||||
0000001116 00000 n
|
||||
0000001289 00000 n
|
||||
0000001363 00000 n
|
||||
trailer
|
||||
<< /ID [ (some) (id) ]
|
||||
/Root 6 0 R
|
||||
/Size 7
|
||||
>>
|
||||
startxref
|
||||
1422
|
||||
%%EOF
|
|
@ -703,3 +703,5 @@
|
|||
/* The name for the emoji category 'Travel & Places' */
|
||||
"EMOJI_CATEGORY_TRAVEL_NAME" = "Travel & Places";
|
||||
"EMOJI_REACTS_NOTIFICATION" = "%@ reacts to a message with %@";
|
||||
/* New conversation screen*/
|
||||
"vc_new_conversation_title" = "New Conversation";
|
||||
|
|
|
@ -497,14 +497,14 @@
|
|||
"vc_enter_public_key_explanation" = "Users can share their Session ID by going into their account settings and tapping \"Share Session ID\", or by sharing their QR code.";
|
||||
"vc_scan_qr_code_camera_access_explanation" = "Session needs camera access to scan QR codes";
|
||||
"vc_scan_qr_code_grant_camera_access_button_title" = "Grant Camera Access";
|
||||
"vc_create_closed_group_title" = "New Closed Group";
|
||||
"vc_create_closed_group_title" = "Create Group";
|
||||
"vc_create_closed_group_text_field_hint" = "Enter a group name";
|
||||
"vc_create_closed_group_empty_state_message" = "You don't have any contacts yet";
|
||||
"vc_create_closed_group_empty_state_button_title" = "Start a Session";
|
||||
"vc_create_closed_group_group_name_missing_error" = "Please enter a group name";
|
||||
"vc_create_closed_group_group_name_too_long_error" = "Please enter a shorter group name";
|
||||
"vc_create_closed_group_too_many_group_members_error" = "A closed group cannot have more than 100 members";
|
||||
"vc_join_public_chat_title" = "Join Open Group";
|
||||
"vc_join_public_chat_title" = "Join Community";
|
||||
"vc_join_public_chat_enter_group_url_tab_title" = "Open Group URL";
|
||||
"vc_join_public_chat_scan_qr_code_tab_title" = "Scan QR Code";
|
||||
"vc_join_public_chat_scan_qr_code_explanation" = "Scan the QR code of the open group you'd like to join";
|
||||
|
@ -703,3 +703,5 @@
|
|||
/* The name for the emoji category 'Travel & Places' */
|
||||
"EMOJI_CATEGORY_TRAVEL_NAME" = "Travel & Places";
|
||||
"EMOJI_REACTS_NOTIFICATION" = "%@ reacts to a message with %@";
|
||||
/* New conversation screen*/
|
||||
"vc_new_conversation_title" = "New Conversation";
|
||||
|
|
|
@ -703,3 +703,5 @@
|
|||
/* The name for the emoji category 'Travel & Places' */
|
||||
"EMOJI_CATEGORY_TRAVEL_NAME" = "Travel & Places";
|
||||
"EMOJI_REACTS_NOTIFICATION" = "%@ reacts to a message with %@";
|
||||
/* New conversation screen*/
|
||||
"vc_new_conversation_title" = "New Conversation";
|
||||
|
|
|
@ -703,3 +703,5 @@
|
|||
/* The name for the emoji category 'Travel & Places' */
|
||||
"EMOJI_CATEGORY_TRAVEL_NAME" = "Travel & Places";
|
||||
"EMOJI_REACTS_NOTIFICATION" = "%@ reacts to a message with %@";
|
||||
/* New conversation screen*/
|
||||
"vc_new_conversation_title" = "New Conversation";
|
||||
|
|
|
@ -703,3 +703,5 @@
|
|||
/* The name for the emoji category 'Travel & Places' */
|
||||
"EMOJI_CATEGORY_TRAVEL_NAME" = "Travel & Places";
|
||||
"EMOJI_REACTS_NOTIFICATION" = "%@ reacts to a message with %@";
|
||||
/* New conversation screen*/
|
||||
"vc_new_conversation_title" = "New Conversation";
|
||||
|
|
|
@ -703,3 +703,5 @@
|
|||
/* The name for the emoji category 'Travel & Places' */
|
||||
"EMOJI_CATEGORY_TRAVEL_NAME" = "Travel & Places";
|
||||
"EMOJI_REACTS_NOTIFICATION" = "%@ reacts to a message with %@";
|
||||
/* New conversation screen*/
|
||||
"vc_new_conversation_title" = "New Conversation";
|
||||
|
|
|
@ -497,14 +497,14 @@
|
|||
"vc_enter_public_key_explanation" = "Users can share their Session ID by going into their account settings and tapping \"Share Session ID\", or by sharing their QR code.";
|
||||
"vc_scan_qr_code_camera_access_explanation" = "Session needs camera access to scan QR codes";
|
||||
"vc_scan_qr_code_grant_camera_access_button_title" = "Grant Camera Access";
|
||||
"vc_create_closed_group_title" = "New Closed Group";
|
||||
"vc_create_closed_group_title" = "Create Group";
|
||||
"vc_create_closed_group_text_field_hint" = "Enter a group name";
|
||||
"vc_create_closed_group_empty_state_message" = "You don't have any contacts yet";
|
||||
"vc_create_closed_group_empty_state_button_title" = "Start a Session";
|
||||
"vc_create_closed_group_group_name_missing_error" = "Please enter a group name";
|
||||
"vc_create_closed_group_group_name_too_long_error" = "Please enter a shorter group name";
|
||||
"vc_create_closed_group_too_many_group_members_error" = "A closed group cannot have more than 100 members";
|
||||
"vc_join_public_chat_title" = "Join Open Group";
|
||||
"vc_join_public_chat_title" = "Join Community";
|
||||
"vc_join_public_chat_enter_group_url_tab_title" = "Open Group URL";
|
||||
"vc_join_public_chat_scan_qr_code_tab_title" = "Scan QR Code";
|
||||
"vc_join_public_chat_scan_qr_code_explanation" = "Scan the QR code of the open group you'd like to join";
|
||||
|
@ -703,3 +703,5 @@
|
|||
/* The name for the emoji category 'Travel & Places' */
|
||||
"EMOJI_CATEGORY_TRAVEL_NAME" = "Travel & Places";
|
||||
"EMOJI_REACTS_NOTIFICATION" = "%@ reacts to a message with %@";
|
||||
/* New conversation screen*/
|
||||
"vc_new_conversation_title" = "New Conversation";
|
||||
|
|
|
@ -703,3 +703,5 @@
|
|||
/* The name for the emoji category 'Travel & Places' */
|
||||
"EMOJI_CATEGORY_TRAVEL_NAME" = "Travel & Places";
|
||||
"EMOJI_REACTS_NOTIFICATION" = "%@ reacts to a message with %@";
|
||||
/* New conversation screen*/
|
||||
"vc_new_conversation_title" = "New Conversation";
|
||||
|
|
|
@ -703,3 +703,5 @@
|
|||
/* The name for the emoji category 'Travel & Places' */
|
||||
"EMOJI_CATEGORY_TRAVEL_NAME" = "Travel & Places";
|
||||
"EMOJI_REACTS_NOTIFICATION" = "%@ reacts to a message with %@";
|
||||
/* New conversation screen*/
|
||||
"vc_new_conversation_title" = "New Conversation";
|
||||
|
|
|
@ -703,3 +703,5 @@
|
|||
/* The name for the emoji category 'Travel & Places' */
|
||||
"EMOJI_CATEGORY_TRAVEL_NAME" = "Travel & Places";
|
||||
"EMOJI_REACTS_NOTIFICATION" = "%@ reacts to a message with %@";
|
||||
/* New conversation screen*/
|
||||
"vc_new_conversation_title" = "New Conversation";
|
||||
|
|
|
@ -703,3 +703,5 @@
|
|||
/* The name for the emoji category 'Travel & Places' */
|
||||
"EMOJI_CATEGORY_TRAVEL_NAME" = "Travel & Places";
|
||||
"EMOJI_REACTS_NOTIFICATION" = "%@ reacts to a message with %@";
|
||||
/* New conversation screen*/
|
||||
"vc_new_conversation_title" = "New Conversation";
|
||||
|
|
|
@ -703,3 +703,5 @@
|
|||
/* The name for the emoji category 'Travel & Places' */
|
||||
"EMOJI_CATEGORY_TRAVEL_NAME" = "Travel & Places";
|
||||
"EMOJI_REACTS_NOTIFICATION" = "%@ reacts to a message with %@";
|
||||
/* New conversation screen*/
|
||||
"vc_new_conversation_title" = "New Conversation";
|
||||
|
|
|
@ -703,3 +703,5 @@
|
|||
/* The name for the emoji category 'Travel & Places' */
|
||||
"EMOJI_CATEGORY_TRAVEL_NAME" = "Travel & Places";
|
||||
"EMOJI_REACTS_NOTIFICATION" = "%@ reacts to a message with %@";
|
||||
/* New conversation screen*/
|
||||
"vc_new_conversation_title" = "New Conversation";
|
||||
|
|
|
@ -703,3 +703,5 @@
|
|||
/* The name for the emoji category 'Travel & Places' */
|
||||
"EMOJI_CATEGORY_TRAVEL_NAME" = "Travel & Places";
|
||||
"EMOJI_REACTS_NOTIFICATION" = "%@ reacts to a message with %@";
|
||||
/* New conversation screen*/
|
||||
"vc_new_conversation_title" = "New Conversation";
|
||||
|
|
|
@ -703,3 +703,5 @@
|
|||
/* The name for the emoji category 'Travel & Places' */
|
||||
"EMOJI_CATEGORY_TRAVEL_NAME" = "Travel & Places";
|
||||
"EMOJI_REACTS_NOTIFICATION" = "%@ reacts to a message with %@";
|
||||
/* New conversation screen*/
|
||||
"vc_new_conversation_title" = "New Conversation";
|
||||
|
|
|
@ -497,14 +497,14 @@
|
|||
"vc_enter_public_key_explanation" = "Users can share their Session ID by going into their account settings and tapping \"Share Session ID\", or by sharing their QR code.";
|
||||
"vc_scan_qr_code_camera_access_explanation" = "Session needs camera access to scan QR codes";
|
||||
"vc_scan_qr_code_grant_camera_access_button_title" = "Grant Camera Access";
|
||||
"vc_create_closed_group_title" = "New Closed Group";
|
||||
"vc_create_closed_group_title" = "Create Group";
|
||||
"vc_create_closed_group_text_field_hint" = "Enter a group name";
|
||||
"vc_create_closed_group_empty_state_message" = "You don't have any contacts yet";
|
||||
"vc_create_closed_group_empty_state_button_title" = "Start a Session";
|
||||
"vc_create_closed_group_group_name_missing_error" = "Please enter a group name";
|
||||
"vc_create_closed_group_group_name_too_long_error" = "Please enter a shorter group name";
|
||||
"vc_create_closed_group_too_many_group_members_error" = "A closed group cannot have more than 100 members";
|
||||
"vc_join_public_chat_title" = "Join Open Group";
|
||||
"vc_join_public_chat_title" = "Join Community";
|
||||
"vc_join_public_chat_enter_group_url_tab_title" = "Open Group URL";
|
||||
"vc_join_public_chat_scan_qr_code_tab_title" = "Scan QR Code";
|
||||
"vc_join_public_chat_scan_qr_code_explanation" = "Scan the QR code of the open group you'd like to join";
|
||||
|
@ -703,3 +703,5 @@
|
|||
/* The name for the emoji category 'Travel & Places' */
|
||||
"EMOJI_CATEGORY_TRAVEL_NAME" = "Travel & Places";
|
||||
"EMOJI_REACTS_NOTIFICATION" = "%@ reacts to a message with %@";
|
||||
/* New conversation screen*/
|
||||
"vc_new_conversation_title" = "New Conversation";
|
||||
|
|
|
@ -703,3 +703,5 @@
|
|||
/* The name for the emoji category 'Travel & Places' */
|
||||
"EMOJI_CATEGORY_TRAVEL_NAME" = "Travel & Places";
|
||||
"EMOJI_REACTS_NOTIFICATION" = "%@ reacts to a message with %@";
|
||||
/* New conversation screen*/
|
||||
"vc_new_conversation_title" = "New Conversation";
|
||||
|
|
|
@ -703,3 +703,5 @@
|
|||
/* The name for the emoji category 'Travel & Places' */
|
||||
"EMOJI_CATEGORY_TRAVEL_NAME" = "Travel & Places";
|
||||
"EMOJI_REACTS_NOTIFICATION" = "%@ reacts to a message with %@";
|
||||
/* New conversation screen*/
|
||||
"vc_new_conversation_title" = "New Conversation";
|
||||
|
|
|
@ -703,3 +703,5 @@
|
|||
/* The name for the emoji category 'Travel & Places' */
|
||||
"EMOJI_CATEGORY_TRAVEL_NAME" = "Travel & Places";
|
||||
"EMOJI_REACTS_NOTIFICATION" = "%@ reacts to a message with %@";
|
||||
/* New conversation screen*/
|
||||
"vc_new_conversation_title" = "New Conversation";
|
||||
|
|
|
@ -703,3 +703,5 @@
|
|||
/* The name for the emoji category 'Travel & Places' */
|
||||
"EMOJI_CATEGORY_TRAVEL_NAME" = "Travel & Places";
|
||||
"EMOJI_REACTS_NOTIFICATION" = "%@ reacts to a message with %@";
|
||||
/* New conversation screen*/
|
||||
"vc_new_conversation_title" = "New Conversation";
|
||||
|
|
|
@ -703,3 +703,5 @@
|
|||
/* The name for the emoji category 'Travel & Places' */
|
||||
"EMOJI_CATEGORY_TRAVEL_NAME" = "Travel & Places";
|
||||
"EMOJI_REACTS_NOTIFICATION" = "%@ reacts to a message with %@";
|
||||
/* New conversation screen*/
|
||||
"vc_new_conversation_title" = "New Conversation";
|
||||
|
|
|
@ -703,3 +703,5 @@
|
|||
/* The name for the emoji category 'Travel & Places' */
|
||||
"EMOJI_CATEGORY_TRAVEL_NAME" = "Travel & Places";
|
||||
"EMOJI_REACTS_NOTIFICATION" = "%@ reacts to a message with %@";
|
||||
/* New conversation screen*/
|
||||
"vc_new_conversation_title" = "New Conversation";
|
||||
|
|
|
@ -24,6 +24,7 @@ class BaseVC : UIViewController {
|
|||
|
||||
override func viewDidLoad() {
|
||||
setNeedsStatusBarAppearanceUpdate()
|
||||
view.backgroundColor = isLightMode ? UIColor(hex: 0xF9F9F9) : UIColor(hex: 0x1B1B1B)
|
||||
NotificationCenter.default.addObserver(self, selector: #selector(handleAppModeChangedNotification(_:)), name: .appModeChanged, object: nil)
|
||||
NotificationCenter.default.addObserver(self, selector: #selector(appDidBecomeActive(_:)), name: .OWSApplicationDidBecomeActive, object: nil)
|
||||
}
|
||||
|
@ -51,7 +52,7 @@ class BaseVC : UIViewController {
|
|||
if #available(iOS 15.0, *) {
|
||||
let appearance = UINavigationBarAppearance()
|
||||
appearance.configureWithOpaqueBackground()
|
||||
appearance.backgroundColor = Colors.navigationBarBackground
|
||||
appearance.backgroundColor = hasGradient ? Colors.navigationBarBackground : view.backgroundColor
|
||||
appearance.shadowColor = .clear
|
||||
navigationBar.standardAppearance = appearance;
|
||||
navigationBar.scrollEdgeAppearance = navigationBar.standardAppearance
|
||||
|
@ -59,7 +60,7 @@ class BaseVC : UIViewController {
|
|||
navigationBar.setBackgroundImage(UIImage(), for: UIBarMetrics.default)
|
||||
navigationBar.shadowImage = UIImage()
|
||||
navigationBar.isTranslucent = false
|
||||
navigationBar.barTintColor = Colors.navigationBarBackground
|
||||
navigationBar.barTintColor = hasGradient ? Colors.navigationBarBackground : view.backgroundColor
|
||||
}
|
||||
|
||||
navigationItem.backButtonTitle = ""
|
||||
|
@ -118,6 +119,8 @@ class BaseVC : UIViewController {
|
|||
@objc internal func handleAppModeChangedNotification(_ notification: Notification) {
|
||||
if hasGradient {
|
||||
setUpGradientBackground() // Re-do the gradient
|
||||
} else {
|
||||
view.backgroundColor = isLightMode ? UIColor(hex: 0xF9F9F9) : UIColor(hex: 0x1B1B1B)
|
||||
}
|
||||
ensureWindowBackground()
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue