[ABANDONED] Mastodon iOS client.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 lines
833 B

  1. //
  2. // SettingsManager.swift
  3. // elpha-ios
  4. //
  5. // Created by Dwayne Harris on 11/16/18.
  6. // Copyright © 2018 Elpha. All rights reserved.
  7. //
  8. import Foundation
  9. class SettingsManager {
  10. private static let gifKey = "settings:gif"
  11. private static let refreshTimelinesKey = "settings:refreshTimelines"
  12. public static var automaticallyPlayGIFs: Bool {
  13. get {
  14. return UserDefaults.standard.bool(forKey: gifKey)
  15. }
  16. set {
  17. UserDefaults.standard.set(newValue, forKey: gifKey)
  18. }
  19. }
  20. public static var automaticallyRefreshTimelines: Bool {
  21. get {
  22. return UserDefaults.standard.bool(forKey: refreshTimelinesKey)
  23. }
  24. set {
  25. UserDefaults.standard.set(newValue, forKey: refreshTimelinesKey)
  26. }
  27. }
  28. }