1
0
mirror of https://github.com/mastodon/mastodon-ios.git synced 2025-01-24 22:39:18 +01:00
mastodon-app-ufficiale-ipho.../MastodonSDK/Sources/MastodonCommon/Preference/Preference+AskBefore.swift
Marcus Kida 2e7054cb68
Implement "Default Post Language" and "Ask Before"-Alerts (#1240)
* Implement Settings->General->"Ask Before" and add "Ask Before Posting Without Alt Text" IOS-166

* Implement Alt Missing Alert for Status Edits (IOS-166)

* Fix status edit composes duplicate message

* Show (or don't) the "Really delete post?" Alert based on the User's preference (IOS-166)

* Implement alert for boost/unboost (IOS-166)

* Begin implementing "Default Post Language"-Setting (IOS-166)

* Show "Unfollow @user?" Alert (IOS-166)

* Merge conflict fixes for IOS-166

* Implement default post language setting (IOS-166)

* Fix follow button state not updated correctly (IOS-166)

* Add PR feedback (IOS-166)

* Improve default language cell style (IOS-166)

* Fix language filter broken (IOS-166)
2024-02-28 10:52:04 +01:00

36 lines
919 B
Swift

// Copyright © 2024 Mastodon gGmbH. All rights reserved.
import Foundation
extension UserDefaults {
@objc public dynamic var askBeforePostingWithoutAltText: Bool {
get {
return object(forKey: #function) as? Bool ?? true
}
set { self[#function] = newValue }
}
@objc public dynamic var askBeforeUnfollowingSomeone: Bool {
get {
return object(forKey: #function) as? Bool ?? true
}
set { self[#function] = newValue }
}
@objc public dynamic var askBeforeBoostingAPost: Bool {
get {
return object(forKey: #function) as? Bool ?? true
}
set { self[#function] = newValue }
}
@objc public dynamic var askBeforeDeletingAPost: Bool {
get {
return object(forKey: #function) as? Bool ?? true
}
set { self[#function] = newValue }
}
}