* Improve the actual and perceived speed of thread loading
To improve the actual speed, note that if the user has opened a thread from
their home timeline then the initial status is cached in the database. Other
statuses in the same thread may be cached as well.
So try and load the initial status from the database, falling back to the
network if it's not present (e.g., the user has opened a thread from the
local or federated timelines, or a search).
Introduce a new loading state to deal with this case.
In typical cases this allows the UI to display the initial status immediately
with no need to show a progress indicator.
To improve the perceived speed, delay showing the initial loading circular
progress indicators by 500ms. If loading the initial status completes within
that time no spinner is shown and the user will perceive the action as
close-to-immediate
(https://www.nngroup.com/articles/response-times-3-important-limits/).
Additionally, introduce an extra indeterminate progress indicator.
The new indicator is linear, anchored to the bottom of the screen, and shows
progress loading ancestor/descendant statuses. Like the other indicator is
also delayed 500ms from when ancestor/descendant status information is
fetched, and if the fetch completes in that time it will not be shown.
* Mark `getStatus` as suspend so it doesn't run on the main thread
* Save an allocation, use an isDetailed parameter to TimelineStatusWithAccount.toViewData
Rename Status.toViewData's "detailed" parameter to "isDetailed" for
consistency with other uses.
* Ensure suspend functions run to completion when testing
* Delay-load the status from the network even if it's cached
This speeds up the UI while ensuring it will eventually contain accurate data
from the remote.
* Load the network status before updating the list
Avoids excess animations if the network copy has changes
* Fix UI flicker when loading reblogged statuses
* Lint
* Fixup tests
* Share and copy menu items for account page (first attempt)]
* Always include domain in username in 'handle' copy
* Remove profile copy options, rename 'handle' to 'username'
* Long press on username in profile to copy it to clipboard
* Changes for code review: localUsername not username, Snackbar not Toast
* Do not trust getDomain() when getting full username. This means full-username build has to happen in AccountActivity instead of Account
* Replace != null -> \!\! idiom with more kotlin-y (and more threadsafe) ?.let pattern
* Unnecessary import
* Comment clarifying safety of \!\!
Tusky mostly uses (correctly, per Android style guide) sentence case (i.e.,
a single initial capital letter) in strings like "Scheduled posts" or
"Muted users".
But there are a few instances of title case (i.e., each initial letter is
capitalised) that have crept in ("Account Preferences", "Log Out",
"Follow Requests", etc).
Convert them to sentence case.
Currently translated at 98.7% (533 of 540 strings)
Translated using Weblate (Welsh)
Currently translated at 99.4% (535 of 538 strings)
Co-authored-by: Newidyn <grugallt@protonmail.ch>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/cy/
Translation: Tusky/Tusky
* show status edits part 1
* show status edits part 2 - load status edits
* fix code formatting
* add dialog to show status edits
* small improvements
* use ALIGN_CENTER to position status visibility icon when possible
* rename status_timestamp_info view to status_meta_info
* make dateFormat static
* remove commented-out code
* move edits to dedicated fragment
Currently translated at 49.9% (267 of 535 strings)
Translated using Weblate (Latvian)
Currently translated at 49.7% (266 of 535 strings)
Co-authored-by: Mārtiņš Bruņenieks <martinsb@gmail.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/lv/
Translation: Tusky/Tusky
Currently translated at 63.3% (339 of 535 strings)
Translated using Weblate (Belarusian)
Currently translated at 59.4% (318 of 535 strings)
Co-authored-by: xzFantom <xzfantom@gmail.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/be/
Translation: Tusky/Tusky
* Fix saving changes to statuses when editing
With the previous code backing out of a status editing operation where changes
had been made (whether it was editing an existing status, a scheduled status,
or a draft) would prompt the user to save the changes as a new draft.
See https://github.com/tuskyapp/Tusky/issues/2704 and
https://github.com/tuskyapp/Tusky/issues/2705 for more detail.
The fix:
- Create an enum to represent the four different kinds of edits that can
happen
- Editing a new status (i.e., composing it for the first time)
- Editing a posted status
- Editing a draft
- Editing a scheduled status
- Store this in ComposeOptions, and set it appropriately everywhere
ComposeOptions is created.
- Check the edit kind when backing out of ComposeActivity, and use this to
show one of three different dialogs as appropriate so the user can:
- Save as new draft or discard changes
- Continue editing or discard changes
- Update existing draft or discard changes
Also fix ComposeViewModel.didChange(), which erroneously reported false if the
old text started with the new text (e.g., if the old text was "hello, world"
and it was edited to "hello", didChange() would not consider that to be a
change).
Fixes https://github.com/tuskyapp/Tusky/issues/2704,
https://github.com/tuskyapp/Tusky/issues/2705
* Use orEmpty extension function
These aren't necessary for the app, and are overwritten with the actual style
in `BaseActivity.onCreate()`.
But if they're missing the Android Studio layout preview renderer crashes.
* Convert AccountViewHolder from Java to Kotlin
Use view binding in the converted code, which requires small changes in code
that calls constructors.
Pass showBotOverlays as a parameter, rather than having the code reach in to
the shared preferences, fixing a layering violation. This affects callers
and classes derived from AccountAdapter.
* Use 2-arg getString
* Simplify setting bot badge indicator
- Specify the drawable in the XML
- Use visible() to set visibility
- Rename ID to account_bot_badge to make it clearer that this is all it is for
* Use lateinit to avoid needing !! later
Currently translated at 15.5% (83 of 535 strings)
Translated using Weblate (Belarusian)
Currently translated at 9.3% (50 of 534 strings)
Co-authored-by: xzFantom <xzfantom@gmail.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/be/
Translation: Tusky/Tusky
Currently translated at 100.0% (535 of 535 strings)
Translated using Weblate (Turkish)
Currently translated at 99.8% (533 of 534 strings)
Co-authored-by: Umit Kabuli <umitkabuli@gmail.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/tr/
Translation: Tusky/Tusky
Currently translated at 100.0% (534 of 534 strings)
Translated using Weblate (Welsh)
Currently translated at 98.6% (527 of 534 strings)
Co-authored-by: Rhoslyn Prys <post@meddal.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/cy/
Translation: Tusky/Tusky
Currently translated at 100.0% (535 of 535 strings)
Translated using Weblate (Vietnamese)
Currently translated at 100.0% (534 of 534 strings)
Translated using Weblate (Vietnamese)
Currently translated at 100.0% (532 of 532 strings)
Co-authored-by: Hồ Nhất Duy <duy@tutamail.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/vi/
Translation: Tusky/Tusky
Currently translated at 100.0% (535 of 535 strings)
Translated using Weblate (Ukrainian)
Currently translated at 100.0% (534 of 534 strings)
Translated using Weblate (Ukrainian)
Currently translated at 100.0% (533 of 533 strings)
Translated using Weblate (Ukrainian)
Currently translated at 100.0% (532 of 532 strings)
Co-authored-by: Ihor Hordiichuk <igor_ck@outlook.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/uk/
Translation: Tusky/Tusky
Currently translated at 100.0% (534 of 534 strings)
Translated using Weblate (Icelandic)
Currently translated at 100.0% (532 of 532 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% (535 of 535 strings)
Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (534 of 534 strings)
Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (533 of 533 strings)
Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (532 of 532 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% (534 of 534 strings)
Translated using Weblate (Turkish)
Currently translated at 99.6% (530 of 532 strings)
Co-authored-by: Ümit Solmaz <usnotv@gmail.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/tr/
Translation: Tusky/Tusky
Currently translated at 100.0% (535 of 535 strings)
Translated using Weblate (Swedish)
Currently translated at 100.0% (534 of 534 strings)
Translated using Weblate (Swedish)
Currently translated at 100.0% (533 of 533 strings)
Translated using Weblate (Swedish)
Currently translated at 100.0% (532 of 532 strings)
Co-authored-by: Jan Lindblom <janlindblom@fastmail.fm>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/sv/
Translation: Tusky/Tusky
* issue 2890: Add an "ALT" sticker to the media preview container if there are descriptions
* issue 2890: Use end and start for positioning
* issue 2890: Adapt to new media view group
* issue 2890: Use an indicator overlay for every (single) preview image
* issue 2890: Reduce radius to match that of the preview layout
* issue 2890: Remove (again) unused code
* issue 2890: Set visibility in any case
* issue 2890: Use a translatable text for ALT
* issue 2890: Show ALT flag only when showing media
* issue 2890: Call doOnLayout on the layout wrapper
* Add post editing capability
* Don't try to reprocess already uploaded attachments.
Fixes editing posts with existing media
* Don't mark post edits as modified until editing occurs
* Disable UI for things that can't be edited when editing a post
* Finally convert SFragment to kotlin
* Use api endpoint for fetching status source for editing
* Apply review feedback
* replace hard-coded strings with existing constants
* proxy port
* * custom proxy port and hostname inputs
* typesafety, refactor, linting, unit tests
* relocate ProxyConfiguration in app structure
* remove unused editTextPreference fn
* allow preference category to have no title
* refactor proxy prefs hierarchy/dependency
On smaller devices the notification filter listview may be longer than the
screen height, and pushes the "Apply" button out of sight.
Fix this by:
- Set the height of the listview to 0dp and its layout_weight to 1
- Set the layout_weight of the button to 0
This ensures the button always appears (because the listview height is 0dp)
and the listview then expands to fill any remaining space (because the
layout_weight is 1).
Fixes https://github.com/tuskyapp/Tusky/issues/2985
* Use light/dark mode colors for image description text
This is an accessibility issue -- in light mode (which should have dark text
on a light background) the text color was hardcoded to light grey and the
background color was a semi-transparent black.
Fixes https://github.com/tuskyapp/Tusky/issues/2983.
* Update app/src/main/res/drawable/ic_drag_indicator_horiz_24dp.xml
Co-authored-by: Konrad Pozniak <connyduck@users.noreply.github.com>
Co-authored-by: Konrad Pozniak <connyduck@users.noreply.github.com>
Currently translated at 100.0% (531 of 531 strings)
Translated using Weblate (Vietnamese)
Currently translated at 100.0% (529 of 529 strings)
Co-authored-by: Hồ Nhất Duy <duy@tutamail.com>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/vi/
Translation: Tusky/Tusky
Currently translated at 100.0% (531 of 531 strings)
Translated using Weblate (Icelandic)
Currently translated at 100.0% (529 of 529 strings)
Co-authored-by: Sveinn í Felli <sv1@fellsnet.is>
Translate-URL: https://weblate.tusky.app/projects/tusky/tusky/is/
Translation: Tusky/Tusky