vanilla-music / vanilla

Vanilla Music Player for Android
GNU General Public License v3.0
1.16k stars 292 forks source link

[Suggestion] Disable the navigation above the library "Startfolder" (Do not navigate outside the defined Music folder) #397

Open Wikinaut opened 8 years ago

Wikinaut commented 8 years ago

I suggest to disable any navigation "above" the defined Startfolder. I don't see any reason for allowing the user to navigate outside the Startfolder.

And, by mistake, I often used the return key too often, so that I landed in the top menu of my Android and had manually to find back my Startfolder.

Alternative solution: add a quick button to go the defined "Startfolder".

omertuc commented 8 years ago

I created a pull request #436 resolving this ... I hope they merge it

adrian-bl commented 8 years ago

Thanks for the PR, but the code looks overly complex to me:

Wouldn't it be simpler to just compare Limiter.names of mLimiter and limiter to check if: limiter is shorter than mLimiter && all elements of limiter exist in mLimiter ? This way there would be no need to create a file object.

Also note that the code returns too early if limiter is null AND the feature is enabled (eg: it wouldn't kill existing observers and will not reset mLimiter)