Previously, the button was shown if the always use DeepL setting was active.
This is redundant. Instead, the button is now shown, if the setting isn't
active.
Signed-off-by: Paul Schuetz <pa.schuetz@web.de>
* Allow forced translation with DeepL
Translation with DeepL can now be forced either per post or on the system level.
Signed-off-by: Paul Schuetz <pa.schuetz@web.de>
* Require the use of a private API key
A private API key of the user is now required to allow "always translate via
DeepL".
Signed-off-by: Paul Schuetz <pa.schuetz@web.de>
* Persist a stored API key
An API key is stored even if useOnlyDeepL is disabled. If the API key is empty,
the setting is still disabled.
Signed-off-by: Paul Schuetz <pa.schuetz@web.de>
* Localize the texts
Signed-off-by: Paul Schuetz <pa.schuetz@web.de>
* Save API key while writing
The API key is now saved, even if the app is closed before leaving the
translation settings view.
Signed-off-by: Paul Schuetz <pa.schuetz@web.de>
* Fix build
* Fix theme
* Transition to KeychainSwift, clean up
KeychainHelper is replaced with the already-used KeychainSwift package, the
functions are cleaned up so that the process is easier to understand. The
deactivateToggleIfNoKey function doesn't change the behavior of the buttons or
context menus in the timeline, only demonstrates the necessity of an API key to
the user. Consequently, it's only called when the settings view is shown.
Signed-off-by: Paul Schuetz <pa.schuetz@web.de>
* Swiftformat + fixes
---------
Signed-off-by: Paul Schuetz <pa.schuetz@web.de>
Co-authored-by: Thomas Ricouard <ricouard77@gmail.com>
The dictionary for the detected and selected language when posting is replaced
with a named tuple to include named values that are checked at compile time.
This removes a source of error while still being expressive.
Signed-off-by: Paul Schuetz <pa.schuetz@web.de>
Fixed an issue where the alignment of the spoiler button and the spoiler image is split left and right when the image size is set to compact.
Co-authored-by: Yusuke Arakawa <nekolaboratory@users.noreply.github.com>
* Fixed problem with with the translation of "mentions" in plural form
- Localizable.stringsdict needs a digit (not string) to make a choice of a correct plural form.
- fixed StatusEditorAutoCompleteView
- changed %@ format specifier in Localizable.strings with %lld
* Polish localization update
---------
Co-authored-by: Thomas Ricouard <ricouard77@gmail.com>
* Record quote toots that have failed to load so that we don't try and load them again.
Fixes
1: Repeated visible insertion and removal of placeholder quote toot.
2: Link hijacking of inline status viewer allowing links to be followed as regular URLs
* Move set
* Add back to routeur check
---------
Co-authored-by: Thomas Ricouard <ricouard77@gmail.com>
Currently, the post screen has a cancel button only on the screen for selecting drafts, so we placed a cancel button for consistency and UX improvement.
Related: #1073
Co-authored-by: Yusuke Arakawa <nekolaboratory@users.noreply.github.com>
* Change arrows icon to rocket for boosts
* Fixing case (part 1)
* Fixing Case (part 2)
* Clean up after merge
* Fix for disabled boost
* Fixes
---------
Co-authored-by: Thomas Ricouard <ricouard77@gmail.com>
* collapse long posts
* initialize user pref setting in init(), remove onAppear and onChange(pref) from view
---------
Co-authored-by: Thomas Ricouard <ricouard77@gmail.com>
Like other submission item selection screens, the voting screen can now be shown/hidden with a button toggle.
Co-authored-by: Yusuke Arakawa <nekolaboratory@users.noreply.github.com>
* Clear up the translate-button
The Translate button on the post and in the context menu now does not show the
source language to avoid user confusion if the language set by the poster is
not the actual language of the post. This language is now only used to decide
whether to display the button in the main view. The Translate button in the
context menu is independent.
Signed-off-by: Paul Schuetz <pa.schuetz@web.de>
* Show the translation-source-language
The source-language of a translation is now shown.
Signed-off-by: Paul Schuetz <pa.schuetz@web.de>
* Remove unused strings
The now unused translate-from-strings are removed.
Signed-off-by: Paul Schuetz <pa.schuetz@web.de>
---------
Signed-off-by: Paul Schuetz <pa.schuetz@web.de>
Co-authored-by: Thomas Ricouard <ricouard77@gmail.com>
I think it's helpful to have the buttons and their numeric badges visible when showing a status detail view for the focused status, even if the user has opted to hide them in timeline display settings.
Co-authored-by: Thomas Ricouard <ricouard77@gmail.com>
Adds monospacedDigit modifier to the counter next to action button counter labels. This fixes the layout glitch that happens when the counter changes, most noticeably when you tap the boost or favorite button except for when the counter gains or loses a digit (9 -> 10, 99 -> 100 etc…)
Still greatly improves the actions view experience though.
Co-authored-by: Pascal Batty <pascal@zen.ly>
* Show different label and icon for boosting my followers-only post
* Disable boost swipe actions on posts that can't be boosted
* Remove unnecessary function calls
* Add flair to status action buttons
- makes tintColor viewModel independent in Action
- adds isOn function to Action
- moves actionButton to its own function for clarity (and help compilo)
- moves the counter outside the button
- creates StatusActionButtonStyle that defines how an action button behaves when tapped and toggled
- adds nested SparklesView that animates sparkles when the action button is tapped
Sidenote : couldn't get the "bouncy" scale effect I wanted. It wouldn't work on an iOS device, but did on the simulator.
* Fix private boost action icon regression
---------
Co-authored-by: Pascal Batty <pascal@zen.ly>