Yuito-app-android/app/src/main/res
Nik Clayton c650ca9362
Improve the actual and perceived speed of thread loading (#3118)
* 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
2023-01-09 21:31:31 +01:00
..
anim fix some lint warnings 2019-04-21 08:24:29 +02:00
color Theme refactoring (#1656) 2020-01-30 21:37:28 +01:00
color-v24 Fix crash on startup on Api levels 25 and lower (#2422) 2022-04-07 20:04:39 +02:00
drawable issue 2890: Add an "ALT" sticker to the media preview container (#2942) 2022-12-18 16:50:30 +01:00
drawable-v24 new app icon (#2695) 2022-09-13 19:48:09 +02:00
layout Improve the actual and perceived speed of thread loading (#3118) 2023-01-09 21:31:31 +01:00
layout-land Redesign report activity (#1295) 2019-06-09 16:55:34 +02:00
layout-sw640dp Improve the actual and perceived speed of thread loading (#3118) 2023-01-09 21:31:31 +01:00
menu Share and copy menu items for account page (#3120) 2023-01-09 21:08:46 +01:00
mipmap-anydpi-v26 new app icon (#2695) 2022-09-13 19:48:09 +02:00
raw Update gradle, kotlin and other dependencies (#2291) 2022-01-20 21:10:32 +01:00
values Improve the actual and perceived speed of thread loading (#3118) 2023-01-09 21:31:31 +01:00
values-ar Update translation files 2023-01-02 16:01:35 +00:00
values-be Update translation files 2023-01-02 16:01:35 +00:00
values-ber Replace “status” by “post” in strings name and source values (#2405) 2022-03-27 12:23:25 +02:00
values-bg Update translation files 2023-01-02 16:01:35 +00:00
values-bn-rBD Update translation files 2023-01-02 16:01:35 +00:00
values-bn-rIN Update translation files 2023-01-02 16:01:35 +00:00
values-ca Update translation files 2023-01-02 16:01:35 +00:00
values-ckb Update translation files 2023-01-02 16:01:35 +00:00
values-cs Update translation files 2023-01-02 16:01:35 +00:00
values-cy Update translation files 2023-01-02 16:01:35 +00:00
values-de Update translation files 2023-01-02 16:01:35 +00:00
values-el Update translation files 2022-08-05 16:55:17 +00:00
values-en-rGB Convert "title case" strings to "sentence case" (#3132) 2023-01-03 21:07:04 +01:00
values-eo Update translation files 2023-01-02 16:01:35 +00:00
values-es Update translation files 2023-01-02 16:01:35 +00:00
values-eu Update translation files 2023-01-02 16:01:35 +00:00
values-fa Update translation files 2023-01-02 16:01:35 +00:00
values-fi Update translation files 2023-01-02 16:01:35 +00:00
values-fr Update translation files 2023-01-02 16:01:35 +00:00
values-fy Update translation files 2023-01-02 16:01:35 +00:00
values-ga Update translation files 2023-01-02 16:01:35 +00:00
values-gd Update translation files 2023-01-02 16:01:35 +00:00
values-gl Update translation files 2023-01-02 16:01:35 +00:00
values-hi Update translation files 2023-01-02 16:01:35 +00:00
values-hu Update translation files 2023-01-02 16:01:35 +00:00
values-in Update translation files 2023-01-02 16:01:35 +00:00
values-is Update translation files 2023-01-02 16:01:35 +00:00
values-it Translated using Weblate (Italian) 2023-01-02 16:01:35 +00:00
values-ja Update translation files 2023-01-02 16:01:35 +00:00
values-kab Spelling (#2771) 2022-11-09 19:32:39 +01:00
values-ko Spelling (#2771) 2022-11-09 19:32:39 +01:00
values-large Theme refactoring (#1656) 2020-01-30 21:37:28 +01:00
values-large-land fix compose field on landscape tablets (#2747) 2022-11-07 19:56:28 +01:00
values-lv Translated using Weblate (Latvian) 2022-12-31 12:01:53 +00:00
values-ml Spelling (#2771) 2022-11-09 19:32:39 +01:00
values-nb-rNO Update translation files 2023-01-02 16:01:35 +00:00
values-night improve bot badge (#2466) 2022-04-28 20:39:06 +02:00
values-nl Update translation files 2023-01-02 16:01:35 +00:00
values-oc Update translation files 2023-01-02 16:01:35 +00:00
values-pl Update translation files 2023-01-02 16:01:35 +00:00
values-pt-rBR Update translation files 2023-01-02 16:01:35 +00:00
values-pt-rPT Update translation files 2023-01-02 16:01:35 +00:00
values-ru Update translation files 2023-01-02 16:01:35 +00:00
values-sa Update translation files 2023-01-02 16:01:35 +00:00
values-si Update translation files 2023-01-02 16:01:35 +00:00
values-sk Spelling (#2771) 2022-11-09 19:32:39 +01:00
values-sl Spelling (#2771) 2022-11-09 19:32:39 +01:00
values-small Implement media tab (#430) 2017-11-05 22:32:36 +01:00
values-sv Update translation files 2023-01-02 16:01:35 +00:00
values-sw380dp ComposeActivity refactor (#1541) 2019-12-19 19:09:40 +01:00
values-ta Spelling (#2771) 2022-11-09 19:32:39 +01:00
values-th Update translation files 2023-01-02 16:01:35 +00:00
values-tr Update translation files 2023-01-02 16:01:35 +00:00
values-uk Update translation files 2023-01-02 16:01:35 +00:00
values-v27 Android 12 support, update AndroidX libraries (#2367) 2022-03-09 20:50:23 +01:00
values-vi Update translation files 2023-01-02 16:01:35 +00:00
values-w640dp some Optimizations for tablets (#647) 2018-05-16 19:14:53 +02:00
values-zh-rCN Update translation files 2023-01-02 16:01:35 +00:00
values-zh-rHK Update translation files 2023-01-02 16:01:35 +00:00
values-zh-rMO Spelling (#2771) 2022-11-09 19:32:39 +01:00
values-zh-rSG Spelling (#2771) 2022-11-09 19:32:39 +01:00
values-zh-rTW Update translation files 2023-01-02 16:01:35 +00:00
xml support Android 13 per-app languages (#2829) 2022-11-16 19:45:18 +01:00