Fix repo website opening (#1061)

As discussed on discord, but this only fixes opening a repo's website and not issue if "open supported links" option is enabled.

Co-authored-by: qwerty287 <ndev@web.de>
Co-authored-by: M M Arif <mmarif@noreply.codeberg.org>
Reviewed-on: https://codeberg.org/gitnex/GitNex/pulls/1061
Reviewed-by: M M Arif <mmarif@noreply.codeberg.org>
Co-authored-by: qwerty287 <qwerty287@noreply.codeberg.org>
Co-committed-by: qwerty287 <qwerty287@noreply.codeberg.org>
This commit is contained in:
qwerty287 2022-03-04 15:03:16 +01:00 committed by M M Arif
parent 2a46c68d3d
commit 6d0f4dcc1f
2 changed files with 4 additions and 7 deletions

View File

@ -22,13 +22,7 @@ import org.mian.gitnex.activities.RepoStargazersActivity;
import org.mian.gitnex.activities.RepoWatchersActivity;
import org.mian.gitnex.clients.RetrofitClient;
import org.mian.gitnex.databinding.FragmentRepoInfoBinding;
import org.mian.gitnex.helpers.AlertDialogs;
import org.mian.gitnex.helpers.Authorization;
import org.mian.gitnex.helpers.ClickListener;
import org.mian.gitnex.helpers.Markdown;
import org.mian.gitnex.helpers.TimeHelper;
import org.mian.gitnex.helpers.TinyDB;
import org.mian.gitnex.helpers.Toasty;
import org.mian.gitnex.helpers.*;
import java.util.Locale;
import retrofit2.Call;
import retrofit2.Callback;
@ -215,6 +209,8 @@ public class RepoInfoFragment extends Fragment {
String website = (repoInfo.getWebsite().isEmpty()) ? getResources().getString(R.string.noDataWebsite) : repoInfo.getWebsite();
binding.repoMetaWebsite.setText(website);
binding.repoMetaWebsite.setLinksClickable(false);
binding.websiteFrame.setOnClickListener((v) -> AppUtil.openUrlInBrowser(requireContext(), repoInfo.getWebsite()));
binding.repoAdditionalButton.setOnClickListener(v -> {

View File

@ -304,6 +304,7 @@
app:srcCompat="@drawable/ic_link" />
<LinearLayout
android:id="@+id/websiteFrame"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="15dp"