Currently translated at 100.0% (628 of 628 strings)
Translated using Weblate (Icelandic)
Currently translated at 99.6% (626 of 628 strings)
Translated using Weblate (Icelandic)
Currently translated at 96.6% (607 of 628 strings)
Co-authored-by: Sveinn í Felli <sv1@fellsnet.is>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/is/
Translation: Tusky/Tusky
Currently translated at 100.0% (628 of 628 strings)
Translated using Weblate (Galician)
Currently translated at 100.0% (626 of 626 strings)
Co-authored-by: XoseM <xosem@disroot.org>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/gl/
Translation: Tusky/Tusky
Currently translated at 100.0% (628 of 628 strings)
Translated using Weblate (Vietnamese)
Currently translated at 100.0% (626 of 626 strings)
Translated using Weblate (Vietnamese)
Currently translated at 100.0% (619 of 619 strings)
Co-authored-by: Hồ Nhất Duy <mastoduy@gmail.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/vi/
Translation: Tusky/Tusky
Currently translated at 100.0% (628 of 628 strings)
Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (626 of 626 strings)
Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (619 of 619 strings)
Co-authored-by: Eric <alchemillatruth@purelymail.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/zh_Hans/
Translation: Tusky/Tusky
Currently translated at 100.0% (628 of 628 strings)
Translated using Weblate (Persian)
Currently translated at 99.0% (620 of 626 strings)
Translated using Weblate (Persian)
Currently translated at 100.0% (619 of 619 strings)
Co-authored-by: Danial Behzadi <dani.behzi@ubuntu.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/fa/
Translation: Tusky/Tusky
I moved the library from Jitpack to Maven Central and changed the group
id (so renovate won't pick that up), other than that there is only a
dependency upgrade to `androidx.appcompat:appcompat:1.6.1` included
- Revise linting rules
- Make lint failures opt-in (for the project) instead of opt-out
- Reduce noise
- Add explicit errors for things we would ask somebody to change in a
code review
- Update baseline to only include the new errors
- Remove baseline autoupdate task since:
- We want this to happen very rarely
- The autoupdater also adds warnings
- Remove reviewdog github action (that autoadds lint comments to PRs)
Trailing commas on Kotlin sources [has many
advantages](https://pinterest.github.io/ktlint/0.49.0/rules/standard/#trailing-comma-on-call-site):
- It makes version-control diffs cleaner – as all the focus is on the
changed value.
- It makes it easy to add and reorder elements – there is no need to add
or delete the comma if you manipulate elements.
- It simplifies code generation, for example, for object initializers.
The last element can also have a comma.
This PR doesn't go as far as require it, but tweaks KtLint to at least
allow it.
The two `.kt` files prove that the KtLint rules have been properly
disabled.
While helping test an issue with
[Bookwyrm](https://github.com/bookwyrm-social/bookwyrm) I noticed that
the URL formats used by that project aren't checked as possible profile
or post links. They're quite close to a couple of others, so I just
copied close examples and edited a couple of terms.
It's pretty minor, I just used a previous commit as a reference. Let me
know if it needs anything more though. I've only quickly tested it on a
local build with a couple of links against a live Bookwyrm and it picks
them up as expected now.
Here this should fix the weblate conflict. No idea why this happened.
This PR must not be squashed or Weblate won't find its commits (as for
all Weblate PRs).
### Objective
* Prevent data loss when the user inadvertently hits back or wants to
leave the profile edition with unsaved changes.
### Description
* To limit the number of changes to the existing codebase, I merely
re-used the same method used by `save()` in the ViewModel to decide
whether to make a network request or simply return the profile as-is.
* ~A bit of code juggling around in the ViewModel and I was able to use
the logic for all the encoding of each profile field (Which is what the
ViewModel caches in memory).~ Thanks @Lakoja for improving this in the
VM.
* A couple of internal data classes used as helpers to move all the
fields around (now that they are no longer used in one single place)
were introduced.
### Potential Optimizations
* ~The profile encoding is done twice (once for checking, and then again
if the user has to actually save it). I'd say this is a negligible price
to pay, since the alternative would be to create a different set of
comparisons and/or keeping another profile in memory for the purpose of
comparison.~
### Visual Improvement
* I believe the Dialog is difficult to see, but it's being displayed
with Tusky's theme. Perhaps there's a better style to apply in this
case? (or maybe the edit profile activity shouldn't have the same
background color as dialogs?!)
### Issue
* #3486