mirror of
https://github.com/writeas/writefreely-swiftui-multiplatform.git
synced 2024-11-15 01:11:02 +00:00
Do not disable networking buttons if hasNetworkConnection is false
This commit is contained in:
parent
3ebfa7a0d1
commit
a289e544b1
@ -43,7 +43,7 @@ struct PostListView: View {
|
||||
}, label: {
|
||||
Image(systemName: "arrow.clockwise")
|
||||
})
|
||||
.disabled(!model.account.isLoggedIn || !model.hasNetworkConnection)
|
||||
.disabled(!model.account.isLoggedIn)
|
||||
}
|
||||
}
|
||||
.padding()
|
||||
@ -70,7 +70,7 @@ struct PostListView: View {
|
||||
}, label: {
|
||||
Image(systemName: "arrow.clockwise")
|
||||
})
|
||||
.disabled(!model.account.isLoggedIn || !model.hasNetworkConnection)
|
||||
.disabled(!model.account.isLoggedIn)
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
@ -195,12 +195,7 @@ struct PostEditorView: View {
|
||||
}, label: {
|
||||
Label("Publish", systemImage: "paperplane")
|
||||
})
|
||||
.disabled(
|
||||
post.status ==
|
||||
PostStatus.published.rawValue ||
|
||||
!model.hasNetworkConnection ||
|
||||
post.body.count == 0
|
||||
)
|
||||
.disabled(post.status == PostStatus.published.rawValue || post.body.count == 0)
|
||||
}
|
||||
Button(action: {
|
||||
sharePost()
|
||||
|
@ -143,9 +143,7 @@ struct PostEditorView: View {
|
||||
}, label: {
|
||||
Image(systemName: "paperplane")
|
||||
})
|
||||
.disabled(
|
||||
post.status == PostStatus.published.rawValue || !model.hasNetworkConnection || post.body.count == 0
|
||||
)
|
||||
.disabled(post.status == PostStatus.published.rawValue || || post.body.count == 0)
|
||||
}
|
||||
}
|
||||
.onChange(of: post.hasNewerRemoteCopy, perform: { _ in
|
||||
|
Loading…
Reference in New Issue
Block a user