mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 06:55:59 +00:00
Fix remaining retain cycles, allow coordinators to be weakly referenced and make sure the NavigationStackCoordinator cleans up after itself
This commit is contained in:
committed by
Stefan Ceriu
parent
93997efef9
commit
594f6f85dd
@@ -16,9 +16,13 @@
|
||||
|
||||
import SwiftUI
|
||||
|
||||
struct ActivityCoordinator: CoordinatorProtocol {
|
||||
class ActivityCoordinator: CoordinatorProtocol {
|
||||
let items: [Any]
|
||||
|
||||
init(items: [Any]) {
|
||||
self.items = items
|
||||
}
|
||||
|
||||
func toPresentable() -> AnyView {
|
||||
AnyView(UIActivityViewControllerWrapper(activityItems: items)
|
||||
.presentationDetents([.medium])
|
||||
|
||||
@@ -16,9 +16,13 @@
|
||||
|
||||
import SwiftUI
|
||||
|
||||
struct InviteFriendsCoordinator: CoordinatorProtocol {
|
||||
class InviteFriendsCoordinator: CoordinatorProtocol {
|
||||
let userId: String
|
||||
|
||||
init(userId: String) {
|
||||
self.userId = userId
|
||||
}
|
||||
|
||||
func toPresentable() -> AnyView {
|
||||
guard let permalink = try? PermalinkBuilder.permalinkTo(userIdentifier: userId).absoluteString else {
|
||||
return AnyView(EmptyView())
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
import SwiftUI
|
||||
|
||||
struct SplashScreenCoordinator: CoordinatorProtocol {
|
||||
class SplashScreenCoordinator: CoordinatorProtocol {
|
||||
func toPresentable() -> AnyView {
|
||||
AnyView(
|
||||
ZStack {
|
||||
|
||||
Reference in New Issue
Block a user