Minor fixes
This commit is contained in:
@@ -76,7 +76,7 @@ public struct ShareButtonCompat<Label>: View where Label: View {
|
||||
#if os(iOS)
|
||||
private nonisolated func shareItem0() async {
|
||||
do {
|
||||
let shareItem = try itemURL()
|
||||
let shareItem = try await itemURL()
|
||||
await MainActor.run {
|
||||
shareItem1(shareItem)
|
||||
}
|
||||
|
||||
@@ -71,7 +71,7 @@ public struct GroupItemView: View {
|
||||
do {
|
||||
try await LibboxNewStandaloneCommandClient()!.selectOutbound(group.tag, outboundTag: item.tag)
|
||||
var newGroup = await group
|
||||
newGroup.selected = item.tag
|
||||
newGroup.selected = await item.tag
|
||||
await MainActor.run { [newGroup] in
|
||||
_group.wrappedValue = newGroup
|
||||
}
|
||||
|
||||
@@ -162,7 +162,7 @@ public struct EditProfileView: View {
|
||||
do {
|
||||
_ = try await ProfileManager.update(profile)
|
||||
#if os(iOS) || os(tvOS)
|
||||
try await UIProfileUpdateTask.configure()
|
||||
try UIProfileUpdateTask.configure()
|
||||
#else
|
||||
try await ProfileUpdateTask.configure()
|
||||
#endif
|
||||
|
||||
@@ -243,7 +243,7 @@ public struct NewProfileView: View {
|
||||
))
|
||||
if profileType == .remote {
|
||||
#if os(iOS) || os(tvOS)
|
||||
try await UIProfileUpdateTask.configure()
|
||||
try UIProfileUpdateTask.configure()
|
||||
#else
|
||||
try await ProfileUpdateTask.configure()
|
||||
#endif
|
||||
|
||||
@@ -3,6 +3,7 @@ import Libbox
|
||||
import Library
|
||||
import SwiftUI
|
||||
|
||||
@MainActor
|
||||
public struct CoreView: View {
|
||||
@State private var isLoading = true
|
||||
|
||||
@@ -51,13 +52,17 @@ public struct CoreView: View {
|
||||
|
||||
private nonisolated func loadSettings() async {
|
||||
if ApplicationLibrary.inPreview {
|
||||
version = "<redacted>"
|
||||
dataSize = LibboxFormatBytes(1000 * 1000 * 10)
|
||||
isLoading = false
|
||||
await MainActor.run {
|
||||
version = "<redacted>"
|
||||
dataSize = LibboxFormatBytes(1000 * 1000 * 10)
|
||||
isLoading = false
|
||||
}
|
||||
} else {
|
||||
version = LibboxVersion()
|
||||
dataSize = "Loading..."
|
||||
isLoading = false
|
||||
await MainActor.run {
|
||||
version = LibboxVersion()
|
||||
dataSize = "Loading..."
|
||||
isLoading = false
|
||||
}
|
||||
await loadSettingsBackground()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user