mirror of
https://github.com/pachli/pachli-android.git
synced 2025-01-23 21:51:57 +01:00
Nik Clayton
fc81e8bad7
fix: Ensure actions happen against the correct status (#373)
Previously when the user interacted with a status the operation (reblog, favourite, etc) travels through multiple layers of code, carrying with it the position of the item in the list that the user operated on. At some point the status is retrieved from the list using its position so that the correct status ID can be used in the network operation. If this happens while the list is also refreshing there's a possible race condition, and the original status' position may have changed in the list. Looking up the status by position to determine which status to perform the action on may cause the action to happen on the wrong status. Fix this by passing the status' viewdata to any actions instead of its position. This includes all the information necessary to make the API call, so there is no chance of a race. This is quite an involved change because there are three types of viewdata: - `StatusViewData`, used for regular timelines - `NotificationViewData`, used for notifications, may wrap a status that can be operated on - `ConversationViewData`, used for conversations, does wrap a status The previous code treated them all differently, which is probably why it operated by position instead of type. The high level fix is to: 1. Create an interface, `IStatusViewData`, that contains the data exposed by any viewdata that contains a status. 2. Implement the interface in `StatusViewData`, `NotificationViewData`, and `ConversationViewData`. 3. Change the code that operates on viewdata (`SFragment`, `StatusActionListener`, etc) to be generic over anything that implements `IStatusViewData`. 4. Change the code that handles actions to pass the viewdata instead of the position. Fixes #370
Pachli
Pachli is a full-featured Android client for Mastodon, with a cooperative development model.
Features include:
- Read, reply, filter, post, favourite, and boost posts
- Translate posts from other languages
- Your timeline is cached locally, so you can read when offline
- Draft posts now to finish them later
- Write posts now and schedule them to send later
- Read and post from multiple accounts
- Manage who you follow with multiple lists
- Use different themes to customise the UI
- A variety of accessible fonts in different sizes
- Full control over how and when you receive notifications
- Explore trending posts, links, and hashtags
Pachli is open source.
Install the newest release from the list of releases, or from Google Play and F-Droid.
Support
- Say "hi" on Mastodon, we're @pachli@mastodon.social
- Join the ongoing discussions
- Report a bug or make a feature request as a new issue
Contributing
We actively welcome new contributors. Please read CONTRIBUTING.md for more information.
More information
More information about the application and the principals underpinning its development are at https://pachli.app.
Description
Pachli è un client Android completo per Mastodon:
La timeline viene memorizzata nella cache locale, in modo da poterla leggere anche quando si è offline
Bozza dei post ora per finirli in un secondo momento
Scrivere i post ora e programmarne l'invio in un secondo momento
Leggere e pubblicare da più account
Gestite chi seguite con più elenchi
Utilizzare diversi temi per personalizzare l'interfaccia utente
Una varietà di font accessibili in diverse dimensioni
Pieno controllo su come e quando si ricevono le notifiche
https://mastodon.it/it/Quale-app-mastodon-utilizzare
Readme
Languages
Kotlin
100%