Skip to content
This repository was archived by the owner on May 23, 2025. It is now read-only.

use status source for delete and redraft#1461

Merged
connyduck merged 3 commits intomasterfrom
use-status-source-for-delete-redraft
Aug 28, 2019
Merged

use status source for delete and redraft#1461
connyduck merged 3 commits intomasterfrom
use-status-source-for-delete-redraft

Conversation

@connyduck
Copy link
Copy Markdown
Collaborator

ref mastodon/mastodon#10669

fixes bugs with delete&redraft where mentions are lost

@connyduck connyduck requested a review from charlag August 24, 2019 20:45
Copy link
Copy Markdown
Collaborator

@charlag charlag left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a nice change! It's for some time in Masto I assume. did you try out Pleroma or will it work fine without such response?

removeItem(position)
.observeOn(AndroidSchedulers.mainThread())
.autoDisposable(from(this, Lifecycle.Event.ON_DESTROY))
.subscribe { (text, inReplyToId, spoilerText, visibility, sensitive, attachments, poll) ->
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to handle errors here or?..

.setMessage(R.string.dialog_delete_toot_warning)
.setPositiveButton(android.R.string.ok, (dialogInterface, i) -> {
timelineCases.delete(id);
timelineCases.delete(id)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also error must be handled here? Or it TimelineCases

timelineCases.delete(id);
removeItem(position);
timelineCases.delete(id)
.observeOn(AndroidSchedulers.mainThread())
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and here

/* this is not ideal since deleting last toot from an conversation
should not delete the conversation but show another toot of the conversation */
timelineCases.delete(conversation.lastStatus.id)
.subscribeOn(Schedulers.io())
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should handle an error here

@connyduck
Copy link
Copy Markdown
Collaborator Author

Nope its not working with pleroma. Need to fallback to the old code

@connyduck
Copy link
Copy Markdown
Collaborator Author

And of course it needs error handling, otherwise it crashes. Thx!

@connyduck connyduck requested a review from charlag August 27, 2019 19:15
@connyduck connyduck merged commit 42a6b98 into master Aug 28, 2019
@connyduck connyduck deleted the use-status-source-for-delete-redraft branch September 15, 2019 07:18
noln pushed a commit to roma-apps/roma-android that referenced this pull request Feb 16, 2020
* use status source for delete and redraft

* make delete & redraft work on Pleroma again

* add error handling

# Conflicts:
#	app/src/main/java/tech/bigfig/roma/components/conversation/ConversationsViewModel.kt
#	app/src/main/java/tech/bigfig/roma/components/search/SearchViewModel.kt
#	app/src/main/java/tech/bigfig/roma/components/search/fragments/SearchStatusesFragment.kt
#	app/src/main/java/tech/bigfig/roma/fragment/SFragment.java
#	app/src/main/java/tech/bigfig/roma/network/MastodonApi.java
#	app/src/main/java/tech/bigfig/roma/network/TimelineCases.kt
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants