Use custom tabs for nearby web views (#1347)

This commit is contained in:
Vivek Maskara 2018-03-29 12:26:34 +05:30 committed by Josephine Lim
parent 120130bfc7
commit e122bf3a54
2 changed files with 4 additions and 4 deletions

View file

@ -53,6 +53,7 @@ import javax.inject.Named;
import dagger.android.support.DaggerFragment;
import fr.free.nrw.commons.R;
import fr.free.nrw.commons.Utils;
import fr.free.nrw.commons.contributions.ContributionController;
import fr.free.nrw.commons.utils.UriDeserializer;
import timber.log.Timber;
@ -700,8 +701,7 @@ public class NearbyMapFragment extends DaggerFragment {
}
private void openWebView(Uri link) {
Intent browserIntent = new Intent(Intent.ACTION_VIEW, link);
startActivity(browserIntent);
Utils.handleWebUrl(getContext(), link);
}
private void animateFAB(boolean isFabOpen) {

View file

@ -27,6 +27,7 @@ import butterknife.BindView;
import butterknife.ButterKnife;
import fr.free.nrw.commons.CommonsApplication;
import fr.free.nrw.commons.R;
import fr.free.nrw.commons.Utils;
import fr.free.nrw.commons.contributions.ContributionController;
import fr.free.nrw.commons.di.ApplicationlessInjection;
import timber.log.Timber;
@ -200,8 +201,7 @@ public class PlaceRenderer extends Renderer<Place> {
}
private void openWebView(Uri link) {
Intent browserIntent = new Intent(Intent.ACTION_VIEW, link);
view.getContext().startActivity(browserIntent);
Utils.handleWebUrl(getContext(), link);
}
private boolean showMenu() {