Globals.swift
TLDR
This file contains the Globals
class, which provides global properties and methods.
Classes
Globals
This class provides global properties and methods for the project. It includes the following:
-
ProductVersion
: A static constant property that represents the product version. -
WhatsNewVersion
: A static constant property that represents the version of the latest update. -
currentWhatsNewVersion
: A static computed property that gets or sets the value of thewhatsNewVersion
user default. -
openGetCloudServerUrl()
: A static method that opens a specific URL in the default web browser.
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
import Foundation
import Cocoa
class Globals {
static let ProductVersion = 70000
static let WhatsNewVersion = 70000
static var currentWhatsNewVersion: Int {
get { return UserDefaults.standard.integer(forKey: "whatsNewVersion") }
set { UserDefaults.standard.setValue(newValue, forKey: "whatsNewVersion") }
}
static func openGetCloudServerUrl() {
let url = URL(string: "https://mattermost.com/sign-up/?utm_source=focalboard&utm_campaign=focalboardapp")!
NSWorkspace.shared.open(url)
}
}