mirror of
https://github.com/cranci1/Sora.git
synced 2026-04-21 00:22:12 +00:00
fixed module library
This commit is contained in:
parent
29f9538066
commit
fa89c472aa
1 changed files with 6 additions and 16 deletions
|
|
@ -64,22 +64,12 @@ struct SoraApp: App {
|
||||||
UserDefaults.standard.set(libraryURL, forKey: "lastCommunityURL")
|
UserDefaults.standard.set(libraryURL, forKey: "lastCommunityURL")
|
||||||
UserDefaults.standard.set(true, forKey: "didReceiveDefaultPageLink")
|
UserDefaults.standard.set(true, forKey: "didReceiveDefaultPageLink")
|
||||||
|
|
||||||
let communityView = CommunityLibraryView().environmentObject(moduleManager)
|
DropManager.shared.showDrop(
|
||||||
let hostingController = UIHostingController(rootView: communityView)
|
title: "Module Library Added",
|
||||||
DispatchQueue.main.async {
|
subtitle: "You can browse the community library in settings.",
|
||||||
if let scene = UIApplication.shared.connectedScenes.first as? UIWindowScene,
|
duration: 2,
|
||||||
let window = scene.windows.first,
|
icon: UIImage(systemName: "books.vertical.circle.fill")
|
||||||
let root = window.rootViewController {
|
)
|
||||||
root.present(hostingController, animated: true) {
|
|
||||||
DropManager.shared.showDrop(
|
|
||||||
title: "Module Library Added",
|
|
||||||
subtitle: "You can browse the community library in settings.",
|
|
||||||
duration: 2,
|
|
||||||
icon: UIImage(systemName: "books.vertical.circle.fill")
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
case "module":
|
case "module":
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue