Page Menu
Home
Musing Studio
Search
Configure Global Search
Log In
Files
F10387184
MacPreferencesView.swift
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
877 B
Subscribers
None
MacPreferencesView.swift
View Options
import
SwiftUI
struct
MacPreferencesView
:
View
{
@
EnvironmentObject
var
model
:
WriteFreelyModel
@
EnvironmentObject
var
errorHandling
:
ErrorHandling
@
ObservedObject
var
preferences
:
PreferencesModel
var
body
:
some
View
{
VStack
{
PreferencesView
(
preferences
:
preferences
)
Spacer
()
}
.
onChange
(
of
:
model
.
hasError
)
{
value
in
if
value
{
if
let
error
=
model
.
currentError
{
self
.
errorHandling
.
handle
(
error
:
error
)
}
else
{
self
.
errorHandling
.
handle
(
error
:
AppError
.
genericError
())
}
model
.
hasError
=
false
}
}
}
}
struct
MacPreferencesView_Previews
:
PreviewProvider
{
static
var
previews
:
some
View
{
MacPreferencesView
(
preferences
:
PreferencesModel
())
}
}
File Metadata
Details
Attached
Mime Type
text/x-c
Expires
Mon, Nov 25, 1:52 AM (1 d, 9 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3106495
Attached To
rWFSUI WriteFreely SwiftUI
Event Timeline
Log In to Comment