mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 22:25:57 +00:00
Make Translate hidden by default
This commit is contained in:
@@ -8,7 +8,7 @@ public struct TranslationSettings: Codable, Equatable {
|
||||
public var ignoredLanguages: [String]?
|
||||
|
||||
public static var defaultSettings: TranslationSettings {
|
||||
return TranslationSettings(showTranslate: true, ignoredLanguages: nil)
|
||||
return TranslationSettings(showTranslate: false, ignoredLanguages: nil)
|
||||
}
|
||||
|
||||
init(showTranslate: Bool, ignoredLanguages: [String]?) {
|
||||
@@ -19,7 +19,7 @@ public struct TranslationSettings: Codable, Equatable {
|
||||
public init(from decoder: Decoder) throws {
|
||||
let container = try decoder.container(keyedBy: StringCodingKey.self)
|
||||
|
||||
self.showTranslate = try container.decodeIfPresent(Bool.self, forKey: "showTranslate") ?? true
|
||||
self.showTranslate = try container.decodeIfPresent(Bool.self, forKey: "showTranslate") ?? false
|
||||
self.ignoredLanguages = try container.decodeIfPresent([String].self, forKey: "ignoredLanguages")
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user