Piwigo / Piwigo-Android

Piwigo Native Android App
GNU General Public License v3.0
140 stars 43 forks source link

Community plugin basic support #212

Open Valou447 opened 4 years ago

Valou447 commented 4 years ago

This is now pretty obsolete because of #206 but it may help you @ramack and the other contributors to implement the support with the new local repository architecture

ramack commented 4 years ago

Thanks for this PR, is this finished - if we ignore the repository restructuring? And therefore fully implementing #47 and can you explain what you essentially implemented here? - is it exactly what @eddyLB described in the ticket? Also I'd like to understand why that procedure makes a difference in terms of showing photos. - I guess that finally we could even make the "add" button visible for only those albums where the current user has access to but you did not yet do that, right?

Valou447 commented 4 years ago

Hello @ramack, yet no, it is not finished and I'm not sure I'll be done before the end of my internship (which is Friday, 13th of December).

I did follow Eddy's way to implement this, by calling the reflection.getMethod to see if Community is enabled or not.

If so, the user rights will be determined with community.session.getStatus and if not, with pwg.session.getStatus

Then, the key faked_by_community is important because if it will affect the returned list of categories (false means Community is enabled, otherwise it should be true).

Two things are missing:

Be able to check if Community is enabled (the code is executing and not waiting for the reflectionMethod to give some result), and indeed, show the FAB only where the user would be able to upload.