Add a setting for disabling social keyboard close #355

This commit is contained in:
Thomas Ricouard 2023-01-24 21:44:33 +01:00
parent a1218e1488
commit 1aadb0ce3a
10 changed files with 12 additions and 2 deletions

View file

@ -69,7 +69,7 @@
"location" : "https://github.com/Dimillian/TextView",
"state" : {
"branch" : "main",
"revision" : "22eec87ccac1270557b2b446fddc13c311bae5e7"
"revision" : "4353041d4412fde05748e7dc362396477a0e24a5"
}
}
],

View file

@ -117,6 +117,9 @@ struct SettingsTabs: View {
Toggle(isOn: $preferences.isOpenAIEnabled) {
Label("settings.other.hide-openai", systemImage: "faxmachine")
}
Toggle(isOn: $preferences.isSocialKeyboardEnabled) {
Label("settings.other.social-keyboard", systemImage: "keyboard")
}
}
.listRowBackground(theme.primaryBackgroundColor)
}

View file

@ -102,6 +102,7 @@
"settings.rate" = "Bewerte Ice Cubes";
"settings.section.other" = "Other";
"settings.other.hide-openai" = "Enable 🤖 helper";
"settings.other.social-keyboard" = "Enable Social Keyboard";
// MARK: Tabs
"tab.explore" = "Entdecken";

View file

@ -102,6 +102,7 @@
"settings.rate" = "Rate Ice Cubes";
"settings.section.other" = "Other";
"settings.other.hide-openai" = "Enable 🤖 helper";
"settings.other.social-keyboard" = "Enable Social Keyboard";
// MARK: Tabs
"tab.explore" = "Explore";

View file

@ -102,6 +102,7 @@
"settings.rate" = "Valora Ice Cubes";
"settings.section.other" = "Other";
"settings.other.hide-openai" = "Enable 🤖 helper";
"settings.other.social-keyboard" = "Enable Social Keyboard";
// MARK: Tabs
"tab.explore" = "Explorar";

View file

@ -102,6 +102,7 @@
"settings.rate" = "Valuta Ice Cubes";
"settings.section.other" = "Other";
"settings.other.hide-openai" = "Enable 🤖 helper";
"settings.other.social-keyboard" = "Enable Social Keyboard";
// MARK: Tabs
"tab.explore" = "Esplora";

View file

@ -102,6 +102,7 @@
"settings.title" = "Instellingen";
"settings.section.other" = "Overig";
"settings.other.hide-openai" = "Schakel 🤖 hulp in";
"settings.other.social-keyboard" = "Enable Social Keyboard";
// MARK: Tabs
"tab.explore" = "Ontdekken";

View file

@ -102,6 +102,7 @@
"settings.rate" = "给 Ice Cubes 评分";
"settings.section.other" = "其它";
"settings.other.hide-openai" = "启用写作助手 🤖";
"settings.other.social-keyboard" = "Enable Social Keyboard";
// MARK: Tabs
"tab.explore" = "探索";

View file

@ -17,6 +17,7 @@ public class UserPreferences: ObservableObject {
@AppStorage("show_translate_button_inline") public var showTranslateButton: Bool = true
@AppStorage("is_open_ai_enabled") public var isOpenAIEnabled: Bool = true
@AppStorage("recently_used_languages") public var recentlyUsedLanguages: [String] = []
@AppStorage("social_keyboard_composer") public var isSocialKeyboardEnabled: Bool = true
public var pushNotificationsCount: Int {
get {

View file

@ -40,7 +40,7 @@ public struct StatusEditorView: View {
TextView($viewModel.statusText, $viewModel.selectedRange, $viewModel.markedTextRange)
.placeholder(String(localized: "status.editor.text.placeholder"))
.font(Font.scaledBodyUIFont)
.keyboardType(.twitter)
.setKeyboardType(preferences.isSocialKeyboardEnabled ? .twitter : .default)
.padding(.horizontal, .layoutPadding)
StatusEditorMediaView(viewModel: viewModel)
if let status = viewModel.embeddedStatus {