Ensure app environment is configured
This can happen if a user sets a custom self hosting environment, then deletes and re-installs the app.
This commit is contained in:
@ -54,6 +54,17 @@ public extension AppEnvironment {
|
||||
)
|
||||
}
|
||||
|
||||
var environmentConfigured: Bool {
|
||||
if self == .custom {
|
||||
if let str = UserDefaults.standard.string(forKey: AppEnvironmentUserDefaultKey.webAppBaseURL.rawValue), let url = URL(string: str) {
|
||||
return true
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
var graphqlPath: String {
|
||||
"\(serverBaseURL.absoluteString)/api/graphql"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user