mirror of
https://github.com/gitnex-org/gitnex.git
synced 2026-03-24 15:22:36 -05:00
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:
@@ -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 -> {
|
||||
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user