Fix repo website opening (#1063)

Backport #1061

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/1063
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:02:41 +01:00
committed by M M Arif
parent 522db044b4
commit df0ee806bd
2 changed files with 4 additions and 7 deletions

View File

@@ -20,13 +20,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;
@@ -213,6 +207,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"