Moved handleWebUrl to its own utility class

This commit is contained in:
Paul Hawke 2025-07-02 16:13:14 -05:00
parent 181bd3dfa4
commit b37948ec39
18 changed files with 82 additions and 72 deletions

View file

@ -7,6 +7,7 @@ import android.view.ViewGroup;
import android.widget.TextView;
import androidx.viewpager.widget.PagerAdapter;
import fr.free.nrw.commons.utils.UrlUtils;
import fr.free.nrw.commons.utils.Utils;
public class WelcomePagerAdapter extends PagerAdapter {
@ -48,7 +49,7 @@ public class WelcomePagerAdapter extends PagerAdapter {
// Add link to more information
TextView moreInfo = layout.findViewById(R.id.welcomeInfo);
Utils.setUnderlinedText(moreInfo, R.string.welcome_help_button_text, container.getContext());
moreInfo.setOnClickListener(view -> Utils.handleWebUrl(
moreInfo.setOnClickListener(view -> UrlUtils.handleWebUrl(
container.getContext(),
Uri.parse("https://commons.wikimedia.org/wiki/Help:Contents")
));