planetary-social/nos

Add Download DB button to bottom of Settings screen

Closed this issue · 5 comments

Given that I am a user of Nos
When I view the bottom of the Debug section of the Settings screen
Then I should see a button to the left of the Share Logs button that says
Download database

We had similar code to do this in Planetary. Planetary wasn't using Core Data so we'll need to find the location of Core Data's sqlite* files.

@setch-l I'd like to propose two changes:

  1. Let's call the button "Share database" since when you tap it, we're immediately showing the share sheet. This also aligns nicely with the "Share logs" button.
  2. Let's move the button down since it doesn't fit:

Image

I think it might make sense to give "Share database" its own line below the App Version, then another line for "Share logs". This would be like the "Logout" button above, which has its own line.

@setch-l see the PR (#1268) for screen shots of what I'm proposing.

@joshuatbrown - Your changes sound good! Thanks!

Just want to make sure this very edgy edge case is documented. If we can't find the database for some reason, we'll show this error alert:

Image

But then, if we can't find the database, we might have a bigger problem. I'm really not sure how this could happen, but Apple's code tells me there's a chance, so better to be prepared just in case.