Adding the --user repository allows users without any special elevated privileges to install Flatpaks. The use case is simply if you want to only use your system single-user anyways, or you even want to isolate apps only in your profile. on the "add Flathub" button it would be cool to have the possibility to choose, between "system" and "user". The rest already works well. Discover displays that repo (just not with the icon) and it is also displayed as source correctly.
Not a bad idea. In fact maybe we should default to installing it as a user repo, not a system repo. Worth considering. What do you think, Aleix or Ivan?
There is no universal answer for that. Probably worth asking the user every time (which I'd expect to be rare enough to not be annoying), and *without* "remember this settings" kind of checkbox. Other than that, Discover operates on system and user installations equally fine.
*** Bug 466500 has been marked as a duplicate of this bug. ***
I'm not so sure that asking the user each time would be of much benefit anyway, because standard user accounts can't add a system repo without the admin password. That would only realistically apply to the admin account. A system repo is not necessary, it's really more of a nicety. So the admin account can have it's own user repo and have no problems. Default to 'user' repo when adding flathub via Discover is the better choice IMO.