mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 12:23:58 +01:00
* Add conditional on function onAuthorViewClicked for when there's not logged-in user * Change media.getAuthor() for media.getUser() * Change hardcoded URL for one given by the BuildConfig object
This commit is contained in:
parent
9fb13395f6
commit
013809f46a
1 changed files with 7 additions and 0 deletions
|
|
@ -57,6 +57,7 @@ import com.facebook.imagepipeline.image.ImageInfo;
|
|||
import com.facebook.imagepipeline.request.ImageRequest;
|
||||
import com.mapbox.mapboxsdk.camera.CameraPosition;
|
||||
import com.mapbox.mapboxsdk.geometry.LatLng;
|
||||
import fr.free.nrw.commons.BuildConfig;
|
||||
import fr.free.nrw.commons.LocationPicker.LocationPicker;
|
||||
import fr.free.nrw.commons.Media;
|
||||
import fr.free.nrw.commons.MediaDataExtractor;
|
||||
|
|
@ -1232,6 +1233,12 @@ public class MediaDetailFragment extends CommonsDaggerSupportFragment implements
|
|||
if (media == null || media.getUser() == null) {
|
||||
return;
|
||||
}
|
||||
if (sessionManager.getUserName() == null) {
|
||||
String userProfileLink = BuildConfig.COMMONS_URL + "/wiki/User:" + media.getUser();
|
||||
Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(userProfileLink));
|
||||
startActivity(browserIntent);
|
||||
return;
|
||||
}
|
||||
ProfileActivity.startYourself(getActivity(), media.getUser(), !Objects
|
||||
.equals(sessionManager.getUserName(), media.getUser()));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue