Share sheet: honour system colors scheme
This commit is contained in:
parent
9754f876e4
commit
f1d855310f
@ -18,9 +18,9 @@ class ShareViewController: UIViewController {
|
|||||||
let instance = CurrentInstance()
|
let instance = CurrentInstance()
|
||||||
account.setClient(client: client)
|
account.setClient(client: client)
|
||||||
instance.setClient(client: client)
|
instance.setClient(client: client)
|
||||||
|
let colorScheme = traitCollection.userInterfaceStyle
|
||||||
let theme = Theme()
|
let theme = Theme()
|
||||||
|
theme.setColor(withName: colorScheme == .dark ? .iceCubeDark : .iceCubeLight)
|
||||||
overrideUserInterfaceStyle = theme.selectedScheme == .dark ? .dark : .light
|
|
||||||
|
|
||||||
if let item = extensionContext?.inputItems.first as? NSExtensionItem {
|
if let item = extensionContext?.inputItems.first as? NSExtensionItem {
|
||||||
if let attachments = item.attachments {
|
if let attachments = item.attachments {
|
||||||
@ -31,7 +31,7 @@ class ShareViewController: UIViewController {
|
|||||||
.environmentObject(theme)
|
.environmentObject(theme)
|
||||||
.environmentObject(instance)
|
.environmentObject(instance)
|
||||||
.tint(theme.tintColor)
|
.tint(theme.tintColor)
|
||||||
.preferredColorScheme(theme.selectedScheme == .dark ? .dark : .light)
|
.preferredColorScheme(colorScheme == .light ? .light : .dark)
|
||||||
let childView = UIHostingController(rootView: view)
|
let childView = UIHostingController(rootView: view)
|
||||||
self.addChild(childView)
|
self.addChild(childView)
|
||||||
childView.view.frame = self.container.bounds
|
childView.view.frame = self.container.bounds
|
||||||
|
Loading…
x
Reference in New Issue
Block a user