Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drafts v2 #2032

Merged
merged 25 commits into from
Jan 21, 2021
Merged

Drafts v2 #2032

merged 25 commits into from
Jan 21, 2021

Conversation

connyduck
Copy link
Collaborator

@connyduck connyduck commented Jan 5, 2021

  • complete clean rewrite of the draft feature
  • the old draft feature is kept intact, so users can still use their old drafts (will remove it in a later release)
  • an info dialog will tell users where to find the old drafts (only if they have some)
  • gets rid of ancient Java code with AsyncTasks
  • all saved information (content warning, attachments, polls) is shown on the draft preview
  • only one network request per media file when restoring a draft (instead of one for the file and one for the description)
  • Fixes a bug where media descriptions can get lost when restoring a draft
  • Fixes a bug where restored media would get uploaded multiple times when the screen is rotated on ComposeActivity
  • since I did not want to write code with the deprecated kotlin syntethic views, this introduces Viewbinding. I intend to convert everything to Viewbinding
  • once the old draft feature is removed, the code should be a lot cleaner and faster

@connyduck connyduck marked this pull request as ready for review January 15, 2021 19:50
Copy link
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.

I am yet to test it somehow but looking at code it's really nice!
It was kinda hard to hunt down all the relevant commits so I think it would be great to squash it into 2-3 commits and maybe also rebase it?
I'm fine with view binding, I think it's the most painless options for us right now.

@charlag
Copy link
Collaborator

charlag commented Jan 17, 2021

Here are some other things:

  • in the list of drafts I think there's not enough space below images
  • Not all parts in the draft list can be pressed to open the draft, empty space next to the image doesn't do anything. Also I don't remember it having ripple.
  • When I add two images, don't finish upload them, save draft and reopen it we upload two images in parallel. I don't remember if we do this normally or we wait

@charlag
Copy link
Collaborator

charlag commented Jan 19, 2021

What about other comments I left?

@connyduck
Copy link
Collaborator Author

Oh. Thx 😅

When I add two images, don't finish upload them, save draft and reopen it we upload two images in parallel. I don't remember if we do this normally or we wait

I changed nothing there, it was always this way. I think it is fine.

Copy link
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.

Looks good!

@connyduck connyduck merged commit 940d6d3 into develop Jan 21, 2021
@connyduck connyduck deleted the compose_fixes branch January 21, 2021 17:57
@jesopo jesopo mentioned this pull request Jan 25, 2021
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants