S2TDroid icon indicating copy to clipboard operation
S2TDroid copied to clipboard

Output dir is now cached across app launches

Open theGeekyLad opened this issue 4 years ago • 2 comments

Fix for issue #11

  • Included a new prefs key in KeyCollection.java to store chosen output dir path
  • On choosing output dir for the first time round
    • The Uri is stored in prefs against the :point_up: key
    • Since Uris perish once the activity is destroyed (nice read here), takePersistableUriPermission() for this chosen outputDirUri
  • Added a new method readOutputDirUriFromCache() that does Uri.parse(...Uri string from prefs...) to get the Uri back (basically "uncaches" it back)
  • All outputDirUri null checks have been enhanced with also checking if the "uncached" Uri from :point_up: also is null

theGeekyLad avatar Oct 04 '20 17:10 theGeekyLad

Also @npes87184 , would really appreciate if you could add the topic hacktoberfest to this repository and accept my PR (if you deem it valid) with the label hacktoberfest-accepted

It would count as a contribution for me!

theGeekyLad avatar Oct 04 '20 20:10 theGeekyLad

Hey @npes87184 , I've made the changes that you'd indicated and updated this PR. Kindly check it out when time permits. Thanks! :+1:

theGeekyLad avatar Oct 10 '20 09:10 theGeekyLad