cg-local-app icon indicating copy to clipboard operation
cg-local-app copied to clipboard

Enhance File Selection by Using Last File's Directory as Starting Point

Open slgeay opened this issue 1 year ago • 0 comments

This PR makes selecting files in ConnectedController a bit more user-friendly when you're doing a bunch of challenges back-to-back.

Now, if you've picked a file before, it'll start in the same folder. This way, you don't have to keep navigating from scratch every time.

Key Changes:

  • selectFile checks if the last file picked exists. If it does, it uses its folder as the starting point. If not, it switches to using home directory as a fallback.

Benefits:

  • Reduces unnecessary navigation by selecting the starting directory based on the user's recent activity.
  • Ensures a reliable fallback to the user's home directory.

Thought for Later: It might be neat to let you set a default start folder in the settings later on, rather than just use the user's home directory. This could be a nice touch for tailoring the app to fit your workflow from the very first challenge.

Looking forward to your thoughts!

slgeay avatar Feb 23 '24 09:02 slgeay