mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
Make Translate hidden by default
This commit is contained in:
parent
1a7fa604c8
commit
c8d3af62fd
@ -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")
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user