improve local status updates (#3480)
The idea here is: Everytime we get hold of a new version of a post, we update everything about that post everywhere. This makes the distincion between different event types unnecessary, as everythng is just a `StatusChangedEvent`. The main benefit is that posts should be up-to-date more often, which is important considering there is now editing and #3413
This commit is contained in:
parent
2f39f87cc7
commit
54e92b2156
12 changed files with 145 additions and 198 deletions
|
|
@ -21,8 +21,8 @@ import at.connyduck.calladapter.networkresult.fold
|
|||
import com.keylesspalace.tusky.MainActivity
|
||||
import com.keylesspalace.tusky.R
|
||||
import com.keylesspalace.tusky.appstore.EventHub
|
||||
import com.keylesspalace.tusky.appstore.StatusChangedEvent
|
||||
import com.keylesspalace.tusky.appstore.StatusComposedEvent
|
||||
import com.keylesspalace.tusky.appstore.StatusEditedEvent
|
||||
import com.keylesspalace.tusky.appstore.StatusScheduledEvent
|
||||
import com.keylesspalace.tusky.components.compose.MediaUploader
|
||||
import com.keylesspalace.tusky.components.compose.UploadEvent
|
||||
|
|
@ -253,7 +253,7 @@ class SendStatusService : Service(), Injectable {
|
|||
if (scheduled) {
|
||||
eventHub.dispatch(StatusScheduledEvent(sentStatus))
|
||||
} else if (!isNew) {
|
||||
eventHub.dispatch(StatusEditedEvent(statusToSend.statusId!!, sentStatus))
|
||||
eventHub.dispatch(StatusChangedEvent(sentStatus))
|
||||
} else {
|
||||
eventHub.dispatch(StatusComposedEvent(sentStatus))
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue