Hide public URL when not used

Instead of disabling the public URL when content is shared with contacts or private, it seems better to hide it.
The resulting code has been tested on Photos and Files.